Originally posted by: Reino Baptista
No comments besides Page Title
ReplyOriginally posted by: Yangghi Min
When using the alternative, call NewSHGetSpecialFolderPath()
BOOL NewSHGetSpecialFolderPath(HWND hWndOwner, int nFolder, LPTSTR pszPath)
__try
// Get the PIDL to be used as the starting point in the browse dialog
bOk = SHGetPathFromIDList(pIDL, pszPath);
An example of alternative function to replace SHGetSpecialFolderParh().
instead of the original one, with appropriate paramter adjustment like below;
SHGetSpecialFolderPath(hWnd, szPath, nFolder, bCreate)
=> NewSHGetSpecialFolderPath(hWnd, nFolder, szPath)
{
LPITEMIDLIST pIDL = NULL;
LPMALLOC pMalloc = NULL;
BOOL bOk = FALSE;
{
// Get the Shell memory allocator object
// It's required to free memory allocated by the shell
if (FAILED(SHGetMalloc (&pMalloc)))
__leave;
if (FAILED (SHGetSpecialFolderLocation (hWndOwner, nFolder, &pIDL)))
__leave;
}
__finally
{
if( pMalloc )
{
if (pIDL)
pMalloc->Free(pIDL);
pMalloc->Release();
}
}
return bOk;
}
Originally posted by: Brigham W. Thorp
As I stated in the article, I tested this under Windows 98 with IE 4.01 installed. I had someone I work with who runs NT 4.0 with SP3 installed try it and it hung.
First of all, MSDN states that to use SHGetSpecialFolderPath, you must have Version 4.71 and later of shell32.dll. The following quick info is shown for SHGetSpecialFolderPath:
Windows NT: Requires version 5.0 or later (or version 4.0 with Internet Explorer 4.0 or later).
Windows: Requires Windows 98 (or Windows 95 with Internet Explorer 4.0 or later).
So, it should work. Is there anyone who has NT that could offer a suggestion???
Brigg Thorp
ReplyOriginally posted by: Mark
I cannot get your program to work.
both the included exe and by building
it myself. i get the error,
The procedure entry point ShGetSpecialFolderPathA
could not be located in dynamic link library shell32.dll
I am using winnt4.0 service pack3 with newest ie4 dlls.
Everything compiles ok. it just dies when i try to run it.
Regards,
Mark