weiden@svn.reactos.com wrote:
add stubs for CreateSymbolicLinkA/W
Modified: trunk/reactos/lib/kernel32/file/create.c Modified: trunk/reactos/lib/kernel32/kernel32.def
*Modified: trunk/reactos/lib/kernel32/file/create.c*
--- trunk/reactos/lib/kernel32/file/create.c 2005-08-25 17:38:15 UTC (rev 17541) +++ trunk/reactos/lib/kernel32/file/create.c 2005-08-25 18:21:50 UTC (rev 17542) @@ -357,4 +357,51 @@
return FileHandle; }
+/*
- @unimplemented
- */
+BOOL STDCALL +CreateSymbolicLinkW(IN LPCWSTR lpSymlinkFileName,
IN LPCWSTR lpTargetFileName,IN DWORD dwFlags)+{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+}
+/*
- @implemented
- */
+BOOL STDCALL +CreateSymbolicLinkA(IN LPCSTR lpSymlinkFileName,
IN LPCSTR lpTargetFileName,IN DWORD dwFlags)+{
- PWCHAR SymlinkW, TargetW;
- BOOL Ret;
- if(!lpSymlinkFileName || !lpTargetFileName)
- {
SetLastError(ERROR_INVALID_PARAMETER);return FALSE;- }
- if (!(SymlinkW = FilenameA2W(lpSymlinkFileName, FALSE)))
return FALSE;- if (!(TargetW = FilenameA2W(lpTargetFileName, TRUE)))
return FALSE;- Ret = CreateSymbolicLinkW(SymlinkW,
TargetW,dwFlags);- RtlFreeHeap(RtlGetProcessHeap(), 0, TargetW);
- return Ret;
+}
Does this leak SymlinkW ?
Thanks,
Joseph
Joseph Galbraith wrote:
Does this leak SymlinkW ?
No, SymLinkW just becomes a pointer to the static unicode string buffer in the Teb structure. It doesn't point to memory that was allocated dynamically.
Best Regards,
Thomas
Thomas Weidenmueller wrote:
Joseph Galbraith wrote:
Does this leak SymlinkW ?
No, SymLinkW just becomes a pointer to the static unicode string buffer in the Teb structure. It doesn't point to memory that was allocated dynamically.
Ahhh... thanks for the explanation. Pretty clever.
Thanks,
Joseph