cmd/CmdMain.c
BOOL GetCmdLine(LPWSTR lpCmdLine) {

    WCHAR szCurrentDirectory[MAX_PATH] = L"";
    GetCurrentDirectoryW(MAX_PATH, szCurrentDirectory);

    // Use "-" before ">" to identify which app's prompt (such as the OS built-in command prompt).
    if (CHECKRETURN(StrCmpW(szDisplayPrompt, L""))) {

        wprintf(L"%s>", szCurrentDirectory);
    }
    else {

        wprintf(L"%s", szDisplayPrompt);
    }

    WCHAR szCmdLine[600] = L"";
    fgetws(szCmdLine, 600, stdin);

    // Remove line feed at the end of line
    LPWSTR lpCmdLineSearch = StrStrW(szCmdLine, L"\n");
    *lpCmdLineSearch = L'\0';

    DbgPrint(L"\nPrompt> \"%s\"\n", szCmdLine);

    StrCpyW(lpCmdLine, szCmdLine);

    return SUCCESS;
}
// Temp function for test internam command
Temp function for test internam command
Temp function for test internam command
BOOL GetCmdLine(LPWSTR lpCmdLine) {
    WCHAR szCurrentDirectory[MAX_PATH] = L"";
    GetCurrentDirectoryW(MAX_PATH, szCurrentDirectory);
    if (CHECKRETURN(StrCmpW(szDisplayPrompt, L""))) {
        wprintf(L"%s>", szCurrentDirectory);
    }
    else {
        wprintf(L"%s", szDisplayPrompt);
    }
    WCHAR szCmdLine[600] = L"";
    fgetws(szCmdLine, 600, stdin);
    LPWSTR lpCmdLineSearch = StrStrW(szCmdLine, L"\n");
    *lpCmdLineSearch = L'\0';
    DbgPrint(L"\nPrompt> \"%s\"\n", szCmdLine);
    StrCpyW(lpCmdLine, szCmdLine);
    return SUCCESS;
}
BOOL GetCmdLine ( LPWSTR lpCmdLine ) { WCHAR szCurrentDirectory [ MAX_PATH ] = L" " ; GetCurrentDirectoryW ( MAX_PATH , szCurrentDirectory ) ; if ( CHECKRETURN ( StrCmpW ( szDisplayPrompt , L" " ) ) ) { wprintf ( L" " , szCurrentDirectory ) ; } else { wprintf ( L" " , szDisplayPrompt ) ; } WCHAR szCmdLine [ 600 ] = L" " ; fgetws ( szCmdLine , 600 , stdin ) ; LPWSTR lpCmdLineSearch = StrStrW ( szCmdLine , L" \n " ) ; * lpCmdLineSearch = L' \0 ' ; DbgPrint ( L" \n \" \" \n " , szCmdLine ) ; StrCpyW ( lpCmdLine , szCmdLine ) ; return SUCCESS ; }
Temp function for test internam command
Temp function for test internam command
// Use "-" before ">" to identify which app's prompt (such as the OS built-in command prompt). // Remove line feed at the end of line