Valentino Volonghi's Weblog

Greetings mercenaries!

Wednesday, October 20, 2004

About "Seven Cool Mono Apps"

I just read the last column on O'Reilly network here by Edd Dumbhill:



Because decoding audio itself isn't a simple process, there aren't any all-Mono ways of doing this yet. Instead, Muine uses the "p-invoke" facility of Mono to hook into the C-based multimedia library libxine. Calling C code from Mono doesn't require any supplemental C coding, unlike most other languages such as Perl or Python.



I would say that he is quite completely wrong. He maybe doesn't know anything about ctypes module, which is a rather complete and useful way to call functions inside compiled dynamic libraries.


You can find ctypes here with a little tutorial here. And now a little example, just to convince you about what I'm saying:



>>> from ctypes import *


>>> print cdll.msvcrt.time(None)


1048777320


>>> print hex(windll.kernel32.GetModuleHandleA(None))


0x1d000000



See you to my next post

0 Comments:

Post a Comment

<< Home