DLL bringt Autoit zum Absturtz???

  • Hi,
    mein Problem ist : wenn ich meine C++ Dll aufrufe (meinen Funktions Kopf hier:

    Code
    C++:
    int Debug(DWORD PID,char Path[])


    DWORD PID ist eine PID zu einem Prozess
    char Path[] ist /soll einen Pafd zu einer Datei Wiedergeben
    ) stürtzt Autoit ab???

    [autoit]

    Local $structChar = "ptr[2];" & _
    "DWORD[4];" & _
    "char[83];"
    Local $arrChar = DllStructCreate($structChar)

    [/autoit][autoit][/autoit][autoit]

    ;für jedes Array den Pointer setzen
    DllStructSetData($arrChar, 1, DllStructGetPtr($arrChar, 2), 1)
    DllStructSetData($arrChar, 1, DllStructGetPtr($arrChar, 3), 2)

    [/autoit][autoit][/autoit][autoit]

    ;die Array-Werte eintragen
    DllStructSetData($arrChar, 2, processgetpid())
    DllStructSetData($arrChar, 3, 'C:\\Dokumente und Einstellungen\\Besitzer\\Desktop\\dll+\\Dll\\bin\\Debug\\Dll.dll')

    [/autoit][autoit][/autoit][autoit]

    ;DllCall('Dll.dll', 'int', 'Debug', 'int', processgetpid(), 'Str', 'C:\\Dokumente und Einstellungen\\Besitzer\\Desktop\\dll+\\Dll\\bin\Debug\\Dll.dll')
    DllCall ("Dll.dll","int","Debug","ptr",DllStructGetPtr($arrChar,1))
    ;if @error then msgbox (0,'Error:',@error)
    Func processgetpid($Name = 'Notepad.exe')
    $i = ProcessList($Name)
    Return $i[1][1]
    EndFunc ;==>processgetpid

    [/autoit]

    Bitte um Hilfe lg Pceumel

  • Entweder:

    Spoiler anzeigen
    [autoit]

    Local $structChar = "ptr[2];" & _
    "DWORD[4];" & _
    "char[83];"
    Local $arrChar = DllStructCreate($structChar)

    [/autoit] [autoit][/autoit] [autoit]

    ;für jedes Array den Pointer setzen
    DllStructSetData($arrChar, 1, DllStructGetPtr($arrChar, 2), 1)
    DllStructSetData($arrChar, 1, DllStructGetPtr($arrChar, 3), 2)

    [/autoit] [autoit][/autoit] [autoit]

    ;die Array-Werte eintragen
    DllStructSetData($arrChar, 2, processgetpid())
    DllStructSetData($arrChar, 3, 'C:\\Dokumente und Einstellungen\\Besitzer\\Desktop\\dll+\\Dll\\bin\\Debug\\Dll.dll')

    [/autoit] [autoit][/autoit] [autoit]

    ;DllCall('Dll.dll', 'int:cdecl', 'Debug', 'int', processgetpid(), 'Str', 'C:\\Dokumente und Einstellungen\\Besitzer\\Desktop\\dll+\\Dll\\bin\Debug\\Dll.dll')
    DllCall ("Dll.dll","int:cdecl","Debug","ptr",DllStructGetPtr($arrChar,1))
    ;if @error then msgbox (0,'Error:',@error)
    Func processgetpid($Name = 'Notepad.exe')
    $i = ProcessList($Name)
    Return $i[1][1]
    EndFunc ;==>processgetpid

    [/autoit]


    oder

    Code
    int __stdcall Debug(DWORD PID,char Path[])