Solved

Connecting two projects

Posted on 2000-05-15
9
146 Views
Last Modified: 2013-11-20
Hi,
  Is it possible to connect two different projects. Say, a dialog application on clicking the ok button,should open another project,which is an MDI Application.

Thanx,
Thiru
0
Comment
Question by:thirumaran
  • 4
  • 4
9 Comments
 
LVL 3

Expert Comment

by:MDarling
Comment Utility
connect? do you mean communicate between the 2 processes just have the dialog spawn the other exe.

if the latter thejust use CreateProcess.

regards,
Mike.
0
 
LVL 3

Expert Comment

by:shaig
Comment Utility
If you mean "projects" then:
Create a workspace that contains the two projects.
0
 

Author Comment

by:thirumaran
Comment Utility
Hi,
     I have to call another exe,as soon as i click the ok button in the dialog box after checking all the necessary validations.This is what i want.Just help me out in this problem.
Thanx,
Thiru
0
 
LVL 3

Expert Comment

by:MDarling
Comment Utility
use CreateProcess in OnOK


    STARTUPINFO SI;
    PROCESS_INFORMATION PI;
    ZeroMemory(&SI,sizeof(STARTUPINFO));
    SI.cb=sizeof(STARTUPINFO);
    if(CreateProcess(0,strExeToSpawn.GetBuffer(0),0,0,0,0,0,0,&SI,&PI)==0)
    {
        MessageBox(0,"Failed to Start Program...","Error",MB_OK);

regards,
Mike.

0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:thirumaran
Comment Utility
Hi Mike,
  Will it be possible for you to explain the code a bit. I am not able to get the usage of strExetoSpawn in createprocess function.
I have to call another project from this dialog based application.The called project is an MDI application.Is this possible.Please give me an example.

Thanx,
Thiru
0
 
LVL 3

Accepted Solution

by:
MDarling earned 20 total points
Comment Utility
yeah sure, strExeToSpawn is just a CString containing the name of your program.

the code could just as easily be...

STARTUPINFO SI;
    PROCESS_INFORMATION PI;
    ZeroMemory(&SI,sizeof(STARTUPINFO));
    SI.cb=sizeof(STARTUPINFO);
    if(CreateProcess(0,"MyApp.exe",0,0,0,0,0,0,&SI,&PI)==0)
    {
        MessageBox(0,"Failed to Start Program...","Error",MB_OK);

ok?

Have you got the help files for Windows.  It's all explained in there.

regards,
Mike.



0
 

Author Comment

by:thirumaran
Comment Utility
HI Mike,
    The program is showing assertion error.If you please give me your mailid i will be able to mail u both the projects,so that you can tell me where i made the mistake.

Thanx,
Thiru
0
 

Author Comment

by:thirumaran
Comment Utility
Hi Mike,
   Sorry for the previous comment. I made it without fully checking my code.
Now i ahd made it work.
Thanx for your timely help,
Thanx again,
Thiru
0
 
LVL 3

Expert Comment

by:MDarling
Comment Utility
no problem, glad you got it working.

regards,
Mike.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Decoding 32 bit binary streams 6 30
fizzArray  challenge 1 47
MaxSpan challenge 9 65
wordappend challenge 8 83
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now