Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Connecting two projects

Posted on 2000-05-15
9
Medium Priority
?
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 3

Expert Comment

by:MDarling
ID: 2810171
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
ID: 2810230
If you mean "projects" then:
Create a workspace that contains the two projects.
0
 

Author Comment

by:thirumaran
ID: 2810366
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 3

Expert Comment

by:MDarling
ID: 2811078
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
 

Author Comment

by:thirumaran
ID: 2813044
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 80 total points
ID: 2813515
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
ID: 2815914
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
ID: 2815924
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
ID: 2816288
no problem, glad you got it working.

regards,
Mike.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

609 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