troubleshooting Question

CeCreateProcess

Avatar of EwS
EwS asked on
Visual Basic Classic
3 Comments1 Solution772 ViewsLast Modified:
Hi,
I need to call CeCreateProcess FROM THE DESKTOP.
My code doesn't work, I can't find any working examples.

I declare CeCreateProcess as follows:

Private Declare Function CeCreateProcess Lib "rapi.dll" _
(ByVal lpApplicationName As String, ByVal lpCommandLine As String, _
ByVal lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, _
ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, _
ByVal lpEnvironment As Long, ByVal lpCurrentDirectory As Long, _
ByVal lpStartupInfo As Long, ByVal lpProcessInformation As Long) As Long

When I call the function, I get error 2 (The system cannot find the file specified):
ret = CeCreateProcess("peghelp.exe", "file:test.htm#one", 0, 0, 0, 0, 0, 0, 0, 0)

When I call the function from my eVB program, it works fine (the only thing I have to change is "rapi.dll" in the Declare Function statement to "coredll").

Can you, please, tell me what I'm doing wrong or possibly give me an example that works? Thank you.
ASKER CERTIFIED SOLUTION
SpideyMod

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 3 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 3 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