accessing string values
Posted: Fri Aug 07, 2009 2:16 pm
by Kern Carboni >> Fri, 9 Jul 1999 1:16:57 GMT
I am trying to use the SHBrowseForFolderA and SHGetPathFromIDList
Windows api functions to create a directory browsing/selection dialog box.
The SHGetPathFromIDList takes two parameters, the most important being a pointer to a string variable ,directoryName, which stores the selected directory path.
directoryFound := call extractPath(idList,directoryName.bufferAddress);
After calling the above external function in the debugger, I inspect directoryName which reveals it to have the expected value ie "C:\Interface\Extract".
However I cannot seem to assign the value stored in directoryName to any variable,attribute etc as they always show up as null.
Is this due to Windows returning strings in a format unrecognisable by Jade ie null terminated strings.
I noticed that version 4.1 includes the unpackCString method and was wondering
a) if this would solve my problem,
b) if anyone knew what the unpackCString method does as I would need to implement my own version in 4.016 due to the fact that,
after upgrading through to 4.202, any external function calls to shell32.dll resulted in bringing Jade to its knees, coughing and spluttering.
(reminiscent of an All Black loose forward, after Saturday...8-} )
Any help/answers greatly appreciated
Kern
I am trying to use the SHBrowseForFolderA and SHGetPathFromIDList
Windows api functions to create a directory browsing/selection dialog box.
The SHGetPathFromIDList takes two parameters, the most important being a pointer to a string variable ,directoryName, which stores the selected directory path.
directoryFound := call extractPath(idList,directoryName.bufferAddress);
After calling the above external function in the debugger, I inspect directoryName which reveals it to have the expected value ie "C:\Interface\Extract".
However I cannot seem to assign the value stored in directoryName to any variable,attribute etc as they always show up as null.
Is this due to Windows returning strings in a format unrecognisable by Jade ie null terminated strings.
I noticed that version 4.1 includes the unpackCString method and was wondering
a) if this would solve my problem,
b) if anyone knew what the unpackCString method does as I would need to implement my own version in 4.016 due to the fact that,
after upgrading through to 4.202, any external function calls to shell32.dll resulted in bringing Jade to its knees, coughing and spluttering.
(reminiscent of an All Black loose forward, after Saturday...8-} )
Any help/answers greatly appreciated
Kern