develooper Front page | perl.perl6.users | Postings from December 2019

NativeCall and C String question

From:
ToddAndMargo via perl6-users
Date:
December 30, 2019 07:12
Subject:
NativeCall and C String question
Message ID:
15f168e0-e547-020f-ec85-3c9b400d3440@zoho.com
Hi All,

When Native call gives me back an address and byte count
to a C string, how do I turn that into a Raku string?

Address = 5636171  0x56004B
byte count = 14  (UTF16) two of these are presumed to be chr(0)

Actual string is `KVM-W7`

Many thanks,
-T

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About