[IronPython] Calling a Win32 API function in IronPython
dan.eloff at gmail.com
Tue Jul 22 19:37:41 CEST 2008
I am unaware of any such functionality. IronPython doesn't support
attributes because it cannot yet expose static types to the CLR. For
both of those reasons, you cannot use P/Invoke in IronPython. Fepy has
a ctypes module, but last I checked it is broken in a few important
ways, including that it doesn't support windows dlls or 64bit systems.
However, It may still contain the answer to your question, if you look
through the code. The easiest is going to be to make a C# dll that
uses P/Invoke to wrap the required functionality from the Win32 API.
On Mon, Jul 21, 2008 at 2:28 PM, Michael Armes <miarme at microsoft.com> wrote:
> How does one go about invoking a function in the Win32 API in Iron Python?
> Is there any P/Invoke functionality?
> FWIW, I want to get to GenerateConsoleCtrlEvent in kernel32.dll.
> The thread at
> indicated that there was a WorkItem to add this functionality in 2006.
> Users mailing list
> Users at lists.ironpython.com
More information about the Ironpython-users