Skip to main content
gamedev.net
🔒 Locked

Shared DLL

Started by matthughson Dec 7, 2005 at 2:05 AM 0 replies 800+ views
Original Post
matthughson
matthughson
Hey Guys, Just wondering if there is such thing as a "shared dll" between two running apps, and if it would do what I want. Basically on our game project we have some tools that I would like to be able to comunicate with the running game and engine. I would like some sort of "middle man" (perhaps a shared DLL) with which the two applications could communicate. For example, we have an entity editor. I would like to be able to run the game and have that entity on screen. In the entity editor I, say, change his texture and save the script. I would then like to hit a "refresh button", which would hook into this shared DLL and post a message of sorts saying "engine needs to reload this script". The engine would be periodically hooking into the DLL as well, and at this point would see that it needs to reload this enitity script. Is something like this possible? If not any other possible solutions? Maybe a "job log" that the engine checks and the editor posts to when it needs things done? Thanks! Matt
__________________________________[ Website ] [ Résumé ] [ [email=contact[at]matthughson[dot]com]Contact[/email] ][ Have I been Helpful? Hook me up! ]
Emmanuel Deloget
Emmanuel Deloget
You can implement this using shared memory (CreateFileMapping, MapViewOfFile) and then store the shared objects in this memory. You can also implement the link bewteen the applications as a socket-based client/server.

To communicate orders from one application to another, you can either use a shared variable (be sure that you protect its access using (for example) a system-wide named event). You can also use RegisterWindowMessage to register a system-wide message and then use this message accross multiple applications (you still have to find the correct target window).

Voilà. These are some possible ways to explore. HTH,

Topic Locked

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

Sign in to reply to this topic.