[haXe] Dll's
Edwin van Rijkom
lists at screenweaver.com
Mon Aug 7 19:23:16 CEST 2006
Hi Lee,
The neko header doesn't obscure the DLL main method . Many DLL's
(including .ndll's) don't have one; it's not mandatoy since they're
libraries, and therefore don't require a starting point.
On windows, there's a special DllMain method though, that you can
implement. If present, it will be invoked on DLL loading time. It
doesn't get passed argc and argv parameters like a normal executable
gets, though - since libraries cannot be launched with arguments.
If I'm not mistaken, the .ndll will be in the same process as the
loading application, so you could try calling GetCommandLine from within
your DLL, and obtain commandline arguments that way.
More info on the DllMain method is here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/dllmain.asp
More info on GetCommandLine is here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getcommandline.asp
Cheers,
Edwin
Lee McColl-Sylvester wrote:
>
> Hi all,
>
>
>
> When creating a module for haXe in the form of a dll, the usual main
> function is hidden and dealt with by the Neko vm. However, I need
> access to the argc and argv parameters of the main function so that
> they can be used to create a window. Can I gain access to these
> through the Neko api?
>
>
>
> Thanks,
>
> Lee
>
>
>
>
>
More information about the Haxe
mailing list