Writing FolderPath as bytearray to Registry under OpenSavePidlMRU\* RRS feed

  • Question

  • Hi,

    I already found out to how to get the folderpath out of the binary data of the RegValues under OpenSavePidlMRU\* by calling SHGetPathFromIDListW() passing the bytearray and a StringBuilder instance.

    But what is the way back ?

    Having the folderpath as String, I need to convert it somehow to the bytearray, which is then written to the RegValue in binary format.

    What I found are the two functions SHIDCreateFromPath and SHSimpleIDListFromPath.

    Both returns a pointer to an IDLISTITEM.

    But how do I get the necessary bytearray which I can write to RegValue ?

    Are there other functions in shell32.dll to convert the pathstring to a bytearray in the right registryformat ?

    Friday, September 28, 2012 10:42 AM