views:

14

answers:

0

Hi,

i am not a windows programmer so maybe (i hope) this question is ridiculous for a windows-veteran java programmer. I would like to use windows' native folder browser dialog from within a java application. I actually succeeded in invoking the SHBrowseForFolder dialog which is nice - the problem i am now facing is: How do i extract the full path of the chosen folder from the returned value? The dialog returns a PIDLIST_ABSOLUTE which seems to be a pointer to some item list. There is another function, SHGetPathFromIDList, that accepts exactly this structure and returns the path as a string. So far so good. Unfortunately i just can't figure out how to correctly pass the value returned by the dialog to this function. I think i'd need to pass a Pointer to the structure but there does not seem to be a possibility to create a JNative Pointer to an already existing structure? Any help would be highly appreciated (and i can, of course, provide all the relevant code if needed).

cheers, Marc