Release 970824
[wine/multimedia.git] / win32 / environment.c
blobcbe6259caa57683a5971d257e98c588ba7765416
1 /*
2 * Win32 kernel functions
4 * Copyright 1995 Martin von Loewis and Cameron Heide
5 */
7 #include <stdio.h>
8 #include <string.h>
9 #include <unistd.h>
10 #include "windows.h"
11 #include "winerror.h"
12 #include "module.h"
13 #include "task.h"
14 #include "stddebug.h"
15 #include "debug.h"
18 /***********************************************************************
19 * GetCommandLineA (KERNEL32.161)
21 LPCSTR WINAPI GetCommandLine32A(void)
23 static char buffer[256];
24 char *cp;
25 PDB *pdb = (PDB *)GlobalLock16( GetCurrentPDB() );
27 lstrcpyn32A( buffer, MODULE_GetModuleName( GetExePtr(GetCurrentTask()) ),
28 sizeof(buffer) - 1 );
29 cp = buffer + strlen(buffer);
30 if (pdb->cmdLine[0])
32 *cp++ = ' ';
33 memcpy( cp, &pdb->cmdLine[1], pdb->cmdLine[0] );
35 dprintf_win32(stddeb,"CommandLine = %s\n", buffer );
36 return buffer;
39 /***********************************************************************
40 * GetCommandLineW (KERNEL32.162)
42 LPCWSTR WINAPI GetCommandLine32W(void)
44 static WCHAR buffer[256];
46 lstrcpynAtoW(buffer,GetCommandLine32A(),256);
47 return buffer;
51 /***********************************************************************
52 * GetSystemPowerStatus (KERNEL32.621)
54 BOOL32 WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS sps_ptr)
56 return FALSE; /* no power management support */
60 /***********************************************************************
61 * SetSystemPowerState (KERNEL32.630)
63 BOOL32 WINAPI SetSystemPowerState(BOOL32 suspend_or_hibernate,
64 BOOL32 force_flag)
66 /* suspend_or_hibernate flag: w95 does not support
67 this feature anyway */
69 for ( ;0; )
71 if ( force_flag )
74 else
78 return TRUE;