I'm trying to call down into the CreateProcess Windows API from eVB but I
can't make a valid declaration:
Option Explicit
Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Declare Function CreateProcessA Lib "kernel32" _
(ByVal lpApplicationName As Long, _
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, _
ByRef si As Long, _
ByRef pi As PROCESS_INFORMATION) As Long
I get an error at compile time saying you can't have User-defined types (ie
the PROCESS_INFORMATION argument) inside an API declaration. So how do you
do this in eVB? This works fine in VB.Net, with PROCESS_INFORMATION defined
as a class.
--
Tim