Hi!
What would be the best way of testing MSVCRT.DLL considering that many functions may or may be not present in the native version?
/*********************************************************************
getenv_s - not exported in native msvcrt
- */
+int CDECL getenv_s(size_t *size, char *buffer, size_t bufLen, const char
*name
Both getenv_s and _wgetenv_s are exported in native msvcrt.
In older versions of MSVCRT.DLL (XP and earlier, no idea about Vista) these functions are not exported. They were added first in Visual Studio 2005 (MSVCRT80.DLL) and somehow made they way back in MSVCRT.
Using LoadLibrary / GetProcAddress would fail on all older Windows platforms.
It would be possible to test MSVCR80 instead but that may not be installed on the tested system.
Any thoughts?
Paul Chitescu
2010/6/24 Paul Chitescu paulc@voip.null.ro:
Hi!
What would be the best way of testing MSVCRT.DLL considering that many functions may or may be not present in the native version?
/*********************************************************************
- getenv_s - not exported in native msvcrt
- */
+int CDECL getenv_s(size_t *size, char *buffer, size_t bufLen, const char
*name
Both getenv_s and _wgetenv_s are exported in native msvcrt.
In older versions of MSVCRT.DLL (XP and earlier, no idea about Vista) these functions are not exported. They were added first in Visual Studio 2005 (MSVCRT80.DLL) and somehow made they way back in MSVCRT.
Using LoadLibrary / GetProcAddress would fail on all older Windows platforms.
It would be possible to test MSVCR80 instead but that may not be installed on the tested system.
Any thoughts?
Paul Chitescu
What about loading msvcrt, fallback on loading msvcrt80 and win_skip if you can't find them in both libraries?
On 06/24/10 10:49, Paul Chitescu wrote:
Hi!
What would be the best way of testing MSVCRT.DLL considering that many functions may or may be not present in the native version?
There are already such tests in msvcrt. Take a look on e.g. dlls/msvcrt/tests/misc.c. It's working well on older systems.
There are already tests of msvcr90. MsvcrXX specific tests should go there (unless the function is not present there).
On Thursday 24 June 2010 12:14:34 pm Piotr Caban wrote:
On 06/24/10 10:49, Paul Chitescu wrote:
Hi!
What would be the best way of testing MSVCRT.DLL considering that many functions may or may be not present in the native version?
There are already such tests in msvcrt. Take a look on e.g. dlls/msvcrt/tests/misc.c. It's working well on older systems.
There are already tests of msvcr90. MsvcrXX specific tests should go there (unless the function is not present there).
The problem is that these functions will be available: - on Wine in MSVCRT and MSVCRxx >= 80 - on Windows XP only in MSVCRxx >= 80 (if installed) - on Windows 7 in MSVCRT and MSVCRxx >= 80 (if installed) - no idea about Vista and other intermediate versions, service packs, etc.
What should the test do and where should it be located? In msvcrt/tests ? Or in msvcr90/tests ? Or create a msvcr80/tests ? Or...?
Would it be acceptable to test the functions only if available in msvcrt.dll ?
If the functions are not present should the code in msvcrt/tests attempt to load msvcr80 or msvcr90 or...?
What do you think?
Paul