Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
APIs from QB64PE and parameters defined As Any and unions of types ?
#3
I'm pretty sure in this context the `ByRef pData As Any` is just their way of expressing the `void *` type in C. That itself more or less just means it's a pointer to data but the type of data is not specified. As far as QB64 is concerned, you'd just replace it with a ByVal _OFFSET.

KernelPanic explained the Union thing, I'd say in practice what you'll need to do in QB64 is use a memory buffer and copy the data into variables of the right kind based on the dwType entry, so a fair amount more annoying (since QB64 doesn't have actual unions to use). I'd probably just use `_MEMNEW()` to create a memory block of the right size and pass that in as `pData`. Then you can use `_MEMGET` to copy the union section into separate variables of the proper TYPE after checking the `dwType` value, and go from there.
Reply


Messages In This Thread
RE: APIs from QB64PE and parameters defined As Any and unions of types ? - by DSMan195276 - 05-30-2024, 09:55 PM



Users browsing this thread: 10 Guest(s)