Let’s say I pass a wide string into SysAllocStringLen - the pointer I get back is a bit more than a raw pointer. The 4 bytes of memory right before that pointer points to a value indicating the # of characters in the BSTR. (2 bytes per character). Unlike normal C-style strings, there can be 0s in a BSTR.
Unfortunately, Pin is still in nightly.
Is there any way to “own” the pointer and hold it without moving it around? Or am I overthinking this and a basic NonNull would work here?