Hi,

I've coded a little library to use as an interface to SQLite. It works perfectly in Windows 98, but they've reported problems on Windows 2000. Has anyone a clue on what the problem may be? I've already tried aligning code to 16 bytes, string data to 4 and bss to 4.

These are the APIs I use, all from Kernel32.dll, at least in Windows 98 (using Nasm):

Extern _LoadLibraryA@4
Extern _GetProcAddress@8
Extern _HeapReAlloc@16
Extern _HeapCreate@12
Extern _HeapAlloc@12
Extern _HeapFree@12
Extern _HeapDestroy@4
Extern _GetLastError@0
Extern _FormatMessageA@28

I've searched the forums without success. Any help, please?
Posted on 2003-03-11 08:49:40 by El_Choni
you've not given any information to go on...So all I can suggest is check for register preservation(ebx edi esi etc)
Posted on 2003-03-11 09:57:29 by MArtial_Code
And remember, it's caller vs. callee

Caller (before and after calling): save EAX, ECX, EDX if necessary

Callee (on entry and before return): save EBX, ESI, EDI if necessary, and EBP if it's not used in the standard way (as a stack frame pointer).

The other possibility is the need to align the STACK to DWORD (4) boundary.
Posted on 2003-03-11 15:24:12 by tenkey