...
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/default.asp?url=/library/en-us/cpguide/htm
l/cpconcominteropsamplecomclientnetserver.asp
COM Interoperability in Visual Basic and Visual C#
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbconcominteropinvisualbasicvisualc.asp
...