Hello.
> I'm using SQLite in my project that compiles by MSVC 6.0 in
> Windows XP. I've upgraded SQLite library from 3.7.8 to
> 3.7.10 and got a problem. Builds went fine, but when I was
> launching my application, I got memory fault. Application
> faulted on first call of sqlite3_open_v2() function. I
> tracked it down and found, that fault caused by call of
> osGetFullPathNameW() in winFullPathname(). By some reason
> pointer, that must point to GetFullPathNameW() was NULL. As
> I understand it is because SQLITE_OS_WINNT was defined as 0,
> because I haven't defined _WIN32_WINNT. I think that SQLite
> realized that there is no wide char support
> (SQLITE_WIN32_HAS_WIDE was not defined). I wonder is this
> correct? MSDN says, that GetFullPathNameW() is present since
> Windows 95, so i thought function GetFullPathNameW() can be
> used when _WIN32_WINNT is not defined. For now I've just
> defined _WIN32_WINNT as 0x500, but not sure is it correct,
> and will my application works if it will be launched under
> Windows 9X. Test case for reproducing problem is included.
> Just put sqlite3.c and sqlite3.h in same directory as
> included files test.c and makefile.vc and run nmake -f
> makefile.vc. After that just run test.exe.
Looks like attaches are not supported in this mailing list,
so I'm including files in message body:
makefile.vc:
;-----------------------------------X8
CC=cl
CFLAGS=/MD /DWIN32 /nologo /GX /GA /O2 /W3 /GF
BIN=test.exe
OBJ=test.obj sqlite3.obj
RM=del
RFLAGS=
all: $(BIN)
$(BIN): $(OBJ)
$(CC) $(CFLAGS) $(OBJ) /Fe$(BIN)
%.obj: %.c
$(CC) $(CFLAGS) /c $<
clean:
-$(RM) $(RFLAGS) $(BIN) 2>nul
-$(RM) $(RFLAGS) $(OBJ) 2>nul
;-----------------------------------X8
test.c:
;-----------------------------------X8
#include <stdio.h>
#include "sqlite3.h"
int main(int argc, char* argv[])
{ int rez = 0;
sqlite3* ss_pdb = NULL;
rez = sqlite3_open_v2("base", &ss_pdb, SQLITE_OPEN_READWRITE |
SQLITE_OPEN_CREATE, NULL);
return rez;
}
;-----------------------------------X8
--
WBR,
darkelf mailto:[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users