From: "Nicolas Cannasse" <warplayer@free.fr>
To: "kyra" <kyrab@mail.ru>
Cc: "OCaml" <caml-list@inria.fr>
Subject: Re: [Caml-list] OCam'OLE pre-release
Date: Wed, 7 Aug 2002 10:55:43 +0200 [thread overview]
Message-ID: <004a01c23df0$36f9ef70$0700a8c0@warp> (raw)
In-Reply-To: <002d01c23d42$fc4d1080$551aa8c0@kyra>
> > > Because the COM object can still be referenced from C. You probably
> > > forgot to do an AddRef somewhere, e.g. when extracting a COM object
> > > reference from its Caml wrapper.
> > >
> > > Reference count management sure is tricky...
> >
> > True.
> > If you're using OCamole to manipulate COM objects and then passing them
> back
> > to C, your C code need to call AddRef on the retreived COM object since
> > OCamole GC'ed process does not respect the COM spec (caller is
responsible
> > from Release, callee call AddRef )
> >
> > Simply use the following function :
> >
> > IUnknown *get_com_object( value v ) {
> > IUnknown *o = IUnknown_val(v);
> > o->AddRef();
> > return o;
> > }
> >
> > Nicolas Cannasse
> >
> I'd want to remind that original subject was 'olegen' application. Being
> compiled natively it _does not work_. The error is access violation,
caused
> by "The object invoked has disconnected from its clients". I believe this
is
> because of Released COM object is invoked from _another COM object_. In my
> first post on this topic I had conjectured this was design flaw - binding
> Release with finalize. The main reason was: _one cannot guarantee_ that
> there are not other references to COM object from another COM objects. May
> be one can suppose, but cannot guarantee. If I'm wrong, we must follow X.
> Leroy and try to find the error in ocamole.cpp. If I'm wrong again, why
does
> olegen not work???
Sorry but I didn't get this in your previous emails.
I'm currently investigating the native compilation issues.
Please consider that only bytecode compilation is available in the .pre
Release.
If you're experiencing any problem/bug with OCamole and/or OLEGen, please
send me a report in order to fix it.
Nicolas Cannasse
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2002-08-07 8:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-30 19:19 Nicolas Cannasse
2002-07-31 12:06 ` [Caml-list] OCam'OLE pre-release (mirror) Nicolas Cannasse
2002-07-31 12:48 ` Samuel Lacas
2002-07-31 13:13 ` Nicolas Cannasse
2002-07-31 13:30 ` Samuel Lacas
2002-08-01 23:39 ` [Caml-list] OCam'OLE pre-release kyra
2002-08-02 10:13 ` Nicolas Cannasse
2002-08-02 23:26 ` kyra
2002-08-02 23:23 ` Quetzalcoatl Bradley
2002-08-04 12:00 ` kyra
2002-08-03 11:47 ` kyra
2002-08-05 7:46 ` Nicolas Cannasse
2002-08-05 9:32 ` Xavier Leroy
2002-08-05 9:51 ` Nicolas Cannasse
2002-08-06 12:15 ` kyra
2002-08-07 8:55 ` Nicolas Cannasse [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004a01c23df0$36f9ef70$0700a8c0@warp' \
--to=warplayer@free.fr \
--cc=caml-list@inria.fr \
--cc=kyrab@mail.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox