Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

Driving a C# application using an unmanaged MFC application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marek - 13 Mar 2008 11:06 GMT
Hi
We have a C# application that we need to "drive" using an MFC application.  
The kinds of things we need to do are to instantiate the C# application and
tell it to load a certain file and then take certain actions.  It would also
be good if the C# application could somehow post/fire messages/events back to
the MFC application.  I know that a lot of this kind of thing can be done
using StartProcess, SendKeys etc. nad that COM might be an option, but I
wanted some feedback as to the best way of tackling this problem.

Best regards

Marek
Steven Cheng - 14 Mar 2008 07:22 GMT
Hi Marek

Based on the issue description you provided, I think what you need to do is
make the MFC application communicate with (or event control) another C#
application, correct?

For communication between two processes, those general inter-process
communication approach should work. And in .NET framework, there are some
.net specific approach such as remoting or webservice. However, since one
of your application is MFC, you may consider some other more raw approach
such as sockets communication or windows message...

Are both of the two applications' code controled at your side(so that you
can determine the way they will communication)?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: =?Utf-8?B?TWFyZWs=?= <dnv21@community.nospam>
>Subject: Driving a C# application using an unmanaged MFC application
>Date: Thu, 13 Mar 2008 03:06:02 -0700

>Hi
>We have a C# application that we need to "drive" using an MFC application.  
[quoted text clipped - 8 lines]
>
>Marek
Marek - 14 Mar 2008 08:53 GMT
Hi Steven
Thanks for your reply.  Yes, both of the applications are ours so we can
modify the code as required.

Best regards

Marek

> Hi Marek
>
[quoted text clipped - 63 lines]
> >
> >Marek
Steven Cheng - 14 Mar 2008 09:11 GMT
Thanks for your quick reply Marek,

Since you have control over both applications, I think that'll be much
better. I think socket should be a quite common approach that many
different programming platform can use it( java, vc, .net ....).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: =?Utf-8?B?TWFyZWs=?= <dnv21@community.nospam>
>References:  <D02669CE-5A9A-4A46-9ECF-7BDB3E71465F@microsoft.com>
<ST$MavZhIHA.1500@TK2MSFTNGHUB02.phx.gbl>
>Subject: RE: Driving a C# application using an unmanaged MFC application
>Date: Fri, 14 Mar 2008 00:53:01 -0700

>Hi Steven
>Thanks for your reply.  Yes, both of the applications are ours so we can
[quoted text clipped - 33 lines]
>> ==================================================
>> Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications.
>>
[quoted text clipped - 33 lines]
>> >
>> >Marek

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.