发新话题
打印

[转载]DLLImport with dynamically bound native DLLs using Reflection

[转载]DLLImport with dynamically bound native DLLs using Reflection

DLLImport with dynamically bound native DLLs using Reflection

信息来源:邪恶八进制信息安全团队(www.eviloctal.com

Introduction
The idea for this article emerged from a failed attempt at solving a problem using an embedded Firebird database with ASP.NET. There is a great article on CodeProject on Embedded Firebird by Dan Letecky, but it is not a prerequisite for this article.

Background
The Firebird ADO.NET Provider communicates with Firebird native DLL's. While using the embedded version, it communicates through API with 'fbembed.dll' which should be located in the bin directory of your application. ASP.NET web application assemblies, when run, get transferred to the "temporary ASP.NET files" directory. For instance:

'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\webapplication1\946ca3d2\5cefcc750'

The 'fbembed.dll' DLL isn't a .NET assembly; it's a native DLL and therefore isn't copied to that directory. So after doing exhaustive Googling I came upon a code sample by Mattias Sj
Delphiscn Blog
http://blog.csdn.net/delphiscn

TOP

发新话题