How to make a program that works with another one?

Hi guys!

Just for fun, I was designing a program to help me plan my projects.

Some of the features I was thinking of would are:
* writing pseudocode with hyperlinks to a place where I could write the actual code.
* time saving resources such as:
- linking a class definition to its declaration so that when I change, for example, its name, return type or arguments in the .cpp or .h file, it changes the corresponding one automatically
- linking a variable/function/etc to the places where it is mentioned so that when I change its name in the class definition, everywhere else is also changed
- automatic setters and getters for variables
- automatic nested for loops with x and y variables, etc.

Anyway, my question is, is there a way to make this program work alongside Visual Studio or at least some other program, almost like a plug-in? That way, I could create, for example, a toggle that would allow me to change between, for example, this

if (The mouse click was inside the rectangle)
     //<several underlined links>
     //Do something really complex in several 
     //detailed pseudocode steps, each possibly with its own link
     //</several underlined links>

into actual code like

if (x > Rect.x && x < Rect.x + Rect.w && y > Rect.y && y < Rect.y + Rect.h)
     //complex stuff

in Visual Studio?

Also, how do, for example, bots or hacks for games work? How can a program influence another's functionality?
Last edited on
Sorry for bumping, but the topic was already out of the first page with no answer.
closed account (Dy7SLyTq)
a dll would be my best guess
Could you please elaborate? What should I look into in terms of books or websites in order to learn to use .dll's in that way? Thanks a lot.
closed account (Dy7SLyTq)
i havent written a dll before; i just know what it does. google a tutorial
I have already tried that, even before your answer. I could not find anything specific to my requirements, as in something that would teach me to make programs work together, only definitions of what a .dll is.
closed account (Dy7SLyTq)
then you didnt search nearly hard enough. i just googled it and found 5 tutorials off the bat
almost like a plug-in?

In the Visual Studio case, they're referred to as add-ins

How to: Create an Add-In

Unfortunately, the Express edition of Visual Studio does not support add-ins.

I know Code::Block and CodeLite both support plugins, and suspect that all non-trivial IDEs will do so.

An add-in/plugin is a DLL (or .so or .dylib) that exposes the correct API/interface for whatever it's plugging into. So if you don't know what a DLL is, you need to learn than first.

What is a DLL?

To add complexity, Visual Studio 2010 plug-ins use either a COM Automation or a .NET interface, so you're generally write them in C++ (with COM) or C++/CLI (or C#.) with .NET.


Visual Studio Add-in Library
Last edited on
Thank you very much Andy! That was very helpful. I will certainly look further into "add-ins".

More reading...

Visual C++ Extensibility Object Model


PS regarding the title of this thread: How to make a program that works with another one?

That's the intent behind OLE (Object Linking and Embedding)

Object Linking and Embedding

It's the mechanism which allows you to embed (e.g.) an Excel spread sheet in a Word document and edit it in place. With Word and Excel, it's two apps interacting, not an app and a DLL, as is usual for a plug-in.
Last edited on
Thank you so much Andy! Your help has been invaluable.

Here is what I have gathered so far:

* .dll's
* Visual Studio Add-ins
* Visual C++ Extensibility Object Model
* OLE (Object Linking and Embedding)
* Socket programming

I will start looking into all of this! Again, thank you very much.
closed account (S6k9GNh0)
You can use sockets which also provides remote capabilities. Some games do this with the server/client model then use either a loopback device or a secondary-interface (which just takes in a packet as usual but doesn't require a networking device).

I'd say a shared library is the best. You can also look into shared memory but I've not researched into this since I've seen much failure and complications surrounding this. But I believe Boost has an API or two to help with this!
Thanks a lot!!
Topic archived. No new replies allowed.