Re: D6 and COM
- From: Bill Schwab <bschwab@xxxxxxxxxxxxx>
- Date: Wed, 25 Jan 2006 20:45:18 GMT
Donald,
As I understand it, a typelib such as tv3d.lib contains the binary descriptions of the IDL, right?
Yes. They are either compiled from IDL using MIDL (which I have done), or I believe one can construct them programmatically; don't bet the farm on the latter.
Are you suggesting that these binary descriptions are correct, and what Dolphin discovered in the DLL are not?
How in the world could they be different? I thought they were both genereated from the C++ code in the DLL. Sheesh.
Not necessarily. They could have separately written the IDL and header/source files. They probably used something like the MS class wizard that writes IDL and creates stubs for the C*, but that is not required, or they might have edited the code after generating it.
Blair has commented on limitations of VB in relation to type libraries. Check the archives for the details. Something about signed/unsigned integers???? I think it came up in the context of a type library for the win32 api. It might be worth checking to see if it could be hurting you.
What should I use to inspect the typeLib?
Look for #printIDLOn: or #printIDL. You might need to send it to "the object's" #typeInfo. It's one of those things that I do far enough apart to have to rediscover it each time. There might be a more magical way to do it that I have not discovered. IIRC, the analyzer has a button for it, but I tend not to use the analyzer as a browser - maybe I'm missing out???
The problem with the beta is that my beta key will not work from
Dolphin. It does work from VB.net.
That might be licensing??? In your shoes, I would search the archives to see if Blair has written anything on instantiating or debugging loading of a licensed control.
> But there is evidently a difference
in how VB handles BSTRS structures and how C++ handles them. IIRC, VB sends strings and receives Unicode, and C++ both sends and receives Unicode strings. This is probably the first problem I need to solve, because the beta is much faster, and, they say, better.
I would hope that close inspection of the IDL would reveal any such differences. With that said, I suppose if one sent character string in a "unicode" buffer, it might be ok as long as the callee recognized (or also made) the mistake.
Also in the beta, they now have two different DLLs. I am using the C++ one since that would seem to have the largest chance of being truly COM compliant. I also can't get anybody on their community boards to tell me how to do straight COM, not COM through VB or COM with ATL, etc., even though they say it is possible Very frustrating.
Just a possibility: they might not know what you mean or how to do it. Much of the detail is just that; reference counting is a little more frightening. Smart pointers help, but I could see how they might lead to developers who feel hobbled w/o their favorite wrapper.
Dolphin's COM interfacing is as simple to use as it is powerful; Blair really nailed it. The C* jocks arguably have to face a mix of the class side initialization and the finalization behavior of the various IUnknown classes on every call, not to mention allocating and deallocating memory as in the wrappers, etc.
Have a good one,
Bill
-- Wilhelm K. Schwab, Ph.D. bills@xxxxxxxxxxxxxxxxxxxx .
- Follow-Ups:
- Re: D6 and COM
- From: dmacq
- Re: D6 and COM
- References:
- D6 and COM
- From: dmacq
- Re: D6 and COM
- From: Bill Schwab
- Re: D6 and COM
- From: dmacq
- Re: D6 and COM
- From: Chris Uppal
- Re: D6 and COM
- From: dmacq
- D6 and COM
- Prev by Date: Re: D6 and COM
- Next by Date: Re: Analog DLL in Dolphin?
- Previous by thread: Re: D6 and COM
- Next by thread: Re: D6 and COM
- Index(es):
Loading