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
24 #define WIN32_NO_STATUS
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
);
41 case DLL_WINE_PREATTACH
:
42 return FALSE
; /* prefer native version */
43 case DLL_PROCESS_ATTACH
:
44 DisableThreadLibraryCalls(hinstDLL
);
46 case DLL_PROCESS_DETACH
:
52 BOOL WINAPI
CreateEnvironmentBlock( LPVOID
* lpEnvironment
,
53 HANDLE hToken
, BOOL bInherit
)
57 TRACE("%p %p %d\n", lpEnvironment
, hToken
, bInherit
);
62 r
= RtlCreateEnvironment(bInherit
, (WCHAR
**)lpEnvironment
);
63 if (r
== STATUS_SUCCESS
)
68 BOOL WINAPI
ExpandEnvironmentStringsForUserA( HANDLE hToken
, LPCSTR lpSrc
,
69 LPSTR lpDest
, DWORD dwSize
)
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
));
80 BOOL WINAPI
ExpandEnvironmentStringsForUserW( HANDLE hToken
, LPCWSTR lpSrc
,
81 LPWSTR lpDest
, DWORD dwSize
)
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
));
92 BOOL WINAPI
GetUserProfileDirectoryA( HANDLE hToken
, LPSTR lpProfileDir
,
95 FIXME("%p %p %p\n", hToken
, lpProfileDir
, lpcchSize
);
99 BOOL WINAPI
GetUserProfileDirectoryW( HANDLE hToken
, LPWSTR lpProfileDir
,
102 FIXME("%p %p %p\n", hToken
, lpProfileDir
, lpcchSize
);
106 BOOL WINAPI
GetProfilesDirectoryA( LPSTR lpProfilesDir
, LPDWORD lpcchSize
)
108 FIXME("%p %p\n", lpProfilesDir
, lpcchSize
);
112 BOOL WINAPI
GetProfilesDirectoryW( LPWSTR lpProfilesDir
, LPDWORD lpcchSize
)
114 FIXME("%p %p\n", lpProfilesDir
, lpcchSize
);
118 BOOL WINAPI
GetProfileType( DWORD
*pdwFlags
)
120 FIXME("%p\n", pdwFlags
);
125 BOOL WINAPI
LoadUserProfileA( HANDLE hToken
, LPPROFILEINFOA lpProfileInfo
)
127 FIXME("%p %p\n", hToken
, lpProfileInfo
);
128 lpProfileInfo
->hProfile
= HKEY_CURRENT_USER
;
132 BOOL WINAPI
RegisterGPNotification( HANDLE event
, BOOL machine
)
134 FIXME("%p %d\n", event
, machine
);
138 BOOL WINAPI
UnregisterGPNotification( HANDLE event
)
140 FIXME("%p\n", event
);
144 BOOL WINAPI
UnloadUserProfile( HANDLE hToken
, HANDLE hProfile
)
146 FIXME("(%p, %p): stub\n", hToken
, hProfile
);