Jump to content
Sign in to follow this  

DllStructGetData help

Recommended Posts


I have a dll and a function is like:

int function(char *st,ulong FR,tstruct *cstruct,int att,int size,char *text);

how would i call this in autoit?

i tried:

Dim $cstruct
$cstruct = DllStructCreate("char error[255];int flag")

$a = function(1,2,3,4,5)

Func function($p1,$p2,$p3,$p4,$p5)
    $dll = DllCall("DLL.dll","int","function","str",$p1,"ulong",$p2,"ptr",DllStructGetPtr($cstruct),"int",$p3,"int",$p4,"str",$p5)
    return $dll[0]

Is there anything wrong with that code? am i calling the dll correctly ?

Edited by capo

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.