troubleshooting Question


Avatar of npnp
npnp asked on
Visual Basic Classic
7 Comments1 Solution2880 ViewsLast Modified:
Using VB6, SP3, NT.  Code written by someone else:

Public Sub Shell32bit(ByVal JobToDo As String, Pacifier As String)

Dim hProcess As Long
Dim RetVal As Long

hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, False, Shell(JobToDo, ShellWindowState)

  GetExitCodeProcess hProcess, RetVal
  Sleep 100
Loop While RetVal = STILL_ACTIVE

End Sub
The Shell creates an output file, but VB doesn't wait for that to finish.

STILL_ACTIVE is fixed as a Public Constant as &H103 (=257)

Question:  Why that number?
Dan Appleman's WIN32 API book uses STILL_ACTIVE in several places, but never says what it is.

Please help. -- Norm

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros