Groups | Blog | Home
all groups > c# > august 2004 >

c# : Need to call a C# DLL from WINAPI DLL


John Hann
8/20/2004 11:17:56 PM
I'm trying to extend the version of IAS server included in Windows
Server 2003 with a custom DLL. IAS, unfortunately, insists on loading
Extension DLLs with the Win32 LoadLibrary() function, which means that
wrapping my DLL with COM or .Net is not supported. So, I'm wondering if
there is a good way to call a C# method from an old school WINAPI DLL
function. Any help would be greatly appreciated.
Thanks,
Scott Allen
8/21/2004 11:18:03 AM
Hi John:

Two ideas:
You could write some managed C++, or you could write a COM component
in C# that's callable from unmanaged code.

See:
COM Interop Part 2: C# Server Tutorial
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkCOMInteropPart2CServerTutorial.asp

HTH,
--
Scott
http://www.OdeToCode.com

On Fri, 20 Aug 2004 23:17:56 -0700, John Hann
[quoted text, click to view]
AddThis Social Bookmark Button