Exporting Managed code as Unmanaged
Mulot Gérard <[email protected]> Sun, 14 Dec 2003 22:17:40 +0100
| Newsgroups | gmane.comp.python.ctypes.devel |
|---|---|
| Message-ID | <004f01c3c287$b51c2540$312dfea9@intel> |
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
Gerard
-------------------------------------------------------
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