2 * Win32 kernel functions
4 * Copyright 1995 Martin von Loewis and Cameron Heide
11 #include "wine/winestring.h"
17 /***********************************************************************
18 * GetStartupInfoA (KERNEL32.273)
20 VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo)
22 lpStartupInfo->cb = sizeof(STARTUPINFOA);
23 lpStartupInfo->lpReserved = "<Reserved>";
24 lpStartupInfo->lpDesktop = "Desktop";
25 lpStartupInfo->lpTitle = "Title";
27 lpStartupInfo->cbReserved2 = 0;
28 lpStartupInfo->lpReserved2 = NULL; /* must be NULL for VC runtime */
29 lpStartupInfo->dwFlags = STARTF_USESTDHANDLES;
30 lpStartupInfo->hStdInput = (HANDLE)0;
31 lpStartupInfo->hStdOutput = (HANDLE)1;
32 lpStartupInfo->hStdError = (HANDLE)2;
35 /***********************************************************************
36 * GetStartupInfoW (KERNEL32.274)
38 VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW lpStartupInfo)
40 lpStartupInfo->cb = sizeof(STARTUPINFOW);
41 lpStartupInfo->lpReserved = HEAP_strdupAtoW(GetProcessHeap(),0,"<Reserved>");
42 lpStartupInfo->lpDesktop = HEAP_strdupAtoW(GetProcessHeap(), 0, "Desktop");
43 lpStartupInfo->lpTitle = HEAP_strdupAtoW(GetProcessHeap(), 0, "Title");
45 lpStartupInfo->cbReserved2 = 0;
46 lpStartupInfo->lpReserved2 = NULL; /* must be NULL for VC runtime */
47 lpStartupInfo->hStdInput = (HANDLE)0;
48 lpStartupInfo->hStdOutput = (HANDLE)1;
49 lpStartupInfo->hStdError = (HANDLE)2;
52 /***********************************************************************
53 * GetComputerNameA (KERNEL32.165)
55 BOOL WINAPI GetComputerNameA(LPSTR name,LPDWORD size)
57 if (-1==gethostname(name,*size))
59 *size = lstrlenA(name);
63 /***********************************************************************
64 * GetComputerNameW (KERNEL32.166)
66 BOOL WINAPI GetComputerNameW(LPWSTR name,LPDWORD size)
68 LPSTR nameA = (LPSTR)HeapAlloc( GetProcessHeap(), 0, *size);
69 BOOL ret = GetComputerNameA(nameA,size);
70 if (ret) lstrcpynAtoW(name,nameA,*size+1);
71 HeapFree( GetProcessHeap(), 0, nameA );