473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to access a method of VC++ 6.0 .exe in .Net

Hi,
I have a VC++6.0 .exe file. I want to call a method of that .exe from .Net Application.
Please give the help..
Jun 1 '07 #1
4 1487
Hi,
I have a VC++6.0 .exe file. I want to call a method of that .exe from .Net
Application.
Please give the help..
You have to give more information.

Is it an ActiveX container? If so you have to register it and add a
reference to your .NET project.
If it is a command line app you can launch it and supply arguments. For
example 'system' 'shellexec' or 'createprocessex'
If it is neither of the above, it is not possible to execute code from that
executable.

--
Kind regards,
Bruno van Dooren MVP - VC++
http://msmvps.com/blogs/vanDooren
br**********************@hotmail.com
Jun 1 '07 #2
In addition to Bruno's response... you may find it easier to create a
library for the .NET application rather than trying to call functionality
from an older EXE. If you have the source you should be able to copy and
paste the relevant source into your new project and/or create a library in
..NET that can be accessed in a more general way.

Tom

"Naveeen" wrote in message news:Oh**************@TK2MSFTNGP06.phx.gbl...
Hi,
I have a VC++6.0 .exe file. I want to call a method of that .exe from .Net
Application.
Please give the help..
Jun 1 '07 #3

"Bruno van Dooren" <br**********************@hotmail.comwrote in message
news:Oo**************@TK2MSFTNGP06.phx.gbl...
>Hi,
I have a VC++6.0 .exe file. I want to call a method of that .exe from
.Net Application.
Please give the help..

You have to give more information.

Is it an ActiveX container? If so you have to register it and add a
reference to your .NET project.
If it is a command line app you can launch it and supply arguments. For
example 'system' 'shellexec' or 'createprocessex'
If it is neither of the above, it is not possible to execute code from
that executable.
Not precisely true... you can load your dll into the process memory space,
then start code running in a thread. That thread could then freely call any
function in the .exe -- as long as it can find them, which is a diffuclt
problem in its own right (having a debug database for the exe would make
this part feasible). But this is evidently far beyond the capabilities of
the OP, judging by the incorrect terminology in his question.
>
--
Kind regards,
Bruno van Dooren MVP - VC++
http://msmvps.com/blogs/vanDooren
br**********************@hotmail.com

Jun 1 '07 #4
Not precisely true... you can load your dll into the process memory space,
then start code running in a thread. That thread could then freely call
any function in the .exe -- as long as it can find them, which is a
diffuclt problem in its own right (having a debug database for the exe
would make this part feasible). But this is evidently far beyond the
capabilities of the OP, judging by the incorrect terminology in his
question.
The OP talks about a .NET aplication so he is not creating a DLL.
But I should have said 'for all practical purposes...'

--

Kind regards,
Bruno van Dooren MVP - VC++
http://msmvps.com/blogs/vanDooren
br**********************@hotmail.com

Jun 1 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dave Langley | last post by:
I'm using VC++ to write an VC++ unmanaged client to communicate to a C#.NET web service. I have the proxy class for the unmanaged client and it uses the default CSoapSocketClientT<> template as...
1
by: Daryl | last post by:
This is a monthly reminder that via the web you can easily access microsoft.public.dotnet.languages.vc without a newsreader at http://www.ugroups.com/Computers/viewforum.php?f=17 This...
1
by: Robert Ludewig | last post by:
I have sucessfully imported and compiled a complex MFC 6.0 project from vc++6.0 (MFC6.0) into vc++ 8.0 (MFC 8.0). It contains several subprojects (libs and dlls). In vc++ 6.0 those project linked...
1
by: vanisathish | last post by:
Hi, I have doubt in implementing COM+ ActiveX Server EXE written in VC++. These methods will be called from ASP pages. Now simultaneously when more than 5 users access the method, the response...
1
by: Jaspreet | last post by:
I am working on a code which is similar to the following snippet: #include <iostream> using namespace std; class def; class abc {
1
by: lactaseman | last post by:
While I know this is not the correct venue... I realize this is of little to no importance to most out there... however, if I had found this in my initial searches, I would have used this. So, as...
3
by: NKH | last post by:
Hi, I am trying to recompile application that has been developed in VC++ 6.0 with VC++2005.. While compiling, I'm getting the following error.. error C2248: 'CObject::CObject' : cannot...
2
by: A n g l e r | last post by:
Hello everybody. I've got such an aching me question concerning fast & well optimized access to members of a structure (or class) and ways that VC compiler handles it. Let's imagine the...
1
by: =?Utf-8?B?c2F0aGVlc2t1bWFy?= | last post by:
In my project i have a component named PTS Engine which is developed in VC++ ..Net 2003. And it is migrated to VC++.NET 2005 version. Initially this migration process has coded and tested in VC++...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.