Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading REG_BINARY value with native language characters
I failed to read with correct native language characters a binary  value in a REG_BINARY registry entry. Any advice is mostly welcome. Here is the code :

Function tempf08
Copy      Help
str sval snam s svalm
str skey
skey.from("Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSavePidlMRU\" "*")
int i
i=rget(svalm snam skey 0 "" REG_BINARY)
out i
int ib=0
byte b
out s
i=rget(sval s skey 0 "" REG_BINARY)
out i
out sval
It is not string. Looks like ITEMIDLIST.
Macro Macro2972
Copy      Help
word* w
int hr=SHGetNameFromIDList(+sval SIGDN_FILESYSPATH &w)
if(hr) end ES_FAILED 0 hr
;outb w 10 1
CoTaskMemFree w
out s
Thank you! However, I am still in need of advice regarding "SHGetNameFromIDList" . Where can I find it? Does it have to be - somehow - incorporated in QM?
It is a Windows API function, added in Windows Vista. For XP need more code, call several API functions: SHBindToParent, GetDisplayNameOf, StrRetToStrW, CoTaskMemFree.
Thank you. But I am running Win-10, I cannot understand why SHGetNameFromIDList is not recognised as API and it gives error. However, it worked - hopefully correct - when I used "WINAPIV.SHGetNameFromIDList". Best regards.

Forum Jump:

Users browsing this thread: 1 Guest(s)