473,387 Members | 3,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Need to call a C# DLL from WINAPI DLL

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,
John
Nov 16 '05 #1
1 2946
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/de...erTutorial.asp

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

On Fri, 20 Aug 2004 23:17:56 -0700, John Hann
<jovinhan@SPAM_FREEyahoo.com> wrote:
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,
John


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Patrick Blackman | last post by:
Need example of using WinAPI "CreateWindowEx" in c# any help would be appreciated.
6
by: Minfu Lu | last post by:
I got problems with the WinAPI call OleCreatePictureIndirect() in C#. Has anybody ever used this function call in C#? Thanks, Minfu
2
by: Sin | last post by:
Hello everyone, I'm totally stumped at how little info I can find in MSDN or on the web concerning this. It's almost as if only microsoft personel hold the key to these secrets or something!!! ...
5
by: Eric BOUXIROT | last post by:
hi all !!! i need to call this API : FTD2XX_API FT_STATUS WINAPI FT_ListDevices(PVOID pArg1,PVOID pArg2,DWORD Flags) i have a sample code in C++ that work fine... > FTD2XX_API FT_STATUS...
5
by: SamSpade | last post by:
Is what I have below anywhere near correct? Will DirectCast do a QueryInterface? Would you do it differently? Thanks for any help
2
by: Marek | last post by:
Hi I'm trying to call a native C++ dll using the following code (both C# and C++ code segments included). When I make the call to the method (AddTwoDoubles) that has no return value all is fine. ...
4
by: saish | last post by:
Hello Need your help, I have a C++ win32 dll which takes xml document type by reference. I need to call this dll from c# .net. I tried using DllImport, but dll funtion when call does not...
6
by: ppuniversal | last post by:
I am facing a problem: I have say 3 files : ABC.h ----- this file has the function prototypes ABC.cpp ------ the definitions of the functions ABC_Test.cpp ------- the file with main()...
4
by: philipqiu | last post by:
hi I want to call unmanaged functions that are implemented in a dll. The problem is about the method return values. for example #include "stdafx.h" typedef struct toOut { int (WINAPI*...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.