I want to be able to call this function from shell32.dll: SHParseDisplayName
https://docs.microsoft.com/en-us/window ... isplayname
I'm trying it like this and the program crashes when I execute it
Code: Select all
Prototype.i ProtoSHParseDisplayName(pszName.p-unicode, *pbc, *ppidl, sfgaoIn.i, *psfgaoOut)
Define.i hShell32DLL
Define SHParseDisplayName.ProtoSHParseDisplayName
hShell32DLL = OpenLibrary(#PB_Any, "Shell32.dll")
If hShell32DLL
SHParseDisplayName.ProtoSHParseDisplayName = GetFunction(hShell32DLL, "SHParseDisplayName")
EndIf
Define *pidl.ITEMIDLIST
hResult = SHParseDisplayName("R:\test_folders\00001", 0, *pidl, 0, 0)
If hResult = #S_OK
Debug "OK!"
EndIf