Bug #105
closedUsing vSHGetFolderPath vCSIDL_MYDOCUMENTS in Windows 10 does not return a result
0%
Description
The code:
Get vSHGetFolderPath vCSIDL_MYDOCUMENTS to sPath
No longer returns the "My Documents" folder using Windows 10 and DataFlex 19.
Is it possible that it no longer exists in Windows 10?
Updated by Wil van Antwerpen almost 8 years ago
The SHGetFolderPath has been deprecated for a while. However Windows lives by its backwards compatibility.
See:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762181%28v=vs.85%29.aspx
What does work for me is using vCSIDL_PERSONAL instead.
eg. see the following test program:
Use Windows.pkg
Use vWin32fh.pkg
Procedure TestMyDocuments
String sPath
Showln "start test"
Get vSHGetFolderPath vCSIDL_MYDOCUMENTS to sPath
Showln "vCSIDL_MYDOCUMENTS " sPath
Get vSHGetFolderPath vCSIDL_PERSONAL to sPath
Showln "vCSIDL_PERSONAL " sPath
End_Procedure
Send TestMyDocuments
Global_Variable String gsGlobVar
Winput "Click OK" gsGlobVar
Updated by Wil van Antwerpen almost 8 years ago
- Status changed from New to Closed