Changes in X11DRV_KEYBOARD_DetectLayout in order to implement Russian
[wine/multimedia.git] / win32 / init.c
blobce0bdb30e3217495feb00ad3cb864cb37ae4de9f
1 /*
2 * Win32 kernel functions
4 * Copyright 1995 Martin von Loewis and Cameron Heide
5 * 1999 Peter Ganten
6 */
8 #include <string.h>
9 #include <unistd.h>
10 #include <stdlib.h>
11 #include "winerror.h"
12 #include "wine/winestring.h"
13 #include "except.h"
14 #include "heap.h"
15 #include "task.h"
16 #include "debug.h"
17 #include "process.h"
19 /***********************************************************************
20 * GetStartupInfoA (KERNEL32.273)
22 VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo)
25 LPSTARTUPINFOA startup;
27 startup = ((LPSTARTUPINFOA )PROCESS_Current()->env_db->startup_info);
28 memcpy ( lpStartupInfo, startup, sizeof (STARTUPINFOA) );
30 TRACE ( win32, "size: %ld\n"
31 "\tlpReserverd: %s, lpDesktop: %s, lpTitle: %s\n"
32 "\tdwX: %ld, dwY: %ld, dwXSize: %ld, dwYSize: %ld\n"
33 "\tdwFlags: %lx, wShowWindow: %x\n", lpStartupInfo->cb,
34 lpStartupInfo->lpReserved, lpStartupInfo->lpDesktop,
35 lpStartupInfo->lpTitle, lpStartupInfo->dwX,
36 lpStartupInfo->dwY, lpStartupInfo->dwXSize,
37 lpStartupInfo->dwYSize, lpStartupInfo->dwFlags,
38 lpStartupInfo->wShowWindow );
41 /***********************************************************************
42 * GetStartupInfoW (KERNEL32.274)
44 VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW lpStartupInfo)
47 STARTUPINFOA startup;
48 GetStartupInfoA ( &startup );
50 lpStartupInfo->cb = sizeof(STARTUPINFOW);
51 lpStartupInfo->lpReserved =
52 HEAP_strdupAtoW (GetProcessHeap(), 0, startup.lpReserved );
53 lpStartupInfo->lpDesktop =
54 HEAP_strdupAtoW (GetProcessHeap(), 0, startup.lpDesktop );
55 lpStartupInfo->lpTitle =
56 HEAP_strdupAtoW (GetProcessHeap(), 0, startup.lpTitle );
57 lpStartupInfo->dwX = startup.dwX;
58 lpStartupInfo->dwY = startup.dwY;
59 lpStartupInfo->dwXSize = startup.dwXSize;
60 lpStartupInfo->dwXCountChars = startup.dwXCountChars;
61 lpStartupInfo->dwYCountChars = startup.dwYCountChars;
62 lpStartupInfo->dwFillAttribute = startup.dwFillAttribute;
63 lpStartupInfo->dwFlags = startup.dwFlags;
64 lpStartupInfo->wShowWindow = startup.wShowWindow;
65 lpStartupInfo->cbReserved2 = startup.cbReserved2;
66 lpStartupInfo->lpReserved2 = startup.lpReserved2;
67 lpStartupInfo->hStdInput = startup.hStdInput;
68 lpStartupInfo->hStdOutput = startup.hStdOutput;
69 lpStartupInfo->hStdError = startup.hStdError;
72 /***********************************************************************
73 * GetComputerNameA (KERNEL32.165)
75 BOOL WINAPI GetComputerNameA(LPSTR name,LPDWORD size)
77 if (-1==gethostname(name,*size))
78 return FALSE;
79 *size = lstrlenA(name);
80 return TRUE;
83 /***********************************************************************
84 * GetComputerNameW (KERNEL32.166)
86 BOOL WINAPI GetComputerNameW(LPWSTR name,LPDWORD size)
88 LPSTR nameA = (LPSTR)HeapAlloc( GetProcessHeap(), 0, *size);
89 BOOL ret = GetComputerNameA(nameA,size);
90 if (ret) lstrcpynAtoW(name,nameA,*size+1);
91 HeapFree( GetProcessHeap(), 0, nameA );
92 return ret;