|
-
August 27th, 2001, 10:30 PM
#1
How to implenment QueryInterface method in vb just like in VC++
Hi
who can tell me how can i implenment QueryInterface method in vb just like in VC++ and how to use ATLInternalQueryInterface API in ATL.DLL ?
Thanks!
-
August 28th, 2001, 02:02 AM
#2
Re: How to implenment QueryInterface method in vb just like in VC++
U can't implementing a QueryInterface in vb.
when U develops a ATL component in VB many declaretions and implemnetations are implicit unlike VC++ where U must declare everything.
so add a Class in ActiveX DLL VB project (myClass) and put the following code:
public sub sayHello
msgbox "say hello"
end sub
set property Instansing = Multiuse.
now U have create a Interface named myClass and a coClass nemed myClass.
if U want to call this class and its methods:
dim obj as myDLLProject.myClass 'early binding
' dim obj 'late binding
set obj = createobject("myDLLProject.myClass")
obj.sayHello
hi,brt
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
</center>
-
August 28th, 2001, 02:31 AM
#3
Re: How to implenment QueryInterface method in vb just like in VC++
Thanks berta!
I have written my words to create ATL Control,which use ATL API,also i can get the IUnkown pointer in vb using AtlAxGetControl API, then i want to get pObject by using ATLInternalQueryInterface API ,but i don't know how to use it.
thanks anyway!
Tsinghua
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|