From d88b5f9b27c3ebca45ce026d0b6188b5ad565a66 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Mon, 16 Sep 2013 18:48:21 +0000 Subject: SetDllDirectory: do no choke on NT or 98SE with KernelEx NT API (James Blough) --- src/htsmodules.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/htsmodules.c b/src/htsmodules.c index 1e971eb..921c598 100644 --- a/src/htsmodules.c +++ b/src/htsmodules.c @@ -250,7 +250,12 @@ void htspe_init(void) { "If this parameter is an empty string (""), the call removes the current directory from the default DLL search order" */ if (!SetDllDirectory("")) { - assertf(!"SetDllDirectory failed"); + const DWORD dwVersion = GetVersion(); + const DWORD dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion))); + /* Do no choke on NT or 98SE with KernelEx NT API (James Blough) */ + if (dwMajorVersion >= 5) { + assertf(!"SetDllDirectory failed"); + } } #endif -- cgit v1.2.3