Hi Folks,
quick question to the experts:
I'm currently translating some C-Code, and i've come across something that has me stumped:
The C-Code itself uses some C-Libraries, for which i have the C-Bindings.
The Prototype for that external function looks like this:
Function MyFunc(AArg1:cint;AArg2:PPointer;AArg3:PChar, SomeMoreArgs):cint;cdecl;external blablalablabla
The C-Code which calls that function looks like this:
uint8_t *MyVar[4]
MyFunc(SomeInteger,(void **)MyVar,PChar(AString),blablabla);
I'm aware that MyVar is an
MyVar : Array[0..3] Of PByte;
But how do i cast it to PPointer?
The Elements of the Array are already Pointers, and i'm under the impression that the Array-Variable itself is (usually?) a Pointer to the first element, so i'm kind of stumped how to proceed.
..... PPointer(MyVar) doesn't compile
.....PPointer(@MyVar) compiles, but is it correct?
I'd like to avoid creating a hard to find bug.....
Next: I have the same cast as above but against a
So, not an Array, just a simple Pointer.
And i have to cast that to a ....(void **)AnArg .... in another C-Function with a similiar Prototype expecting a PPointer for that Argument
PPointer(MyVar2)? or PPointer(@MyVar2)?