Hello,
Thanks for your post. As I understand, you want to load a managed C#
service from a legacy clients by calling LoadLibrary. Please correct me if
there is any misunderstanding. I'd like to share the following information
with you:
We are not able to export function from managed program, because it
requires a valid consistent function to call into which .NET Framework does
not support. Managed code has no concept of a consistent value for a
function pointer because these function pointers are proxies that are built
dynamically.
To work around the problem you should use COM Interop to call .NET
Component from unmanged application. Please refer to the following articles
and sample:
COM Interop Sample: COM Client and .NET Server
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconcominteropsamplecomclientnetserver.asp
COM Interoperability in Visual Basic and Visual C#
http://msdn.microsoft.com/library/de...us/vbcon/html/
vbconcominteropinvisualbasicvisualc.asp
I look forward to your feedback.
Have a nice day!
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! --
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.