winecfg: Update Portuguese translation.
[wine/multimedia.git] / dlls / userenv / userenv_main.c
blob01f3a1b8e6311a19e51457abfa7b4fed562daeb8
1 /*
2 * Implementation of userenv.dll
4 * Copyright 2006 Mike McCormack for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <stdarg.h>
23 #include "ntstatus.h"
24 #define WIN32_NO_STATUS
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winreg.h"
28 #include "winternl.h"
29 #include "userenv.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL( userenv );
35 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
37 TRACE("%p %d %p\n", hinstDLL, fdwReason, lpvReserved);
39 switch (fdwReason)
41 case DLL_WINE_PREATTACH:
42 return FALSE; /* prefer native version */
43 case DLL_PROCESS_ATTACH:
44 DisableThreadLibraryCalls(hinstDLL);
45 break;
46 case DLL_PROCESS_DETACH:
47 break;
49 return TRUE;
52 BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment,
53 HANDLE hToken, BOOL bInherit )
55 NTSTATUS r;
57 TRACE("%p %p %d\n", lpEnvironment, hToken, bInherit );
59 if (!lpEnvironment)
60 return FALSE;
62 r = RtlCreateEnvironment(bInherit, (WCHAR **)lpEnvironment);
63 if (r == STATUS_SUCCESS)
64 return TRUE;
65 return FALSE;
68 BOOL WINAPI ExpandEnvironmentStringsForUserA( HANDLE hToken, LPCSTR lpSrc,
69 LPSTR lpDest, DWORD dwSize )
71 BOOL ret;
73 TRACE("%p %s %p %d\n", hToken, debugstr_a(lpSrc), lpDest, dwSize);
75 ret = ExpandEnvironmentStringsA( lpSrc, lpDest, dwSize );
76 TRACE("<- %s\n", debugstr_a(lpDest));
77 return ret;
80 BOOL WINAPI ExpandEnvironmentStringsForUserW( HANDLE hToken, LPCWSTR lpSrc,
81 LPWSTR lpDest, DWORD dwSize )
83 BOOL ret;
85 TRACE("%p %s %p %d\n", hToken, debugstr_w(lpSrc), lpDest, dwSize);
87 ret = ExpandEnvironmentStringsW( lpSrc, lpDest, dwSize );
88 TRACE("<- %s\n", debugstr_w(lpDest));
89 return ret;
92 BOOL WINAPI GetUserProfileDirectoryA( HANDLE hToken, LPSTR lpProfileDir,
93 LPDWORD lpcchSize )
95 FIXME("%p %p %p\n", hToken, lpProfileDir, lpcchSize );
96 return FALSE;
99 BOOL WINAPI GetUserProfileDirectoryW( HANDLE hToken, LPWSTR lpProfileDir,
100 LPDWORD lpcchSize )
102 FIXME("%p %p %p\n", hToken, lpProfileDir, lpcchSize );
103 return FALSE;
106 BOOL WINAPI GetProfilesDirectoryA( LPSTR lpProfilesDir, LPDWORD lpcchSize )
108 FIXME("%p %p\n", lpProfilesDir, lpcchSize );
109 return FALSE;
112 BOOL WINAPI GetProfilesDirectoryW( LPWSTR lpProfilesDir, LPDWORD lpcchSize )
114 FIXME("%p %p\n", lpProfilesDir, lpcchSize );
115 return FALSE;
118 BOOL WINAPI GetProfileType( DWORD *pdwFlags )
120 FIXME("%p\n", pdwFlags );
121 *pdwFlags = 0;
122 return TRUE;
125 BOOL WINAPI LoadUserProfileA( HANDLE hToken, LPPROFILEINFOA lpProfileInfo )
127 FIXME("%p %p\n", hToken, lpProfileInfo );
128 lpProfileInfo->hProfile = HKEY_CURRENT_USER;
129 return TRUE;
132 BOOL WINAPI LoadUserProfileW( HANDLE hToken, LPPROFILEINFOW lpProfileInfo )
134 FIXME("%p %p\n", hToken, lpProfileInfo );
135 lpProfileInfo->hProfile = HKEY_CURRENT_USER;
136 return TRUE;
139 BOOL WINAPI RegisterGPNotification( HANDLE event, BOOL machine )
141 FIXME("%p %d\n", event, machine );
142 return TRUE;
145 BOOL WINAPI UnregisterGPNotification( HANDLE event )
147 FIXME("%p\n", event );
148 return TRUE;
151 BOOL WINAPI UnloadUserProfile( HANDLE hToken, HANDLE hProfile )
153 FIXME("(%p, %p): stub\n", hToken, hProfile);
154 return FALSE;