Christian,

Here is a class I use.

Marv
//////////////////////////////////////////////////////////////////////////
public class TLoadEmbeded
    {
        private string FPath;
        public string DBPath
        {
            get { return FPath; }
        }
        public TLoadEmbeded(string path)
        {
            Load(path);
            FPath = path;
        }
        ~TLoadEmbeded()
        {
            Close();
        }
        private string fbPath = string.Empty;
        IntPtr lib1 = IntPtr.Zero;
        IntPtr lib2 = IntPtr.Zero;
        IntPtr lib3 = IntPtr.Zero;
        IntPtr lib4 = IntPtr.Zero;
        IntPtr lib5 = IntPtr.Zero;
        [DllImport("kernel32.dll")]
        private extern static IntPtr LoadLibrary(string fileName);
        [DllImport("kernel32.dll")]
        private extern static bool FreeLibrary(IntPtr lib);
        private void Load(string fbPath)
        {
            lib1 = LoadLibrary(fbPath + @"\icudt30.dll");
            lib2 = LoadLibrary(fbPath + @"\ib_util.dll");
            lib3 = LoadLibrary(fbPath + @"\icuuc30.dll");
            lib4 = LoadLibrary(fbPath + @"\icuin30.dll");
            lib5 = LoadLibrary(fbPath + @"\fbembed.dll");
        }
        public void Close()
        {
            if (lib5 != IntPtr.Zero)
                FreeLibrary(lib5);
            if (lib4 != IntPtr.Zero)
                FreeLibrary(lib4);
            if (lib3 != IntPtr.Zero)
                FreeLibrary(lib3);
            if (lib2 != IntPtr.Zero)
                FreeLibrary(lib2);
            if (lib1 != IntPtr.Zero)
                FreeLibrary(lib1);
            lib1 = IntPtr.Zero;
            lib2 = IntPtr.Zero;
            lib3 = IntPtr.Zero;
            lib4 = IntPtr.Zero;
            lib5 = IntPtr.Zero;
        }
    }

//////////////////////////////////////////////////////////////////////////////////////////////////

On 10/24/06, Christian Waldmann <[EMAIL PROTECTED]> wrote:
Hi all

I can use the embedded server from Visual Studio 2005 with C#  only if I
copy the DLL to the System32 directory.
Is there a place where I can configure the location of the fbembed.dll?

The application finds it if the dll is in application dir.

Thanks

Christian Waldmann



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to