dougmoran Posted July 3, 2014 Share Posted July 3, 2014 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 Link to comment Share on other sites More sharing options...
dougmoran Posted July 3, 2014 Author Share Posted July 3, 2014 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) Link to comment Share on other sites More sharing options...
kylomas Posted July 3, 2014 Share Posted July 3, 2014 dougmoran, What do you see when you do this... _arraydisplay($bptr) Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
dougmoran Posted July 3, 2014 Author Share Posted July 3, 2014 MVPs: I see a table with the following information: Row Col0 [0] 0 [1] 1 [2] 1795 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now