API CreateProcess Function 
Author Message
 API CreateProcess Function

I have a problem creating a thread in Access 97 VBA, the handle returned by
Access is zero and it looks do nothing. I want to know if there is some
problem creating threas in VBA. This is the call to the declare function:

res = CreateProcess(0&, filename, security, security, 1, CREATE_NEW_CONSOLE,
0&, 0&, StarupInf, processInfo)

i have tried with vbstringnull instead of 0& but it's the same...

Can anybody help me?



Sun, 04 May 2003 03:00:00 GMT  
 API CreateProcess Function
Although you message says that you want to create a thread, you are calling
create process.  I assume that you are trying to simply launch an
application (as a console app) using create process.  CreateProcess runs
fine in Access 97 vba.  The only caveat to this is if you are trying to run
a 16 bit app under WinNT/Win2000.  That caveat is that the process handle
returned is really to the Wow exec rather than to the 16 bit process which
is actually a thread running in Wow.  You can work around this (to get a
unique process ID for a 16 bit app) by specifing to create the process in
its own memory space which forces a unique copy of the Wow to be created for
the 16 bit app, thereby returning unique Wow handle to use with the process.

There are a number of examples of using CreateProcess in VBA in the MSDN
Library.  You can do a search in the on line library by going to
http://msdn.microsoft.com
--
Steve Arbaugh
ATTAC Consulting Group
http://ourworld.compuserve.com/homepages/attac-cg


Quote:
> I have a problem creating a thread in Access 97 VBA, the handle returned
by
> Access is zero and it looks do nothing. I want to know if there is some
> problem creating threas in VBA. This is the call to the declare function:

> res = CreateProcess(0&, filename, security, security, 1,
CREATE_NEW_CONSOLE,
> 0&, 0&, StarupInf, processInfo)

> i have tried with vbstringnull instead of 0& but it's the same...

> Can anybody help me?



Wed, 07 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CreateProcess function doesn't work properly.

2. Problem with CreateProcess function.

3. CreateProcess function doesn't work properly.

4. CreateProcess function parameters?

5. Calling CreateProcess function

6. Calling CreateProcess function?

7. How to use Win API CreateProcess() in VB?

8. Open internet explorer with createprocess api: same for different charsets (engl, japanese)

9. CreateProcess Api returns a bad Pid

10. VB5 Question about CreateProcess 32bit API call

11. Help with GetStartupInfo and CreateProcess API's?

12. Problem starting IExplore with createprocess api: HELP!!

 

 
Powered by phpBB® Forum Software