Solved

Shell is returning a long instead of an integer

Posted on 1998-04-06
1
267 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
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.

895 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now