Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How to create a simple COM component in C++, and then to consume it in my C# project.
I don't want to use ATL. Are there any simple step by step instructions or a complete procedure to get started. (I have done googling but not found any desired content).
Any help will be appreciated.
empty DLL project
exports from the DLL to be used by COM: DllGetClassObject and friends
implementation of COM object factory
implementation of the COM object itself
type library is recommended to be embedded for better integration with C#
COM object registration
All steps assume understanding of COM basics, of course. ATL covers most of this right from the start, a project created from template is taking you immediately to details of #4 above.
If you are looking for some sample to start from, you can find pretty close ones:
COM in C++
Writing a shell extension in plain C++
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 days ago.
Improve this question
I'm new to MFC C++ and have a big MFC Project. It's in single document type and contains lots of classes such as doc.cpp, view.cpp, MainFrame.cpp ...Of course, It also contains lots of threads, functions in other classes. But i dont know exactly the way that project works, the way these threads are called. What is the first function, class is called? I try to find in default class of that project and have no clue.
I need an instruction or document explain step by step how a mfc project work. Can i have your help?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Let's say we've got a first program called Program1.exe which contains the necessary information to create and compile another application called Program2.exe. Actually it could also load that information from a txt file or whatever.
Googling, I've found that this is "easy" to do in C#, using Visual Studio:
How to programatically build and compile another c# project from the current project
Programmatically Invoke the C# Compiler
The problem is that I'm not using (and can't use) C#, but C++. Summing it up, my question is if that I can do this same thing using C++.
I would prefer to do it without additional libraries, but if that's not possible, or if it's too hard to do, you can also recommend any library allowing it.
I think you'll probably have noticed it, but my goal is to use it under Windows so I don't care if it's not portable.
Thanks everybody.
It's trivial (if maybe a bit odd) for a C++ program to compile and run another based on code stored in a text file. Debugging that other program, however, isn't.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have a rather huge project that has lot of generic C++ classes, some C++ classes with reference to MFC. The UI is all written is MFC. Application uses ATL / COM to expose objects to scripting languages such as VBA and Python. There are thousands of scripts written in VBA and python.
My next project is to make this application work on many different platforms. However when run on Windows I expect that already existing VBA scripts run. Any suggestions on what is the best way to approach at this is greatly appreciated. Please suggest programing languages or tools that could be used.If I can make use of existing c++ code base better but not necessary. Scriptable objects need to maintain the same interface as before and they should run with no Or very minimal changes to them. Also is there a easy way to move the scripts written in python 2.7 to python 3.x ?
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am student of M.Sc Computer Science. I have been given a project on C++ Analytics Library. I have been asked to implement some key analytics functions, design a library to implement these functions, and to make the library available via Remote Procedure Call interface.
I don't have programming background except what I learned about C++ during my course. I can do the coding for analytics function but I am stuck on RPC stuff? I could not find good resources on RPC or honestly if I say that I am not understanding from where to start on RPC? There are a lot of RPC information but could not relate to my project. I am supposed to design library for windows environment.
So far this is what I am planning to do-
I am using Visual Studio 2012 (Trial Edition)
Create IDL interface file where I am going to define all procedure or functions.
Using MIDL complier, generate client and server stub files.
and then link and compile the server and client using stub and header file.
Do you guys think that I am on right track for my project?
If yes, is there any help or best resource available for writing IDL interface file?
Any help or suggestion will be appreciated. Thanks in advance. I am not looking for the code. I am looking for the help in regards to RPC.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm wondering Which solution could be the best to interact with a C++ application and its data through CakePHP over a Windows environment.
I was thinking about creating an API, with Delphi or Java for example, which could work with JSON requests and which at the same time would be linked to the C++ application.
This is a very generic question but I would like to have any feedback about this or know if anyone have tried something similar before and what solution was implemented for it.
Thanks.
First, you need to define "best": Most performant, easiest to implement, best scalable, most portable...?
If you can modify the C++ application, I would not create a component in the middle (what you suggest to write in Delphi or Java) but instead add an interface which PHP can access directly. If you cannot do this then you need to create such a component, of course. In this case, roughly the same options exist as for embedding the interface in the C++ app:
A simple approach is to use sockets (see Interprocess communication within PHP with a continuous process?). A more heavyweight approach is http://activemq.apache.org/.
And of course you can expose a webservice (SOAP, REST, XML or JSON...). This is certainly a very portable interface but probably not the fastest (more layers in between).