Jump to content

Recommended Posts

Posted

$text = dllstructcreate("char[128]") ;create buffer
dllstructsetdata($text,1,"Hi")

$ptr = dllstructcreate("ptr") ;create a pointer to the buffer. works like char * text = "hi";
dllstructsetdata($ptr,1,dllstructgetptr($text))

dllcall(..., "ptr", dllstructgetptr($ptr)) ; pass a pointer to the pointer. works like char**
;dllcall(..., "struct*", $ptr) ; might work too

beware though, char** parameters is not unusual syntax for passing an array of strings in c. this will work like an 1-sized array with first index set as "hi". it could also be the function intends to change the text $ptr points too - you dont do double inderection without a reason (usually).

Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...