GerProcAddress / DLL Export inside a EXE

Started by
0 comments, last by ApochPiQ 12 years, 10 months ago
I have this macro:

#define ADD_ENTITY( EntityName, EntityClass ) \ extern "C" _declspec( dllexport ) CBaseEntity &EntityName( void ); \ CBaseEntity &EntityName( void ) { CBaseEntity *Ent = new EntityClass; return *(Ent); }


That I use to export a function (the name of the entity i want to allocate) and when I want to load all my entity's I call a function.
Which then calls all the functions exported (example: func_door) and returns the created class.

I have no idea how to call the exported function (or if its even possible, since it's all inside the same .exe).
Is there anyway I can do this?

Thanks
Advertisement
I'm not sure I understand the rationale behind the DLL export stuff; why not just call EntityName() and be done with it, since you're in the same EXE?

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement