Subject | Two separate embedded firebird servers in one app.exe without any conflict? |
---|---|
Author | ehaerim |
Post date | 2011-05-11T23:09:21Z |
Hi all Firebird lovers
I have an issue to resolve and need your help.
An existing application T.exe is installed with the following folder layout:
- C:\Here => T.exe's root folder. It uses an embedded firebird server files as shown below.
=> T.exe
=> fbclient.dll (its version is WI-V2.1.3.18185, but comparing it with original one from the firebird site, it is not identical. So this could be a privately modified/built dll.)
=> icudt30.dll (3.0.0.0)
=> icuin30.dll (3.0.0.0)
=> icuuc30.dll (3.0.0.0)
=> udf\tsfbudf.dll => T.exe's private version of fbudf.dll for the above presumably private fbclient.dll, I think
- C:\Here\Databases => T.exe stores its gdb files: A.gdb
- C:\Here\Plugins => T.exe requires to put my COM dll (X.dll) plugin here.
- C:\Here\Firebird => Another embedded firebird server which X.dll will load to create/save its own fdb file, B.fdb, into C:\Here\Databases folder.
T.exe will be loading X.dll and therefore two embedded firebird servers eventually : one for managing A.gdb and the other for managing B.fdb.
I need to make the two embedded firebird servers running smoothly and nicely without confliction.
Since I can't change T.exe's embedded firebird server setup, I will have to completely separate my own embedded firebird server.
So I decide to use C:\Here\Firebird for my own embedded firebird server setup as shown below:
C:\Here\Firebird\fbclient.dll
C:\Here\Firebird\ib_util.dll
C:\Here\Firebird\icudt30.dll
C:\Here\Firebird\icuin30.dll
C:\Here\Firebird\icuuc30.dll
C:\Here\Firebird\Microsoft.VC80.CRT.manifest
C:\Here\Firebird\msvcp80.dll
C:\Here\Firebird\msvcr80.dll
C:\Here\Firebird\aliases.conf
C:\Here\Firebird\firebird.conf
C:\Here\Firebird\firebird.msg
C:\Here\Firebird\IDPLicense.txt
C:\Here\Firebird\IPLicense.txt
C:\Here\Firebird\intl\fbintl.dll
C:\Here\Firebird\intl\fbintl.conf
C:\Here\Firebird\udf\fbudf.dll
C:\Here\Firebird\udf\ib_udf.dll
Next, when X.dll gets loaded by T.exe, it should load files from C:\Here\Firebird folder.
And I am lost from here and want you to confirm that I am doing right please.
First of all, I set an environment variable FIREBIRD for my embedded firebird server as follows:
const char* fbenv = getenv("FIREBIRD");
if (fbenv == NULL)
{
_putenv("FIREBIRD=C:\\Here\\Firebird");
}
else
{
/******
What if T.exe has already set it to point C:\Here for its own embedded firebird server?
Do we have to override it or not?
/******
}
Now will the two embedded firebird servers live together happily?
If not, please help me making them happily live together.
Please comment.
Best Regards
HaeRim
I have an issue to resolve and need your help.
An existing application T.exe is installed with the following folder layout:
- C:\Here => T.exe's root folder. It uses an embedded firebird server files as shown below.
=> T.exe
=> fbclient.dll (its version is WI-V2.1.3.18185, but comparing it with original one from the firebird site, it is not identical. So this could be a privately modified/built dll.)
=> icudt30.dll (3.0.0.0)
=> icuin30.dll (3.0.0.0)
=> icuuc30.dll (3.0.0.0)
=> udf\tsfbudf.dll => T.exe's private version of fbudf.dll for the above presumably private fbclient.dll, I think
- C:\Here\Databases => T.exe stores its gdb files: A.gdb
- C:\Here\Plugins => T.exe requires to put my COM dll (X.dll) plugin here.
- C:\Here\Firebird => Another embedded firebird server which X.dll will load to create/save its own fdb file, B.fdb, into C:\Here\Databases folder.
T.exe will be loading X.dll and therefore two embedded firebird servers eventually : one for managing A.gdb and the other for managing B.fdb.
I need to make the two embedded firebird servers running smoothly and nicely without confliction.
Since I can't change T.exe's embedded firebird server setup, I will have to completely separate my own embedded firebird server.
So I decide to use C:\Here\Firebird for my own embedded firebird server setup as shown below:
C:\Here\Firebird\fbclient.dll
C:\Here\Firebird\ib_util.dll
C:\Here\Firebird\icudt30.dll
C:\Here\Firebird\icuin30.dll
C:\Here\Firebird\icuuc30.dll
C:\Here\Firebird\Microsoft.VC80.CRT.manifest
C:\Here\Firebird\msvcp80.dll
C:\Here\Firebird\msvcr80.dll
C:\Here\Firebird\aliases.conf
C:\Here\Firebird\firebird.conf
C:\Here\Firebird\firebird.msg
C:\Here\Firebird\IDPLicense.txt
C:\Here\Firebird\IPLicense.txt
C:\Here\Firebird\intl\fbintl.dll
C:\Here\Firebird\intl\fbintl.conf
C:\Here\Firebird\udf\fbudf.dll
C:\Here\Firebird\udf\ib_udf.dll
Next, when X.dll gets loaded by T.exe, it should load files from C:\Here\Firebird folder.
And I am lost from here and want you to confirm that I am doing right please.
First of all, I set an environment variable FIREBIRD for my embedded firebird server as follows:
const char* fbenv = getenv("FIREBIRD");
if (fbenv == NULL)
{
_putenv("FIREBIRD=C:\\Here\\Firebird");
}
else
{
/******
What if T.exe has already set it to point C:\Here for its own embedded firebird server?
Do we have to override it or not?
/******
}
Now will the two embedded firebird servers live together happily?
If not, please help me making them happily live together.
Please comment.
Best Regards
HaeRim