rexx Posted September 10, 2009 Posted September 10, 2009 Hi, I use the following code to get icon for a path Local $tSHFILEINFO = DllStructCreate("ptr;int;dword;char[260];char[80]") Local $aDllRet = DllCall("shell32.dll", "ptr", "SHGetFileInfo", "str", $sFile, "dword", 0x80, "ptr", DllStructGetPtr($tSHFILEINFO), "int", DllStructGetSize($tSHFILEINFO), "int", 0x1000) Local $sIconFile = DllStructGetData($tSHFILEINFO, 4) Local $nIconNumber = DllStructGetData($tSHFILEINFO, 2) But if the $sFile contains unicode chars then it goes wrong. I've search the SHGetFileInfo() on MSDN, and it should support unicode. so where's the problem?
trancexx Posted September 10, 2009 Posted September 10, 2009 You are calling the wrong function. It should be "SHGetFileInfoW" (and "wstr"). ♡♡♡ . eMyvnE
rexx Posted September 10, 2009 Author Posted September 10, 2009 Thanks!You are calling the wrong function. It should be "SHGetFileInfoW" (and "wstr").
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now