marlersoft / zigwin32gen

Generates Complete Zig bindings for Win32. See https://github.com/marlersoft/zigwin32 for the bindings themselves.
108 stars 17 forks source link

Metadata for strings optionally requiring zero termination #14

Open recombinant opened 2 years ago

recombinant commented 2 years ago

The issue is that some win32 string pointer parameters accept strings that are optionally zero terminated. The associated length parameter determines the length (e.g. TextOut()) or in some instances (e.g. DrawTextEx()) a length parameter of -1 can allow the string to be zero terminated.

There is "NullNullTerm":false in the JSON metadata that appears to indicate where the parameter should be [*] rather than the current [0:*].