Calling C DLL in Web Service using LoadLibrary/GetProcAddress?

S

Siegfried Heintze

I have some C functions I need to expose as XML web services. My original
plan was to deply an XML Web service in C# or VB and use P/Invoke to call my
C functions. This is not working because the web service cannot find the DLL
in the same directory.

This is probably because the DLL needs to be in a different directory,
perhaps the same directory as ASP.NET or \WinNT\System32. Unfortunately,
placing my DLL in these directories is not an option because I'm using a
hosting service.

Since I'm not getting any response from my queries in the WebServices forum
I guess I need to take another approach.

I know how to explicitly specify the full path of a DLL when calling
LoadLibrary/GetProcAddress when using C++. Is it possible to call my C
functions in their DLL using VB with LoadLibrary/GetProcAddress? What does
GetProcAddress return, a delegate? How does VB.NET deal with function
pointers? Does anyone have some sample code where VB.NET uses
LoadLibrary/GetProcAddess?

Siegfried
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top