On 5/3/05, felix winkelmann <[EMAIL PROTECTED]> wrote:
> 
> There is now reason not to use C++, though.

I've started on a little Chicken/OLE example, and have been able to
get quite far with just C, except for one thing: any idea how to
create a BSTR value from a Chicken string value?

For example, I've been able to get enough code together to make this
foreign-lambda work:

;; given a pointer to an OLE Automation object, make it Visible.
(define make-object-visible
  (foreign-lambda* void ((c-pointer object_ptr)) #<<END
                   BSTR property_name = L"Visible";
                   VARIANT value = int_variant(1);    // true
                   set_property(object_ptr, property_name, value);
END
))

But note the literal L"Visible" (which identifies a string constant as
a BSTR). I'd like to make a generic (set-property) that lets me pass
in "Visible" as an argument, but can't find a conversion
function(!)...

Maybe the answer is "use C++" ;-) but I'm curious to know if you have
any other ideas.

-- Graham


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to