PC Review


Reply
Thread Tools Rate Thread

Calling C DLL in Web Service using LoadLibrary/GetProcAddress?

 
 
Siegfried Heintze
Guest
Posts: n/a
 
      25th Jun 2004
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


 
Reply With Quote
 
 
 
 
Greg Young
Guest
Posts: n/a
 
      25th Jun 2004
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
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can call a DLL function using GetProcAddress =?Utf-8?B?TWF1cmljaW8=?= Microsoft Dot NET Compact Framework 4 19th May 2005 11:50 AM
How to Call LoadLibrary/GetProcAddress? Siegfried Heintze Microsoft C# .NET 3 25th Jun 2004 08:04 PM
Calling a static method from within a C# windows service causes the service to hang? Microsoft C# .NET 3 15th Mar 2004 03:03 PM
Legacy clients with LoadLibrary calling services implemented in C# Skip Sailors Microsoft Dot NET Framework 8 10th Feb 2004 07:41 AM
ASP.Net equivalent for LoadLibrary/GetProcAddress Craig Dunstan Microsoft ASP .NET 1 27th Jan 2004 02:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:12 PM.