Hi, I read the past thread on TryEnterCriticalSection() compilation. I
wonder whether it couldn't be included in SQLite sources as follows:
BOOL (WINAPI *TryEnterCriticalSection)(
LPCRITICAL_SECTION lpCriticalSection
);
SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){
if (!TryEnterCriticalSection)
{
TryEnterCriticalSection = GetProcAddress(
LoadLibraryA("kernel32.dll"), "TryEnterCriticalSection");
}
if (!TryEnterCriticalSection)
return SQLITE_BUSY;
else
{
// .. the standard sqlite3_mutex_try() follows here...
}
}
The initialization code could certainly be moved to SQLite initialization.
This way, it would work fine under any Windows version.
Jiri
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------