> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 07, 2006 7:30 AM > To: Sqlite-users > Subject: [sqlite] DLLs containing user-defined SQL functions > [snip] > Another way to ask the question is this: How do I build > a DLL in windows that can call routines contained in the > main program that attached the DLL using LoadLibrary()?
The main executable would have to export the function through a .DEF file, and your DLL would have to get the pointer to the function through GetProcAddress() as follows: proc = GetProcAddress(GetModuleHandle(NULL), "exe_exported_func_name");