So I'm trying to make a custom interface that should be available to
server plugins. I've made a pure virtual interface class

#define INTERFACEVERSION_ENTITYINFOMANAGER "EntityInfoManager001"
class IEntityInfoManager
{
public:
        virtual IEntityInfo *GetEntityInfo( edict_t *pEdict ) = 0;
};

and implementing it in another class

class CEntityInfoManager : public IEntityInfoManager
{
public:
        virtual IEntityInfo *GetEntityInfo( edict_t *pEdict );
};

and in the cpp for the implementation

static CEntityInfoManager s_EntityInfoManager;
EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CEntityInfoManager,
IEntityInfoManager, INTERFACEVERSION_ENTITYINFOMANAGER,
s_EntityInfoManager);

Best I can tell this is all that the existing interfaces do.
Everything compiles fine, I copy the compiled server.dll over to the
bin folder

E:\games\steam\SteamApps\myemail\source dedicated server\hl2mp\bin
also tried
E:\games\steam\SteamApps\myemail\half-life 2 deathmatch\hl2mp\bin

Then add the following to my server plugin, to load it like any other interface
IEntityInfoManager*g_pEntityInfoManager = (IEntityInfoManager
*)gameServerFactory(INTERFACEVERSION_ENTITYINFOMANAGER, NULL);

But it doesn't work. Did I miss a step somewhere in here to getting my
custom interface exposed to be used in server plugins?

Thanks in advance.
Jeremy

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to