2010/6/24 Paul Chitescu <[email protected]>: > 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? -- Nicolas Le Cam
