Hi, I need to convert this for use with an external API, but stuggeling to understand how to do this in Xojo.
The problem is the pointer.
typedef struct qwe
{
BYTE *message;
int length;
}qwe;
Hi, I need to convert this for use with an external API, but stuggeling to understand how to do this in Xojo.
The problem is the pointer.
typedef struct qwe
{
BYTE *message;
int length;
}qwe;
We’re going to need more info. A pointer as such doesn’t exist in Xojo, only references. What API are we talking about?
Thats what I meen… PTR is 4 bytes this is declared as a byte…
I’m pretty sure BYTE is the type of the data being pointed to, not the pointer itself.
I think it’s something like this :
someMemoryBlock.Ptr(n) ’ Retrieve Ptr stored within the MemoryBlock at offset n
The problem is that this struct is a part of another struct and I have to make the lenght correct.
Andrew hit the nail on the head
https://stackoverflow.com/questions/1675351/typedef-struct-vs-struct-definitions
Thanks everyone!
15 minutes from the question to the answer.