Anyone has some source code, wich shows the use of this API (just can't get it work) thanx in advance, bAZiK
Posted on 2001-06-16 05:42:00 by bAZiK.
Hello bAzik, You can find a good example at Iczelion's source code page. Here is a direct link to the exaple: http://win32asm.rxsp.com/files/BrowseF.asm titanium
Posted on 2001-06-16 06:18:00 by titanium
bAZiK, The code you are after is already done in the MASM32 library, you can either use it as it is or use it as an example to write your own. Regards, hutch@pbq.com.au
Posted on 2001-06-16 06:44:00 by hutch--
Here's a snippet I used ('converted' from c++, works fine for me, TASM specific).

BrowseFolder PROC USES ebx, hwndOwn: DWORD, lpDir: DWORD, lpDlgTitle: DWORD
        LOCAL   bi: BROWSEINFO
        LOCAL   pMalloc, pidl: DWORD
        CALL    OleInitialize,0
        lea     eax,pMalloc
        CALL    SHGetMalloc,eax
        test    eax,eax
        jnz     @BrowseFolderFail
        mov     eax,hwndOwn
        mov     bi.bhwndOwner,eax
        xor     eax,eax
        mov     bi.pidlRoot,eax
        mov     bi.lpfn,eax
        mov     bi.blParam,eax
        mov     eax,lpDir
        mov     bi.pszDisplayName,eax
        mov     eax,lpDlgTitle
        mov     bi.lpszTitle,eax
        mov     bi.ulFlags,BIF_RETURNONLYFSDIRS
        lea     eax,bi
        CALL    SHBrowseForFolderA,eax
        test    eax,eax
        jz      @BrowseFolderFail
        mov     pidl,eax
        CALL    SHGetPathFromIDList,eax,lpDir
        test    eax,eax
        jz      @BroseFolderFailFree
        mov     ebx,pMalloc
        mov     eax,
        CALL    ,pMalloc,pidl  ;.free
        mov     eax,
        CALL    ,pMalloc       ;.release
        or      eax,1
        ret
@BroseFolderFailFree:
        mov     ebx,pMalloc
        mov     eax,
        CALL    ,pMalloc,pidl  ;.free
        mov     eax,
        CALL    ,pMalloc       ;.release
@BrowseFolderFail:
        xor     eax,eax
        ret
BrowseFolder ENDP
Posted on 2001-06-16 11:33:00 by Tola
Thanx all! @hutch: The "BrowseForFolder" function wasn't in the masm32.lib/Inc. But after runing "rebuild.bat" in the MASM root dir, it works perfectly :) @Tola, Schön dich hier zu sehen :D regards bAZiK
Posted on 2001-06-16 12:05:00 by bAZiK.