Skip to main content
gamedev.net
🔒 Locked

Dll constants

Started by EvilCrap Nov 26, 2001 at 11:45 AM 0 replies 300+ views
Original Post
EvilCrap
EvilCrap
i am working on an alt-com DLL, and want to give users access to constants - how do i do this? the objects only have methods and properties, and i dont think it is right to use properties for consts... thanks!
SteveC
SteveC
You can export data from a DLL, however I''d recommend exporting global functions which return const reference to get them.

e.g.

extern "C" const long& TheNumberOne(void);

then implement it in your DLL

For a COM object they could be properties or methods. I don''t see why it would be a problem.

What''s wrong with const property?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.