View Full Version : GetSpecialFolder can set variable to garbage
NewsArchive
05-07-2005, 04:53 AM
Friedrich,
If you run the attached script on 9x the issue will be immediately apparent.
Here's what's happening.
Not taking specific shell versions into account myself (my bad), I learned
from a customer today that SB's GetSpecialFolder() was returning garbage for
CSIDL_COMMON_APPDATA on 9x. CSIDL_COMMON_APPDATA won't exist there, but the
trashed string threw me.
GetSpecialFolder() does not set %_SB_ERRORCODE% on failure, or success. So
I'm wondering if that is intentional, or an oversight.
--
Best regards,
Mark
NewsArchive
05-07-2005, 04:54 AM
Mark,
Up to now, this function did not return any error code. I have changed this
now.
- If the function succeeds, the %_SB_ERRORCODE% return value is nonzero.
- If the function fails, the return value is zero.
To use CSIDL_COMMON_APPDATA (0x0023), the target machine requires version
5.0 of the Shell or common controls dynamic-link libraries (DLLs). Version
5.0 of Shlwapi.dll is distributed with Internet Explorer 5.
Thanks,
Friedrich
--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910
NewsArchive
05-07-2005, 04:54 AM
Mark,
Documentation updated. It now outlines the different "Shell" DLL versions
and how they were distributed.
Friedrich
--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910
NewsArchive
05-09-2005, 10:43 AM
>Mark,
>
>Up to now, this function did not return any error code. I have changed this
>now.
>
>- If the function succeeds, the % SB ERRORCODE% return value is nonzero.
>- If the function fails, the return value is zero.
Thank you.
>To use CSIDL COMMON APPDATA (0x0023), the target machine requires version
>5.0 of the Shell or common controls dynamic-link libraries (DLLs). Version
>5.0 of Shlwapi.dll is distributed with Internet Explorer 5.
Yep, I wasn't checking. Interesting thing is that the customer's box had IE
6.0.2800.1106, and the box I tested on had a 6.x version. I'm looking forward
to getting away from 9x altogether.
I've used HKEY LOCAL MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version
Vector in the past. Have you got a built-in gadget for the shell, or IE,
version?
--
Best regards,
Mark
NewsArchive
05-09-2005, 10:43 AM
Mark,
I have added a new "Get System Information" function to receive the Internet
Explorer version number now.
Thanks,
Friedrich
--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910
NewsArchive
05-09-2005, 10:43 AM
>I have added a new "Get System Information" function to receive the Internet
>Explorer version number now.
Thank you, Friedrich.
--
Best regards,
Mark
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.