Hello, Joe.

You wrote Wednesday, January 18, 2012, 15:15:36:

>> As I understand if I'm not defining  _WIN32_WINNT, I'm
>> compiling for  Windows 9X

> If you do not define _WIN32_WINNT, the resulting DLL will only
> work (in theory) on Windows 9x.  However, this support has not
> been tested recently.

>> But  when  I  run  that executable in Windows XP, runtime
>> check  isNT()  found  that  it  is Windows NT based system,
>> so it  tried  to call osGetFullPathNameW() instead
>> osGetFullPathNameA().

> Right, that will not work.  When running on Windows XP, SQLite
> expects and requires the Unicode APIs to be available and they
> will not be available unless the _WIN32_WINNT macro is properly
> defined.

Thank you for reply. Why to do runtime check then? Why don't
simply put:

#if defined(_WIN32_WINNT) || defined (SQLITE_OS_WINCE)

call to osGetFullPathNameW()

#else //Win 9X

call to osGetFullPathNameA()

#endif

So,   if  SQLite  compiled  for  Windows  9X  (i.e.  without
_WIN32_WINNT)  it  will  call  osGetFullPathNameA()  despite
where  it  actually  launched.

I  think  previous version of SQLite done this much better -
despite how it was compiled if runtime check says that it is
Windows NT, then it call GetFullPathNameW().

-- 
WBR,
 darkelf                          mailto:dark...@ukr.net

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to