Raku NativeCall (LPTSTR) &lpMsgBuf?

164 Views Asked by At

Raku/Perl6 Windows

In Raku's Native Call https://docs.raku.org/language/nativecall

What do you use for C's (LPTSTR) &lpMsgBuf in the sub declaration? Is that a pointer to a pointer?

Many thanks, -T

Edit: To remove any misunderstanding, I am not asking about how to write something in "C" or "C++". Raku is what Perl 6 is now called. And NativeCall is a Raku module (not C) that interfaces with System calls, such as Kernel32.dll.

My question is in Raku / Perl 6, how do I represent a (LPTSTR) &lpMsgBuf on the Raku sub declaration line.

If it helps, (LPTSTR) &lpMsgBuf is C++ syntax and is represented as LPTSTR in Kernel32.dll's call.

1

There are 1 best solutions below

2
Todd On

Figured it out. It is "CArray[byte] is rw"