Load .NET DLL in C???

G

George

Hi all.
I have developed a webservice and made a proxy class to access this
webservice.
I have a program in C (using WIN32 Api functions) and wanna access the
webservice from it.


Any idea of how to do so? Is it possible if converting the .NET DLL from
assembly to code for a specific machine?


TA


Happy new year!!!!!


--
Saludos a todos
#
# Contra el canon de los CD's
# que ahora no haya protecciones ni multas
#
 
S

Steve Waggoner

I have developed a webservice and made a proxy class to access this
webservice.
I have a program in C (using WIN32 Api functions) and wanna access the
webservice from it.


Any idea of how to do so? Is it possible if converting the .NET DLL from
assembly to code for a specific machine?

I would write a Managed C++ wrapper DLL around the proxy .NET DLL
that exposes a straight C API. It the one thing Managed C++ seems good for.
 
G

George

I would write a Managed C++ wrapper DLL around the proxy .NET DLL
that exposes a straight C API. It the one thing Managed C++ seems
good for.

Thanx I think that would probably solve my problem.

However the second question is still in the air. Mattias suggests using
the ngen, but this only includes the specific machine code in the global
assembly cache or sth like that. What I want is a .DLL file specific for
the platform (no need of the Framework).

TA
 
G

George

I would write a Managed C++ wrapper DLL around the proxy .NET DLL
that exposes a straight C API. It the one thing Managed C++ seems
good for.

And what is the advantage with COM interop?

Sorry for so many questions ;)
 
D

Dino Chiesa [Microsoft]

I think you need a slightly different approach.
If what you want is to access a webservice from the C langauge, then you
should get a C-based web services stack.

You said you generated a proxy for your webservice, and want to use that
proxy from C. But it's not just the 35-line proxy code you need. That
proxy code of course calls into the .NET framework library code, and depends
upon it. So it is not possible to utilize the generated proxy code
(assuming you genersated it from wsdl.exe or VS.NET 2002/3) from within a C
app, without loading the .NET framework and the CLR.

Instead it seems to me what you want is a C-based web services stack, that
can do the job of wsdl.exe, except producing a C-language proxy, and calling
into a C-library for sending and receiveing web service requests. I don't
know of one.

I know that systinet produced a c++ version of WASP. White Mesa has a C++
version. There is gSOAP, which I think is C-based.
http://www.cs.fsu.edu/~engelen/soap.html

OpenSOAP - http://www.opensoap.jp/about.html.en

I can't really make recommendations on any of these, because I have not
evaluated them. But it seems to me, using a C-based stack such as one of
these, is a better approach than trying to do C-to-C# interop to connect to
web services, especially since you specified one of your requirements was to
have no .NET framework at all on the client.

-Dino
 
G

George

Instead it seems to me what you want is a C-based web services stack,
that can do the job of wsdl.exe, except producing a C-language proxy,
and calling into a C-library for sending and receiveing web service
requests. I don't know of one.
I can't really make recommendations on any of these, because I have
not evaluated them. But it seems to me, using a C-based stack such as
one of these, is a better approach than trying to do C-to-C# interop
to connect to web services, especially since you specified one of your
requirements was to have no .NET framework at all on the client.

That's exactly what I wanna do. However the matter of not having the .NET
framework on the client is not a requirement. It's just a matter of doing
the client independent of the framework, but it's going to be very
difficult then I install it on every machine when installing the product
;)

Anyway I'll have a look to the links you've said.

Thanks.

--
Saludos a todos
#
# Contra el canon de los CD's
# que ahora no haya protecciones ni multas
#
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top