You are a genius :)

The following code (while not elegent) works!
///////////////////////////////////////////////////////////////////////////////////////
        IntPtr lib1 = IntPtr.Zero;
        IntPtr lib2 = IntPtr.Zero;
        IntPtr lib3 = IntPtr.Zero;
        IntPtr lib4 = IntPtr.Zero;
        IntPtr lib5 = IntPtr.Zero;
        const string FbLibName5 = @"C:\Path\fbembed.dll";
        const string FbLibName4 = @"C:\Path\icuin30.dll";
        const string FbLibName3 = @"C:\Path\icuuc30.dll";
        const string FbLibName2 = @"C:\Path\ib_util.dll";
        const string FbLibName1 = @"C:\Path\icudt30.dll";
           
           
        [DllImport ("kernel32.dll")]
        private extern static IntPtr LoadLibrary(string fileName);
        [DllImport ("kernel32.dll")]
        private extern static bool FreeLibrary(IntPtr lib);

 
 
        private void Form1_Load(object sender, EventArgs e)
        {

            lib1 = LoadLibrary(FbLibName1);
            lib2 = LoadLibrary(FbLibName2);
            lib3 = LoadLibrary(FbLibName3);
            lib4 = LoadLibrary(FbLibName4);
            lib5 = LoadLibrary(FbLibName5);
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            FreeLibrary(lib5);
            FreeLibrary(lib4);
            FreeLibrary(lib3);
            FreeLibrary(lib2);
            FreeLibrary(lib1);
        }
///////////////////////////////////////////////////////////////////////////////////////


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to