• Advertisement
Sign in to follow this  

GerProcAddress / DLL Export inside a EXE

This topic is 2423 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement