28.10.2015 10:36, Arno Brinkman wrote:
Hi,
Latest snapshot build Firebird-3.0.0.32134-0_Win32.zip using the
fbclient.dll
Still 500ms for unloading the fbclient.dll :-(
I can't reproduce it. How did you measure unload delay ?
Regards,
Vlad
PS I've attached source code of my tiny test program
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include "interface.h"
using namespace Firebird;
//extern "C" IMaster* ISC_EXPORT fb_get_master_interface();
HMODULE hDll;
IMaster* loadFbCLient()
{
IMaster* master = NULL;
hDll = LoadLibrary("fbclient.dll");
typedef IMaster* (ISC_EXPORT *pGetMaster) ();
pGetMaster fb_get_master = (pGetMaster) GetProcAddress(hDll,
"fb_get_master_interface");
master = (*fb_get_master)();
int ver = master->getUtilInterface()->getClientVersion();
printf("\nLoaded client version: %d.%d\n", ver / 256, ver % 256);
return master;
}
class PrintVersion :
public IVersionCallbackImpl<PrintVersion, CheckStatusWrapper>
{
public:
// IVersionCallback implementation
void callback(CheckStatusWrapper*, const char* text)
{
printf("%s\n", text);
}
};
int main(int argc, char *argv[])
{
char* db = NULL;
if (argc == 2)
db = argv[1];
SetEnvironmentVariable("ISC_USER", "SYSDBA");
SetEnvironmentVariable("ISC_PASSWORD", "masterkey");
IMaster* master = loadFbCLient();
DWORD t0 = 0;
if (db)
{
PrintVersion printVersion;
ThrowStatusWrapper status(master->getStatus());
IProvider* provider = master->getDispatcher();
IUtil* utilities = master->getUtilInterface();
try
{
IAttachment* att = provider->attachDatabase(&status,
db, 0, NULL);
utilities->getFbVersion(&status, att, &printVersion);
att->detach(&status);
}
catch (Firebird::FbException& ex)
{
char err[1024];
utilities->formatStatus(err, sizeof(err),
ex.getStatus());
printf(err);
}
t0 = GetTickCount();
provider->shutdown(&status, 0, fb_shutrsn_app_stopped);
provider->release();
}
else
{
t0 = GetTickCount();
}
FreeLibrary(hDll);
DWORD dt = GetTickCount() - t0;
printf("\nUnload time: %d ms\n", dt);
return 0;
}
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel