Release 961013
[wine/multimedia.git] / win32 / environment.c
blob248076569f95dd55d66bf252e20ac5711a3098fe
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 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 GetCommandLine32W(void)
44 static WCHAR buffer[256];
46 lstrcpynAtoW(buffer,GetCommandLine32A(),256);
47 return buffer;
51 /***********************************************************************
52 * GetSystemPowerStatus (KERNEL32.621)
54 BOOL32 GetSystemPowerStatus(LPSYSTEM_POWER_STATUS sps_ptr)
56 return FALSE; /* no power management support */
60 /***********************************************************************
61 * SetSystemPowerState (KERNEL32.630)
63 BOOL32 SetSystemPowerState(BOOL32 suspend_or_hibernate, BOOL32 force_flag)
65 /* suspend_or_hibernate flag: w95 does not support
66 this feature anyway */
68 for ( ;0; )
70 if ( force_flag )
73 else
77 return TRUE;