hi,
I am new to win32asm, I tried to make a small program thet retrieves folder location from user and then,create a new folder
at location's path,
The problem is that i couldn't get the right path information from the 'Browse For Folder' dialog .I used the 'SHGetPathFromIDList'
function but yeilded wrong info.So, what is the problem?
Posted on 2001-10-29 12:03:11 by hosam_shahin
Sorry for the C code, but it works, and shouldn't be too bothersome
to convert to asm.



BROWSEINFO bi;
ITEMIDLIST *iil;

bi.hwndOwner = hwnd;
bi.pidlRoot = NULL;
bi.pszDisplayName = buf;
bi.lpszTitle = lang_string(1000);
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = NULL;
bi.lParam = NULL;
bi.iImage = 0;
iil = SHBrowseForFolder(&bi);
// check if iil==NULL, and handle error
SHGetPathFromIDList(iil, buf);
Posted on 2001-10-29 12:43:44 by f0dder
Do not forget to CoTaskMemFree() the PIDL handle from SHBrowseForFolder().
Posted on 2001-10-29 19:15:32 by comrade
hosam_shahin,

have a look in the MASM32 library for a function that is called "BrowseForFolder". It calls the dialog box you are after with the option of setting the text for both the title bar and the lower message.

The source code for it is available in the m32lib directory so you can see how its done as well.

Regards,

hutch@movsd.com
Posted on 2001-10-30 02:21:58 by hutch--

Do not forget to CoTaskMemFree() the PIDL handle from SHBrowseForFolder().

Thanks for that little bit, comrade - I hadn't even been thinking about this :(.
:stupid:
Posted on 2001-10-30 05:10:01 by f0dder
f0dder, thanx to you ..I did it!:alright:
Posted on 2001-10-30 16:35:40 by hosam_shahin