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
34 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL( userenv
);
38 BOOL WINAPI
DllMain(HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID lpvReserved
)
40 TRACE("%p %d %p\n", hinstDLL
, fdwReason
, lpvReserved
);
44 case DLL_WINE_PREATTACH
:
45 return FALSE
; /* prefer native version */
46 case DLL_PROCESS_ATTACH
:
47 DisableThreadLibraryCalls(hinstDLL
);
53 static BOOL
get_reg_value(WCHAR
*env
, HKEY hkey
, const WCHAR
*name
, WCHAR
*val
, DWORD size
)
55 DWORD type
, res_size
=0;
57 if (RegQueryValueExW(hkey
, name
, 0, &type
, NULL
, &res_size
) != ERROR_SUCCESS
)
65 return RegQueryValueExW(hkey
, name
, 0, NULL
, (BYTE
*)val
, &size
) == ERROR_SUCCESS
;
67 else if (type
== REG_EXPAND_SZ
)
69 UNICODE_STRING us_buf
, us_expanded
;
70 WCHAR
*buf
= HeapAlloc(GetProcessHeap(), 0, res_size
);
74 if (RegQueryValueExW(hkey
, name
, 0, NULL
, (BYTE
*)buf
, &res_size
) != ERROR_SUCCESS
)
76 HeapFree(GetProcessHeap(), 0, buf
);
80 RtlInitUnicodeString(&us_buf
, buf
);
81 us_expanded
.Buffer
= val
;
82 us_expanded
.MaximumLength
= size
;
83 if (RtlExpandEnvironmentStrings_U(env
, &us_buf
, &us_expanded
, &size
) != STATUS_SUCCESS
)
85 HeapFree(GetProcessHeap(), 0, buf
);
89 HeapFree(GetProcessHeap(), 0, buf
);
96 static void set_env_var( WCHAR
**env
, const WCHAR
*name
, const WCHAR
*val
)
98 UNICODE_STRING nameW
, valW
;
100 RtlInitUnicodeString( &nameW
, name
);
101 RtlInitUnicodeString( &valW
, val
);
102 RtlSetEnvironmentVariable( env
, &nameW
, &valW
);
105 static void set_registry_variables(WCHAR
**env
, HKEY hkey
, DWORD type
, BOOL set_path
)
107 UNICODE_STRING us_name
, us_value
;
108 WCHAR name
[1024], value
[1024];
109 DWORD ret
, index
, size
;
111 for (index
= 0; ; index
++)
113 size
= ARRAY_SIZE(name
);
114 ret
= RegEnumValueW(hkey
, index
, name
, &size
, NULL
, NULL
, NULL
, NULL
);
115 if (ret
!= ERROR_SUCCESS
)
118 if (!wcsicmp(name
, L
"SystemRoot")) continue;
119 if (!wcsicmp(name
, L
"SystemDrive")) continue;
121 RtlInitUnicodeString(&us_name
, name
);
122 us_value
.Buffer
= value
;
123 us_value
.MaximumLength
= sizeof(value
);
124 if (!wcsicmp(name
, L
"PATH") &&
125 !RtlQueryEnvironmentVariable_U(*env
, &us_name
, &us_value
))
130 size
= lstrlenW(value
)+1;
131 if (!get_reg_value(*env
, hkey
, name
, value
+size
,
132 sizeof(value
)-size
*sizeof(WCHAR
)))
136 set_env_var(env
, name
, value
);
140 if (get_reg_value(*env
, hkey
, name
, value
, sizeof(value
)) && value
[0])
141 set_env_var(env
, name
, value
);
145 static void set_wow64_environment(WCHAR
**env
)
149 BOOL is_win64
= (sizeof(void *) > sizeof(int));
152 IsWow64Process( GetCurrentProcess(), &is_wow64
);
154 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE
, L
"Software\\Microsoft\\Windows\\CurrentVersion",
155 0, KEY_READ
|KEY_WOW64_64KEY
, &hkey
))
158 /* set the ProgramFiles variables */
160 if (get_reg_value(*env
, hkey
, L
"ProgramFilesDir", buf
, sizeof(buf
)))
162 if (is_win64
|| is_wow64
) set_env_var(env
, L
"ProgramW6432", buf
);
163 if (is_win64
|| !is_wow64
) set_env_var(env
, L
"ProgramFiles", buf
);
165 if (get_reg_value(*env
, hkey
, L
"ProgramFilesDir (x86)", buf
, sizeof(buf
)))
167 if (is_win64
|| is_wow64
) set_env_var(env
, L
"ProgramFiles(x86)", buf
);
168 if (is_wow64
) set_env_var(env
, L
"ProgramFiles", buf
);
171 /* set the CommonProgramFiles variables */
173 if (get_reg_value(*env
, hkey
, L
"CommonFilesDir", buf
, sizeof(buf
)))
175 if (is_win64
|| is_wow64
) set_env_var(env
, L
"CommonProgramW6432", buf
);
176 if (is_win64
|| !is_wow64
) set_env_var(env
, L
"CommonProgramFiles", buf
);
178 if (get_reg_value(*env
, hkey
, L
"CommonFilesDir (x86)", buf
, sizeof(buf
)))
180 if (is_win64
|| is_wow64
) set_env_var(env
, L
"CommonProgramFiles(x86)", buf
);
181 if (is_wow64
) set_env_var(env
, L
"CommonProgramFiles", buf
);
187 BOOL WINAPI
CreateEnvironmentBlock( LPVOID
* lpEnvironment
,
188 HANDLE hToken
, BOOL bInherit
)
190 static const WCHAR env_keyW
[] = L
"System\\CurrentControlSet\\Control\\Session Manager\\Environment";
191 static const WCHAR profile_keyW
[] = L
"Software\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList";
193 WCHAR
*env
, buf
[UNICODE_STRING_MAX_CHARS
], profiles_dir
[MAX_PATH
];
197 TRACE("%p %p %d\n", lpEnvironment
, hToken
, bInherit
);
202 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE
, env_keyW
, 0, KEY_READ
, &hkey
) != ERROR_SUCCESS
)
205 if (RtlCreateEnvironment(bInherit
, &env
) != STATUS_SUCCESS
)
211 if (!GetEnvironmentVariableW(L
"SystemRoot", buf
, UNICODE_STRING_MAX_CHARS
))
213 if (!get_reg_value(env
, hkey
, L
"SystemRoot", buf
, UNICODE_STRING_MAX_CHARS
))
216 WARN("SystemRoot variable not set\n");
219 set_env_var(&env
, L
"SystemRoot", buf
);
221 if (!GetEnvironmentVariableW(L
"SystemDrive", buf
, UNICODE_STRING_MAX_CHARS
))
223 if (!get_reg_value(env
, hkey
, L
"SystemDrive", buf
, UNICODE_STRING_MAX_CHARS
))
226 WARN("SystemDrive variable not set\n");
229 set_env_var(&env
, L
"SystemDrive", buf
);
231 set_registry_variables(&env
, hkey
, REG_SZ
, !bInherit
);
232 set_registry_variables(&env
, hkey
, REG_EXPAND_SZ
, !bInherit
);
234 if (RegOpenKeyExW(hkey
, L
"Environment", 0, KEY_READ
, &hsubkey
) == ERROR_SUCCESS
)
236 set_registry_variables(&env
, hsubkey
, REG_SZ
, !bInherit
);
237 set_registry_variables(&env
, hsubkey
, REG_EXPAND_SZ
, !bInherit
);
238 RegCloseKey(hsubkey
);
241 if (RegOpenKeyExW(hkey
, L
"Volatile Environment", 0, KEY_READ
, &hsubkey
) == ERROR_SUCCESS
)
243 set_registry_variables(&env
, hsubkey
, REG_SZ
, !bInherit
);
244 set_registry_variables(&env
, hsubkey
, REG_EXPAND_SZ
, !bInherit
);
245 RegCloseKey(hsubkey
);
249 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE
, profile_keyW
, 0, KEY_READ
, &hkey
) == ERROR_SUCCESS
)
251 if (get_reg_value(env
, hkey
, L
"ProfilesDirectory", profiles_dir
, MAX_PATH
- sizeof(WCHAR
)))
253 len
= lstrlenW(profiles_dir
);
254 if (profiles_dir
[len
-1] != '\\')
256 profiles_dir
[len
++] = '\\';
257 profiles_dir
[len
] = '\0';
260 if (get_reg_value(env
, hkey
, L
"Public", buf
, UNICODE_STRING_MAX_CHARS
))
261 set_env_var(&env
, L
"ALLUSERSPROFILE", buf
);
271 len
= ARRAY_SIZE(buf
);
272 if (GetComputerNameW(buf
, &len
))
273 set_env_var(&env
, L
"COMPUTERNAME", buf
);
275 set_wow64_environment(&env
);
281 len
= lstrlenW(profiles_dir
);
282 if (len
* sizeof(WCHAR
) + sizeof(L
"Default") < sizeof(buf
))
284 wcscpy(buf
, profiles_dir
);
285 wcscat(buf
, L
"Default");
286 set_env_var(&env
, L
"USERPROFILE", buf
);
290 wcscpy(buf
, L
".Default");
294 TOKEN_USER
*token_user
= NULL
;
299 if (GetTokenInformation(hToken
, TokenUser
, NULL
, 0, &len
) ||
300 GetLastError()!=ERROR_INSUFFICIENT_BUFFER
||
301 !(token_user
= HeapAlloc(GetProcessHeap(), 0, len
)) ||
302 !GetTokenInformation(hToken
, TokenUser
, token_user
, len
, &len
) ||
303 !ConvertSidToStringSidW(token_user
->User
.Sid
, &sidW
))
305 HeapFree(GetProcessHeap(), 0, token_user
);
306 RtlDestroyEnvironment(env
);
310 len
= lstrlenW(profiles_dir
);
311 memcpy(buf
, profiles_dir
, len
*sizeof(WCHAR
));
313 size
= UNICODE_STRING_MAX_CHARS
-len
;
314 if (LookupAccountSidW(NULL
, token_user
->User
.Sid
,
315 buf
+len
, &size
, NULL
, &tmp
, &use
))
317 set_env_var(&env
, L
"USERNAME", buf
+len
);
318 if (len
) set_env_var(&env
, L
"USERPROFILE", buf
);
321 HeapFree(GetProcessHeap(), 0, token_user
);
326 if (RegOpenKeyExW(HKEY_USERS
, buf
, 0, KEY_READ
, &hkey
) == ERROR_SUCCESS
)
328 if (RegOpenKeyExW(hkey
, L
"Environment", 0, KEY_READ
, &hsubkey
) == ERROR_SUCCESS
)
330 set_registry_variables(&env
, hsubkey
, REG_SZ
, !bInherit
);
331 set_registry_variables(&env
, hsubkey
, REG_EXPAND_SZ
, !bInherit
);
332 RegCloseKey(hsubkey
);
335 if (RegOpenKeyExW(hkey
, L
"Volatile Environment", 0, KEY_READ
, &hsubkey
) == ERROR_SUCCESS
)
337 set_registry_variables(&env
, hsubkey
, REG_SZ
, !bInherit
);
338 set_registry_variables(&env
, hsubkey
, REG_EXPAND_SZ
, !bInherit
);
339 RegCloseKey(hsubkey
);
344 *lpEnvironment
= env
;
348 BOOL WINAPI
DestroyEnvironmentBlock(LPVOID lpEnvironment
)
352 TRACE("%p\n", lpEnvironment
);
353 r
= RtlDestroyEnvironment(lpEnvironment
);
354 if (r
== STATUS_SUCCESS
)
359 BOOL WINAPI
ExpandEnvironmentStringsForUserA( HANDLE hToken
, LPCSTR lpSrc
,
360 LPSTR lpDest
, DWORD dwSize
)
364 TRACE("%p %s %p %d\n", hToken
, debugstr_a(lpSrc
), lpDest
, dwSize
);
366 ret
= ExpandEnvironmentStringsA( lpSrc
, lpDest
, dwSize
);
367 TRACE("<- %s\n", debugstr_a(lpDest
));
371 BOOL WINAPI
ExpandEnvironmentStringsForUserW( HANDLE hToken
, LPCWSTR lpSrc
,
372 LPWSTR lpDest
, DWORD dwSize
)
376 TRACE("%p %s %p %d\n", hToken
, debugstr_w(lpSrc
), lpDest
, dwSize
);
378 ret
= ExpandEnvironmentStringsW( lpSrc
, lpDest
, dwSize
);
379 TRACE("<- %s\n", debugstr_w(lpDest
));
383 BOOL WINAPI
GetDefaultUserProfileDirectoryA( LPSTR lpProfileDir
, LPDWORD lpcchSize
)
385 FIXME("%p %p\n", lpProfileDir
, lpcchSize
);
389 BOOL WINAPI
GetDefaultUserProfileDirectoryW( LPWSTR lpProfileDir
, LPDWORD lpcchSize
)
391 FIXME("%p %p\n", lpProfileDir
, lpcchSize
);
395 BOOL WINAPI
GetUserProfileDirectoryA( HANDLE hToken
, LPSTR lpProfileDir
,
401 TRACE( "%p %p %p\n", hToken
, lpProfileDir
, lpcchSize
);
403 if (!lpProfileDir
|| !lpcchSize
)
405 SetLastError( ERROR_INVALID_PARAMETER
);
408 if (!(dirW
= HeapAlloc( GetProcessHeap(), 0, *lpcchSize
* sizeof(WCHAR
) )))
411 if ((ret
= GetUserProfileDirectoryW( hToken
, dirW
, lpcchSize
)))
412 WideCharToMultiByte( CP_ACP
, 0, dirW
, *lpcchSize
, lpProfileDir
, *lpcchSize
, NULL
, NULL
);
414 HeapFree( GetProcessHeap(), 0, dirW
);
418 BOOL WINAPI
GetUserProfileDirectoryW( HANDLE hToken
, LPWSTR lpProfileDir
,
421 static const WCHAR slashW
[] = {'\\',0};
423 WCHAR
*userW
= NULL
, *dirW
= NULL
;
424 DWORD len
, dir_len
, domain_len
;
428 TRACE( "%p %p %p\n", hToken
, lpProfileDir
, lpcchSize
);
432 SetLastError( ERROR_INVALID_PARAMETER
);
437 GetTokenInformation( hToken
, TokenUser
, NULL
, 0, &len
);
438 if (GetLastError() != ERROR_INSUFFICIENT_BUFFER
) return FALSE
;
439 if (!(t
= HeapAlloc( GetProcessHeap(), 0, len
))) return FALSE
;
440 if (!GetTokenInformation( hToken
, TokenUser
, t
, len
, &len
)) goto done
;
442 len
= domain_len
= 0;
443 LookupAccountSidW( NULL
, t
->User
.Sid
, NULL
, &len
, NULL
, &domain_len
, NULL
);
444 if (GetLastError() != ERROR_INSUFFICIENT_BUFFER
) goto done
;
445 if (!(userW
= HeapAlloc( GetProcessHeap(), 0, len
* sizeof(WCHAR
) ))) goto done
;
446 if (!LookupAccountSidW( NULL
, t
->User
.Sid
, userW
, &len
, NULL
, &domain_len
, &use
)) goto done
;
449 GetProfilesDirectoryW( NULL
, &dir_len
);
450 if (GetLastError() != ERROR_INSUFFICIENT_BUFFER
) goto done
;
451 if (!(dirW
= HeapAlloc( GetProcessHeap(), 0, (dir_len
+ 1) * sizeof(WCHAR
) ))) goto done
;
452 if (!GetProfilesDirectoryW( dirW
, &dir_len
)) goto done
;
455 if (*lpcchSize
< len
)
457 SetLastError( ERROR_INSUFFICIENT_BUFFER
);
461 lstrcpyW( lpProfileDir
, dirW
);
462 lstrcatW( lpProfileDir
, slashW
);
463 lstrcatW( lpProfileDir
, userW
);
468 HeapFree( GetProcessHeap(), 0, t
);
469 HeapFree( GetProcessHeap(), 0, userW
);
470 HeapFree( GetProcessHeap(), 0, dirW
);
474 static const char ProfileListA
[] = "Software\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList";
476 BOOL WINAPI
GetProfilesDirectoryA( LPSTR lpProfilesDir
, LPDWORD lpcchSize
)
478 static const char ProfilesDirectory
[] = "ProfilesDirectory";
482 DWORD len
= 0, expanded_len
;
483 LPSTR unexpanded_profiles_dir
= NULL
;
485 TRACE("%p %p\n", lpProfilesDir
, lpcchSize
);
487 if (!lpProfilesDir
|| !lpcchSize
)
489 SetLastError(ERROR_INVALID_PARAMETER
);
493 l
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, ProfileListA
, 0, KEY_READ
, &key
);
499 l
= RegQueryValueExA(key
, ProfilesDirectory
, NULL
, NULL
, NULL
, &len
);
505 unexpanded_profiles_dir
= HeapAlloc(GetProcessHeap(), 0, len
);
506 if (!unexpanded_profiles_dir
)
508 SetLastError(ERROR_OUTOFMEMORY
);
511 l
= RegQueryValueExA(key
, ProfilesDirectory
, NULL
, NULL
,
512 (BYTE
*)unexpanded_profiles_dir
, &len
);
518 expanded_len
= ExpandEnvironmentStringsA(unexpanded_profiles_dir
, NULL
, 0);
519 /* The returned length doesn't include the NULL terminator. */
520 if (*lpcchSize
< expanded_len
- 1)
522 *lpcchSize
= expanded_len
- 1;
523 SetLastError(ERROR_INSUFFICIENT_BUFFER
);
526 *lpcchSize
= expanded_len
- 1;
527 /* The return value is also the expected length. */
528 ret
= ExpandEnvironmentStringsA(unexpanded_profiles_dir
, lpProfilesDir
,
531 HeapFree(GetProcessHeap(), 0, unexpanded_profiles_dir
);
536 static const WCHAR ProfileListW
[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s',' ','N','T','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','P','r','o','f','i','l','e','L','i','s','t',0};
538 BOOL WINAPI
GetProfilesDirectoryW( LPWSTR lpProfilesDir
, LPDWORD lpcchSize
)
540 static const WCHAR ProfilesDirectory
[] = {'P','r','o','f','i','l','e','s','D','i','r','e','c','t','o','r','y',0};
544 DWORD len
= 0, expanded_len
;
545 LPWSTR unexpanded_profiles_dir
= NULL
;
547 TRACE("%p %p\n", lpProfilesDir
, lpcchSize
);
551 SetLastError(ERROR_INVALID_PARAMETER
);
555 l
= RegOpenKeyExW(HKEY_LOCAL_MACHINE
, ProfileListW
, 0, KEY_READ
, &key
);
561 l
= RegQueryValueExW(key
, ProfilesDirectory
, NULL
, NULL
, NULL
, &len
);
567 unexpanded_profiles_dir
= HeapAlloc(GetProcessHeap(), 0, len
);
568 if (!unexpanded_profiles_dir
)
570 SetLastError(ERROR_OUTOFMEMORY
);
573 l
= RegQueryValueExW(key
, ProfilesDirectory
, NULL
, NULL
,
574 (BYTE
*)unexpanded_profiles_dir
, &len
);
580 expanded_len
= ExpandEnvironmentStringsW(unexpanded_profiles_dir
, NULL
, 0);
581 /* The returned length doesn't include the NULL terminator. */
582 if (*lpcchSize
< expanded_len
- 1 || !lpProfilesDir
)
584 *lpcchSize
= expanded_len
- 1;
585 SetLastError(ERROR_INSUFFICIENT_BUFFER
);
588 *lpcchSize
= expanded_len
- 1;
589 /* The return value is also the expected length. */
590 ret
= ExpandEnvironmentStringsW(unexpanded_profiles_dir
, lpProfilesDir
,
593 HeapFree(GetProcessHeap(), 0, unexpanded_profiles_dir
);
598 BOOL WINAPI
GetAllUsersProfileDirectoryA( LPSTR lpProfileDir
, LPDWORD lpcchSize
)
600 FIXME("%p %p\n", lpProfileDir
, lpcchSize
);
604 BOOL WINAPI
GetAllUsersProfileDirectoryW( LPWSTR lpProfileDir
, LPDWORD lpcchSize
)
606 FIXME("%p %p\n", lpProfileDir
, lpcchSize
);
610 BOOL WINAPI
GetProfileType( DWORD
*pdwFlags
)
612 FIXME("%p\n", pdwFlags
);
617 BOOL WINAPI
LoadUserProfileA( HANDLE hToken
, LPPROFILEINFOA lpProfileInfo
)
619 FIXME("%p %p\n", hToken
, lpProfileInfo
);
620 lpProfileInfo
->hProfile
= HKEY_CURRENT_USER
;
624 BOOL WINAPI
LoadUserProfileW( HANDLE hToken
, LPPROFILEINFOW lpProfileInfo
)
626 FIXME("%p %p\n", hToken
, lpProfileInfo
);
627 lpProfileInfo
->hProfile
= HKEY_CURRENT_USER
;
631 BOOL WINAPI
RegisterGPNotification( HANDLE event
, BOOL machine
)
633 FIXME("%p %d\n", event
, machine
);
637 BOOL WINAPI
UnregisterGPNotification( HANDLE event
)
639 FIXME("%p\n", event
);
643 BOOL WINAPI
UnloadUserProfile( HANDLE hToken
, HANDLE hProfile
)
645 FIXME("(%p, %p): stub\n", hToken
, hProfile
);
649 HANDLE WINAPI
EnterCriticalPolicySection(BOOL bMachine
)
651 FIXME("(%x)\n", bMachine
);
652 SetLastError(ERROR_ACCESS_DENIED
);
656 BOOL WINAPI
LeaveCriticalPolicySection(HANDLE hSection
)
658 FIXME("(%p)\n", hSection
);
662 DWORD WINAPI
GetAppliedGPOListW(DWORD dwFlags
, LPCWSTR pMachineName
, PSID pSidUser
, GUID
*pGuidExtension
,
663 PGROUP_POLICY_OBJECTW
*ppGPOList
)
665 FIXME("(%x %s %p %s %p)\n", dwFlags
, debugstr_w(pMachineName
), pSidUser
, debugstr_guid(pGuidExtension
), ppGPOList
);
666 return ERROR_ACCESS_DENIED
;
669 /******************************************************************************
675 * int csidl [in] well-known directory location to create link in
676 * LPCSTR lnk_dir [in] directory (relative to directory specified by csidl) to create link in
677 * LPCSTR lnk_filename [in] filename of the link file without .lnk extension
678 * LPCSTR lnk_target [in] file/directory pointed to by link
679 * LPCSTR lnk_iconfile [in] link icon resource filename
680 * DWORD lnk_iconid [in] link icon resource id in file referred by lnk_iconfile
681 * LPCSTR work_directory [in] link target's work directory
682 * WORD hotkey [in] link hotkey (virtual key id)
683 * DWORD win_state [in] initial window size (SW_SHOWMAXIMIZED to start maximized,
684 * SW_SHOWMINNOACTIVE to start minimized, everything else is default state)
685 * LPCSTR comment [in] comment - link's comment
686 * LPCSTR loc_filename_resfile [in] resource file which holds localized filename for this link file
687 * DWORD loc_filename_resid [in] resource id for this link file's localized filename
690 * TRUE: Link file was successfully created
691 * FALSE: Link file was not created
693 BOOL WINAPI
USERENV_138( int csidl
, LPCSTR lnk_dir
, LPCSTR lnk_filename
,
694 LPCSTR lnk_target
, LPCSTR lnk_iconfile
, DWORD lnk_iconid
,
695 LPCSTR work_directory
, WORD hotkey
, DWORD win_state
, LPCSTR comment
,
696 LPCSTR loc_filename_resfile
, DWORD loc_filename_resid
)
698 FIXME("(%d,%s,%s,%s,%s,%d,%s,0x%x,%d,%s,%s,%d) - stub\n", csidl
, debugstr_a(lnk_dir
),
699 debugstr_a(lnk_filename
), debugstr_a(lnk_target
), debugstr_a(lnk_iconfile
),
700 lnk_iconid
, debugstr_a(work_directory
), hotkey
, win_state
,
701 debugstr_a(comment
), debugstr_a(loc_filename_resfile
), loc_filename_resid
);