May 02, 2024, 12:47:25 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


DllMain?

Started by Parker, January 21, 2006, 12:29:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Parker

I've been thinking about this, how to have an optional DllMain function in Aurora for those who want some loading to be done automatically like the Scintilla DLL, and I think I've come up with a solution.

By default, there would be an extra global variable that is declared like this in the asm file
_dllmain db 0

But you can override that with a preprocessor directive:
#dllmain MyDllMain
which would output this instead
_dllmain db $MyDllMain

Then in the Aurora dllstartup.o we would have some code that calls the _dllmain variable if it is not 0.

I really would like to see something like this in a future update, it can differ from my idea, that's just how I figured out it could work.

Maybe the global variable could contain something that NASM accepts but Aurora doesn't like the @, #, or ? so as not to conflict with existing variables.

Thanks,
Parker