Solved

Shell is returning a long instead of an integer

Posted on 1998-04-06
1
282 Views
Last Modified: 2013-11-08
I'm trying to use GetModuleUsage to determine when a fortran
program is done running.  My code looks like this

RetVal = shell("fortran.exe")

do while getmoduleusage(retval) > 0
   doevents
loop


The problem is that Shell is returning a long for RetVal
and GetModuleusage expects an integer.

I can't seem to make getmoduleusage accept a long.
so I seem to be stuck.
What do I do?
0
Comment
Question by:PhilHorn
1 Comment
 
LVL 9

Accepted Solution

by:
Dalin earned 100 total points
ID: 1460536
PhilHorn:
You can use the createprocess API.
If you use 32 bits VB, check
http://support.microsoft.com/support/kb/articles/q129/7/96.asp

if 16 bits,
http://support.microsoft.com/support/kb/articles/q178/1/16.asp

Any problms, let me know.
Regards
Dalin
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

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