On 5/4/05, Graham Fawcett <[EMAIL PROTECTED]> wrote:
>
> To answer my own question:
>
> BSTR schemeStringToBstr(char *scheme_string) {
> // don't forget to SysFreeString(retval)!
> int count = strlen(scheme_string);
> BSTR retval = SysAllocStringLen(NULL, count);
> MultiByteToWideChar(CP_UTF8, 0, scheme_string, count, retval, count);
> return(retval);
> }
>
> (Sorry for adding noise to the list.)
>
No need to be sorry at all. Actually, I'd love to help as much as I can
with this project. If you can wait for a few days, I can provide a small
utility library for COM things (BSTRs, GUIDs, registry access, etc.).
BTW, couldn't BSTRs be allocated in the Scheme heap, using (for example)
u16vectors? That would remove the need for doing all the SysAlloc/SysFree
stuff.
cheers,
elix
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users