Quote Originally Posted by fafalone View Post
If you want to play around with it, it goes like this:

Public Declare Function RtlDosPathNameToNtPathName_U Lib "ntdll" (ByVal DosFileName As Long, NtFileName As UNICODE_STRING, FilePart As Long, RelativeName As Any) As Boolean
in FindFirstFile
Code:
    Dim strUnicode As UNICODE_STRING
    Dim fp As Long, rn As Long
    strFolder = "\??\"
    strFolder = strFolder & strDirectory
    RtlDosPathNameToNtPathName_U StrPtr(strFolder), strUnicode, fp, rn
Edit: That replaces the RtlInitUnicodeString call; don't call both.
Thanks!

But I'm puzzled. I thought that the RtlDosPathNameToNtPathName() function took a DOS path name and converted it to an NT name. If so, why are you manually prepending it with "\??\"? I thought that this is what the function would do?