Jump to content
Sign in to follow this  
dougmoran

getting data from pointers

Recommended Posts

Hi Folks,

I've been struggling with this problem for days and am turning to you as my last resort.

I am using a DLL provided by a vendor.  I don't have the c source, only the function users guide.

One of the functions I am using returns a type byte*.  Here is the line in the .h file:

const an_Byte* an_GetPrimaryConfigData(an_Chip chip, int* count);

I can call the function like this:

$an_Ptr = DllCall($dll,"int_ptr:cdecl","an_GetPrimaryConfigData","byte",1,"int*",$count_ptr)

Now how do I use an_Ptr to get the data I need.  an_Ptr is pointing to an array of bytes.

 

I know this is probably really stupid but I'm not getting it and I can't find anything here about how to do this.

Thanks in advance for your kind help.

Doug

Share this post


Link to post
Share on other sites

I just realized I copied the wrong code in my original post.  Here is the correct code:

The c code:

const an_Byte* an_GetPrimaryConfigData(an_Chip chip, int* count);

The AutoIT call:

$bptr = DllCall($dll,"byte*:cdecl","an_GetPrimaryConfigData","byte",1,"int*",$count_ptr)

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  

×
×
  • Create New...