check here
http://www.codeproject.com/csharp/dyninvok.asp
Cheers,
Greg
"Siegfried Heintze" <(E-Mail Removed)> wrote in message
news:uTH$(E-Mail Removed)...
> 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
>
>