|
-
Nov 25th, 2013, 05:12 AM
#1
Thread Starter
Addicted Member
[RESOLVED] How to pass a byte array to SHGetPathFromIDList
Hi folks,
I need to change a call to SHGetPathFromIDList so that I get folders with Unicode names – That is using a byte array instead of a string.
The old call using a string for the folder was..
PathID = SHBrowseForFolder(bInf)
Fldr = Space$(512)
RetVal = SHGetPathFromIDList(ByVal PathID, ByVal Fldr)
CoTaskMemFree PathID
And Never had a problem - ie there’s no problem with my declarations or SHbrowseforfolder call
My new call uses a byte array (FldrB) instead of string Fldr…..
PathID = SHBrowseForFolder(bInf)
ReDim FldrB(512)
RetVal = SHGetPathFromIDList(ByVal PathID, ByVal FldrB(0))
CoTaskMemFree PathID
The FldrB array does not receive the path.
I’ve tried several variations like By Ref FldrB(0) and varptr (FldrB(0)) but I still do not get the path in the byte array
What’s the correct way to do this?
Thanks in advance.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|