Jump to content

Recommended Posts

Posted

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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...