[Webinar] Streamline your web hosting managementRegister Today



Posted on 2003-02-21
Medium Priority
Last Modified: 2013-12-25
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.
Question by:EwS

Author Comment

ID: 8011209
I found a solution to my problem. The strings that I'm passing to CeCreateProcess need to be in unicode:

ret = CeCreateProcess(StrConv("peghelp.exe", vbUnicode), StrConv("file:test.htm#one", vbUnicode), 0, 0, 0, 0, 0, 0, 0, 0)

It works.

Expert Comment

ID: 8410882
Hi EwS,
Experts-Exchange is performing an automated process to delete old questions.  There have been no responses to this question, so it will be DELETED within 3 days.

Your points will be refunded.

If you still need the answer to this question, you should ask it again, as a new question.  Your new question will appear at the top of the list, where many Experts will see it and respond.  Here are some general tips on getting Experts to work on your questions:
1) Offer a high point level.  Experts often concentrate on higher-valued questions.
2) Choose the best Topic Area -- target the experts who have the specific skills that you need.
3) Include keywords in the Question Title that will attract the right Experts.
4) Provide FULL DETAILS in the question body so the Experts can get right to work on a solution.
5) When an Expert does make a comment, be sure to be responsive.

For more information on Asking Questions, see http://www.cityofangels.com/Experts/Member.htm
For information on how to finalize questions, see: http://www.cityofangels.com/Experts/Closing.htm
Please DO NOT respond to this automated post.  DO NOT ACCEPT THIS COMMENT AS AN ANSWER.  Thank you for participating at Experts-Exchange.

CleanupGuy -- EE database cleanup volunteer

Accepted Solution

SpideyMod earned 0 total points
ID: 8424923
PAQ'd and points refunded.

Community Support Moderator @Experts Exchange

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

590 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