// this is the code for calling fortran executable
PROCESS_INFORMATION ProcessInfo;
STARTUPINFO StartupInfo = { 0 };
memset((LPVOID)&StartupInfo,0,sizeof(STARTUPINFO)) ;
StartupInfo.cb = sizeof(STARTUPINFO);
if (CreateProcess ( NULL, "main.exe", NULL, NULL, FALSE,
0, NULL, NULL, &StartupInfo, &ProcessInfo) )
{
WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
}
else
{
}
// executable calling code end 2 1207
Sohan,
You will want to take a look at the Process class in the
System.Diagnostics namespace, as well as the ProcessStartInfo class.
Finally, you want to call the WaitForExit method to wait for the process to
complete.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"SohanC" <So****@discussions.microsoft.comwrote in message
news:12**********************************@microsof t.com...
// this is the code for calling fortran executable
PROCESS_INFORMATION ProcessInfo;
STARTUPINFO StartupInfo = { 0 };
memset((LPVOID)&StartupInfo,0,sizeof(STARTUPINFO)) ;
StartupInfo.cb = sizeof(STARTUPINFO);
if (CreateProcess ( NULL, "main.exe", NULL, NULL, FALSE,
0, NULL, NULL, &StartupInfo, &ProcessInfo) )
{
WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
}
else
{
}
// executable calling code end
Nicholas,
Thank you for your answer. Actually I have not written a C# program in a
last little while. Will it be possible for you to write few lines of code
that accomplishes the same thing as my C++ program does?
Actually, I am mostly a Fortran programmer but rarely I am expected to do
some C++ (now it will be C#) programming to accomplish some mix language task. So****@aim.com
"Nicholas Paldino [.NET/C# MVP]" wrote:
Sohan,
You will want to take a look at the Process class in the
System.Diagnostics namespace, as well as the ProcessStartInfo class.
Finally, you want to call the WaitForExit method to wait for the process to
complete.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"SohanC" <So****@discussions.microsoft.comwrote in message
news:12**********************************@microsof t.com...
// this is the code for calling fortran executable
PROCESS_INFORMATION ProcessInfo;
STARTUPINFO StartupInfo = { 0 };
memset((LPVOID)&StartupInfo,0,sizeof(STARTUPINFO)) ;
StartupInfo.cb = sizeof(STARTUPINFO);
if (CreateProcess ( NULL, "main.exe", NULL, NULL, FALSE,
0, NULL, NULL, &StartupInfo, &ProcessInfo) )
{
WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
}
else
{
}
// executable calling code end
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Az Tech |
last post by:
Hi people,
(Sorry for the somewhat long post).
I request some of the people on this group who have good experience
using object-orientation in the field, to please give some good ideas
for...
|
by: Clark Stevens |
last post by:
I have a program that I'm converting from VB6 to VB.NET. It reads in a text
file containing barcode numbers and their corresponding descriptions. Then
the user enters the barcode number and the...
|
by: Michael Tissington |
last post by:
After converting from 6.0 to 2005 when I try to Compile my project I'm
getting a LINK error
Error 1 fatal error LNK1181: cannot open input file " ?/.obj"
Any ideas how to fx this please ?
...
|
by: David Van D |
last post by:
Hi there,
A few weeks until I begin my journey towards a degree in Computer
Science at Canterbury University in New Zealand,
Anyway the course tutors are going to be teaching us JAVA wth bluej...
|
by: Testguy |
last post by:
Hi,
I was wondering if one the smart people that frequent this group could
give me a hand with a small program I am attempting to debug.
I am not a highly experienced developer, but can...
|
by: bobmct |
last post by:
Again: struggling to convert old-style HTML to html using css.
I am trying to create a rectangular box divided into approx three vertical
sections. The top section contains an image I would like...
|
by: Blasting Cap |
last post by:
I keep getting errors that pop up when I am trying to convert an
application from dotnet framework 1.1 to framework 2.0. The old project
was saved in sourcesafe from Visual Studio 2003, and I have...
|
by: Tonio Tanzi |
last post by:
I have the following problem in a Win 2000 Server + SQL Server 2000
environment and I hope somewhat can help me to resolve it (after many
days of useless attempts I am desperate).
In my database...
|
by: blogman |
last post by:
I am getting a Visual studio 2008 IDE application R6034 runtime error. This
means that the IDE application is raising the error not the application I am
building. This means that Microsoft did not...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |