return TEST_ERR_MAJOR_BAD;
}
- /* On Windows libcurl global init/cleanup calls LoadLibrary/FreeLibrary for
- secur32.dll and iphlpapi.dll. Here we load them beforehand so that when
- libcurl calls LoadLibrary/FreeLibrary it only increases/decreases the
- library's refcount rather than actually loading/unloading the library,
- which would affect the test runtime. */
- (void)win32_load_system_library(TEXT("secur32.dll"));
- (void)win32_load_system_library(TEXT("iphlpapi.dll"));
-
for(i = 0; i < tid_count; i++) {
curl_win_thread_handle_t th;
results[i] = CURL_LAST; /* initialize with invalid value */
(double)(newer.tv_usec-older.tv_usec)/1000000.0;
return (double)(newer.tv_usec-older.tv_usec)/1000000.0;
}
-
-#ifdef _WIN32
-HMODULE win32_load_system_library(const TCHAR *filename)
-{
-#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
- (void)filename;
- return NULL;
-#else
- size_t filenamelen = _tcslen(filename);
- size_t systemdirlen = GetSystemDirectory(NULL, 0);
- size_t written;
- TCHAR *path;
- HMODULE module;
-
- if(!filenamelen || filenamelen > 32768 ||
- !systemdirlen || systemdirlen > 32768)
- return NULL;
-
- /* systemdirlen includes null character */
- path = malloc(sizeof(TCHAR) * (systemdirlen + 1 + filenamelen));
- if(!path)
- return NULL;
-
- /* if written >= systemdirlen then nothing was written */
- written = GetSystemDirectory(path, (unsigned int)systemdirlen);
- if(!written || written >= systemdirlen) {
- free(path);
- return NULL;
- }
-
- if(path[written - 1] != _T('\\'))
- path[written++] = _T('\\');
-
- _tcscpy(path + written, filename);
-
- module = LoadLibrary(path);
-
- free(path);
-
- return module;
-#endif
-}
-#endif
*/
double tutil_tvdiff_secs(struct timeval t1, struct timeval t2);
-#ifdef _WIN32
-HMODULE win32_load_system_library(const TCHAR *filename);
-#endif
-
#endif /* HEADER_CURL_LIBTEST_TESTUTIL_H */