Page 1 of 1
What exact ATL support we have?
Posted: Sat Apr 24, 2004 9:14 pm
by Edwin Knoppert
Is there some extended code to use OCX's via ATL in pb?
+ events?
Posted: Sun Apr 25, 2004 6:46 pm
by Fred
For now, I'm afraid there is nothing build-in for ATL support. A cutted down versin of the ATL dll is provided with PB in the compiler\ directory, may be it could be a start ?
Posted: Sun Apr 25, 2004 9:56 pm
by Edwin Knoppert
ATL + events is not hard, i just did that for another compiler.
Trouble is the dispatch object to call a method.
You have added the webbrowser, i'm not sure this goes through atl.
Also the interface 'types' could be useful to call a vtable directly.
But help is rather poor and , to me, not very understandable.
I seen some directx example but so far i couldn't figure out how that works.
Do the interface members stand for ordinals like in a vtable?
If i can use interface to call a vtable, i think i'm saved

Posted: Sun Apr 25, 2004 11:13 pm
by Fred
In the directX examples, you always have a 'standard' function which creates the root interface from which you can query for other (sub) interfaces. It's only a pointer to a vtable, which can be easily accessed in PB with the 'Interface' feature. As ATL looks to work with COM interface, it should be easy to add support for it. If you any source code (even in other language) we could take a look..
Posted: Mon Apr 26, 2004 9:09 am
by Edwin Knoppert
In PowerBASIC i'm using the dispatch object from powerbasic itself.
It calls the ::Invoke for us > Object Call mydispatch.aboutbox
This is a great help but for purebasic i don't think i'm smart enough to simulate the ::Invoke myself.
But using a tool i know the vtable pointers, imo the other part in a dual interface.
I think i can make use of that.
I think i'm able to write me a simple function to query for the dispatch, no big deal.
The events is a single callback evt. per control.
BTW,
If PureBasic is able to write an invoke, you would gain so much, i can assure you.
In fact PowerBASIC does not much more and gives you access to com interfaces.
It left out the OCX stuff/visible controls.
Using ATL in combination with their dispatch it works fine.