Pointer to wchar_t string to String?
Posted: Tue Mar 16, 2021 8:42 pm
Pretty much what the topic asks.
I have a struct that contains 3 elements that are Pointers that point to wchar_t strings (there's also another element that's a pointer to a C string which is not a problem at all) and I'm having a hell of a time trying to retrieve them and/or convert them to a regular LCB String type. I worked out a hack to do it on macOS that seems to work quite well, but it's a total fail on Windows. I've tried tapping into various <builtin> functions found in Livecode's foundation.h header with not much success. In fact, I seem to be getting further from a solution. It's very frustrating because these are just name strings, important for humans, but not actually important to the functionality of the library I'm wrapping (HIDAPI).
I have a struct that contains 3 elements that are Pointers that point to wchar_t strings (there's also another element that's a pointer to a C string which is not a problem at all) and I'm having a hell of a time trying to retrieve them and/or convert them to a regular LCB String type. I worked out a hack to do it on macOS that seems to work quite well, but it's a total fail on Windows. I've tried tapping into various <builtin> functions found in Livecode's foundation.h header with not much success. In fact, I seem to be getting further from a solution. It's very frustrating because these are just name strings, important for humans, but not actually important to the functionality of the library I'm wrapping (HIDAPI).