On Wed, Jan 29, 2020 at 18:39 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote:
> On 2020-01-29 15:32, ToddAndMargo via perl6-users wrote: > > `DWORD cbData` > > cbData is a 32 bit unsigned integer. It follows > all the rules for unsigned integers. You do not > terminate it. WinAPI knows it is 32 bits long. > > lpData (Long Pointer Data) is where you put the > 0x0000 at the end, if you are using it as a string. > lpData is an array of bytes of your chosen length. > You keep telling me about fields I’m not asking about. Let me quote you to you, from <https://www.nntp.perl.org/group/perl.perl6.users/2020/01/msg8019.html>: > This all came up when I tried to match > > RegSetValueExW( > _In_ HKEY hKey, > _In_opt_ LPCWSTR lpValueName, > _Reserved_ DWORD Reserved, > _In_ DWORD dwType, > _In_reads_bytes_opt_(cbData) CONST BYTE * lpData, > _In_ DWORD cbData > > where CbData can either be a UTF little endian C string, > terminated by a nul or a four byte little endian > unsigned integer (no two's complement allowed) depending > on the value of lpValueName (REG_SZ, REG_DWORD, etc.) I would like to know about “where CbData can either be a UTF little endian C string, terminated by a nul or a four byte little endian unsigned integer (no two's complement allowed) depending on the value of lpValueName (REG_SZ, REG_DWORD, etc.)”. That is what I and others find so bizarre. That doesn’t seem to need reference to anything except cbData and lpValueName. I’m just curious about this thing that can (again, quoting you) be “EITHER” a UTF string ”OR a four byte little endian unsigned integer (no two’s complement allowed)”. Tell me about that please. Just that.