has anyone got a problem using a UDF dll written in C++ ?
with FW 1.0 and 1.1 it worked well with 2.0 i got problems.
if i use the dll on a linux SS server, then i got no problems at all.
if i use the dll on an embedded database (Firebird-1.5.3.4870-0_embed_win32), then
VC# 2005 Express gives me the error :
DLL '....\Debug\UDF\contractDataUDF.DLL' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
MS suggests to use "/noentry" in the linker and which also means to introduce a "main" to the dll. i tried that and the error does
not appear any more. the problem i got now, is that i cannot init any pointers any more.
before i was executing :
if ( NULL == pGlobalUserMap )
pGlobalUserMap = new TUserMap();
in DLLMain in case of DLL_PROCESS_ATTACH or DLL_THREAD_ATTACH.
now i check if the map is null just inside the function being called by the db (testing purposes) and it
just hangs on the "pGlobalUserMap = new TUserMap();" line. it just does not get
past it!!! tested it with messageBeep.
the source for the UDF is set up to be buildable by both win and linux and it worked before.
i do not know if it has anything to do with the NetProvider though, probably not..
has anyone got an idea ?
cu
Martin
using :
NetProvider 2.0 cvs from 21.01.05
Firebird-1.5.3.4870-0_embed_win32