Solved

Connecting two projects

Posted on 2000-05-15
9
148 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
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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 20 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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
has77  challenge 9 85
changeXy challenge 13 82
unix example issues 18 90
Problem to App source 6 40
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…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 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