Re: Exporting Managed code as Unmanaged

Thomas Heller <[email protected]> Tue, 16 Dec 2003 22:14:10 +0100
Newsgroups gmane.comp.python.ctypes.devel
Message-ID <[email protected]>
Mulot Gérard <[email protected]> writes:

> Exporting Managed code as Unmanaged  :
> http://www.csharphelp.com/archives3/archive500.html
>
> the following c# code is exported as an unmanaged dll with ILDASM from Net
> Framework SDK
>
> // HelloWorldDll.cs
> using System;
>
> namespace HelloWorldDll
> {
> public class HelloWorldClass
> {
> public static string SayHello(string name)
> {
> return ("Hello " + name);
> }
> }
> }
>>>> from ctypes import *
>>>> x = windll.HelloWorldDll
>>>> x.SayHello('Gerard')
> 1465528
>>>>
>
> I can't return the string Hello Gerard

If you mail me the dll I can try - no time to build this myself.

Thomas



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click