Click here to Skip to main content
15,921,793 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralNetwork Pin
jithen_dt31-May-04 2:10
jithen_dt31-May-04 2:10 
GeneralRe: Network Pin
Dave Kreskowiak31-May-04 6:48
mveDave Kreskowiak31-May-04 6:48 
GeneralWorking Days in a Year Pin
alhadav31-May-04 0:30
alhadav31-May-04 0:30 
GeneralRe: Working Days in a Year Pin
Colin Angus Mackay31-May-04 1:18
Colin Angus Mackay31-May-04 1:18 
GenerallpCurrentDirectory Pin
soul.ripper30-May-04 16:12
soul.ripper30-May-04 16:12 
GeneralRe: lpCurrentDirectory Pin
Dave Kreskowiak31-May-04 1:10
mveDave Kreskowiak31-May-04 1:10 
GeneralRe: lpCurrentDirectory Pin
soul.ripper31-May-04 2:27
soul.ripper31-May-04 2:27 
GeneralRe: lpCurrentDirectory Pin
Dave Kreskowiak31-May-04 6:39
mveDave Kreskowiak31-May-04 6:39 
This is the Declare you used for CreateProcess:
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 lpStartupInfo As STARTUPINFO, _
        ByRef lpProcessInformation As PROCESS_INFORMATION) _
    As Long

Now your trying to pass a String where your Declare said your going to pass a ByVal Long. Change it so that it reads:
ByVal lpCurrentDriectory As String


BTW, the correct Declare out of the VS6 APIViewer is this one: Your version will work so long as you pass the parameters the function expects in the format that it expects.
Public Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" _
        (ByVal lpApplicationName As String, _
        ByVal lpCommandLine As String, _
        ByRef lpProcessAttributes As SECURITY_ATTRIBUTES, _
        ByRef lpThreadAttributes As SECURITY_ATTRIBUTES, _
        ByVal bInheritHandles As Long, _
        ByVal dwCreationFlags As Long, _
        ByRef lpEnvironment As Any, _
        ByVal lpCurrentDriectory As String, _
        ByRef lpStartupInfo As STARTUPINFO, _
        ByRef lpProcessInformation As PROCESS_INFORMATION) _
    As Long



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: lpCurrentDirectory Pin
soul.ripper31-May-04 9:45
soul.ripper31-May-04 9:45 
GeneralRe: lpCurrentDirectory Pin
Dave Kreskowiak31-May-04 11:11
mveDave Kreskowiak31-May-04 11:11 
GeneralRe: lpCurrentDirectory Pin
soul.ripper31-May-04 11:43
soul.ripper31-May-04 11:43 
GeneralAPI Problem - Get The Icon For Another Window Pin
ColonelSanders30-May-04 15:56
ColonelSanders30-May-04 15:56 
GeneralRe: API Problem - Get The Icon For Another Window Pin
DSclub30-May-04 21:05
DSclub30-May-04 21:05 
GeneralRe: API Problem - Get The Icon For Another Window Pin
Dave Kreskowiak31-May-04 1:05
mveDave Kreskowiak31-May-04 1:05 
GeneralRe: API Problem - Get The Icon For Another Window Pin
ColonelSanders31-May-04 8:38
ColonelSanders31-May-04 8:38 
GeneralRe: API Problem - Get The Icon For Another Window Pin
Dave Kreskowiak31-May-04 11:18
mveDave Kreskowiak31-May-04 11:18 
GeneralrtlMoveMemory Dll Call Problem In .NET Pin
Pugman81230-May-04 11:55
Pugman81230-May-04 11:55 
GeneralRe: rtlMoveMemory Dll Call Problem In .NET Pin
Dave Kreskowiak31-May-04 1:03
mveDave Kreskowiak31-May-04 1:03 
QuestionHow can I disable CANCEL box in System.Window.form? Pin
ATC30-May-04 5:43
ATC30-May-04 5:43 
AnswerRe: How can I disable CANCEL box in System.Window.form? Pin
Syed Abdul Khader30-May-04 18:59
Syed Abdul Khader30-May-04 18:59 
GeneralRe: How can I disable CANCEL box in System.Window.form? Pin
ATC31-May-04 8:13
ATC31-May-04 8:13 
Generalanswer can or cannot Pin
GaryKoh29-May-04 16:12
GaryKoh29-May-04 16:12 
GeneralRe: answer can or cannot Pin
Hesham Amin31-May-04 7:33
Hesham Amin31-May-04 7:33 
GeneralRe: answer can or cannot Pin
f6431-May-04 10:05
f6431-May-04 10:05 
GeneralRe: answer can or cannot Pin
GaryKoh31-May-04 14:05
GaryKoh31-May-04 14:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.