On 2019-12-30 00:28, ToddAndMargo via perl6-users wrote:
Hi All,
In the following C code
DWORD FormatMessageW(
DWORD dwFlags,
LPCVOID lpSource,
DWORD dwMessageId,
DWORD dwLanguageId,
LPTSTR lpBuffer,
DWORD nSize,
va_list *Arguments
What do I tell Native Call the follow are?
LPCVOID
Long pointer to a C void. A C void is similar to our
type Any, in that it can be define later, if at all.
Long is meaningless under 32 and 64 bit OS'es.
LPTSTR
Long Pointer to a C string. Long is meaningless under
32 and 64 bit OS'es.
Note that C string are defined as being terminated by a
NULL -- our chr(0), despite the mistake in the NativeCall
documentation
va_list *Arguments
A list of match up parameter. Substitute %1 with xyz, etc..
The WinAPI guys told me they virtually never use ti and to
just give it a C NULL
Many thanks,
-T
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~