GetCommandLine should return non-const strings.
This commit is contained in:
parent
20b87c06eb
commit
34e10ee30f
|
@ -1379,8 +1379,8 @@ BOOL WINAPI GetCommModemStatus(HANDLE,LPDWORD);
|
||||||
BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP);
|
BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP);
|
||||||
BOOL WINAPI GetCommState(HANDLE,LPDCB);
|
BOOL WINAPI GetCommState(HANDLE,LPDCB);
|
||||||
BOOL WINAPI GetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
|
BOOL WINAPI GetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
|
||||||
LPCSTR WINAPI GetCommandLineA(void);
|
LPSTR WINAPI GetCommandLineA(void);
|
||||||
LPCWSTR WINAPI GetCommandLineW(void);
|
LPWSTR WINAPI GetCommandLineW(void);
|
||||||
#define GetCommandLine WINELIB_NAME_AW(GetCommandLine)
|
#define GetCommandLine WINELIB_NAME_AW(GetCommandLine)
|
||||||
BOOL WINAPI GetComputerNameA(LPSTR,LPDWORD);
|
BOOL WINAPI GetComputerNameA(LPSTR,LPDWORD);
|
||||||
BOOL WINAPI GetComputerNameW(LPWSTR,LPDWORD);
|
BOOL WINAPI GetComputerNameW(LPWSTR,LPDWORD);
|
||||||
|
@ -2004,6 +2004,10 @@ VOID WINAPI SetLastError(DWORD);
|
||||||
#define GetCurrentThread() ((HANDLE)0xfffffffe)
|
#define GetCurrentThread() ((HANDLE)0xfffffffe)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* WinMain(entry point) must be declared in winbase.h. */
|
||||||
|
/* If this is not declared, we cannot compile many sources written with C++. */
|
||||||
|
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -103,7 +103,7 @@ BOOL ENV_BuildEnvironment(void)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetCommandLineA (KERNEL32.289)
|
* GetCommandLineA (KERNEL32.289)
|
||||||
*/
|
*/
|
||||||
LPCSTR WINAPI GetCommandLineA(void)
|
LPSTR WINAPI GetCommandLineA(void)
|
||||||
{
|
{
|
||||||
return PROCESS_Current()->env_db->cmd_line;
|
return PROCESS_Current()->env_db->cmd_line;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ LPCSTR WINAPI GetCommandLineA(void)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetCommandLineW (KERNEL32.290)
|
* GetCommandLineW (KERNEL32.290)
|
||||||
*/
|
*/
|
||||||
LPCWSTR WINAPI GetCommandLineW(void)
|
LPWSTR WINAPI GetCommandLineW(void)
|
||||||
{
|
{
|
||||||
PDB *pdb = PROCESS_Current();
|
PDB *pdb = PROCESS_Current();
|
||||||
EnterCriticalSection( &pdb->env_db->section );
|
EnterCriticalSection( &pdb->env_db->section );
|
||||||
|
|
|
@ -395,9 +395,9 @@ void BuildSpec32File( FILE *outfile )
|
||||||
"\n#include <winbase.h>\n"
|
"\n#include <winbase.h>\n"
|
||||||
"static void exe_main(void)\n"
|
"static void exe_main(void)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" extern int PASCAL %s(HINSTANCE,HINSTANCE,LPCSTR,INT);\n"
|
" extern int PASCAL %s(HINSTANCE,HINSTANCE,LPSTR,INT);\n"
|
||||||
" STARTUPINFOA info;\n"
|
" STARTUPINFOA info;\n"
|
||||||
" const char *cmdline = GetCommandLineA();\n"
|
" LPSTR cmdline = GetCommandLineA();\n"
|
||||||
" while (*cmdline && *cmdline != ' ') cmdline++;\n"
|
" while (*cmdline && *cmdline != ' ') cmdline++;\n"
|
||||||
" if (*cmdline) cmdline++;\n"
|
" if (*cmdline) cmdline++;\n"
|
||||||
" GetStartupInfoA( &info );\n"
|
" GetStartupInfoA( &info );\n"
|
||||||
|
|
Loading…
Reference in New Issue