On 2020-01-06 22:02, ToddAndMargo via perl6-users wrote: > Hi All, > > What am I doing wrong here? How do I assign values > to CArray[WCHAR]? > > I want $lpData[0] to be 0xABCD and $lpData[1] to be 0xEF12. > > > use NativeCall; > Nil > > > constant WCHAR := uint16; > (uint16) This was the booboo. I forgot to initialize the array. It should have been: my CArray[WCHAR] $lpData = CArray[WCHAR].new() JJ helped me find it on Stack Overflow.Thread Previous