basic question 
Author Message
 basic question

hi there,

in com, interface does not provide implementation of methods.
but com object should provide something and we could call ? right ?
and  where are the functions located ? could i find them ?

thank you for your help!



Fri, 23 May 2003 03:00:00 GMT  
 basic question
When a COM class gets registered, its class ID has a DLL or EXE associated
with it that contains the class factory responsible for instantiating
objects of that class.


Quote:
> hi there,

> in com, interface does not provide implementation of methods.
> but com object should provide something and we could call ? right ?
> and  where are the functions located ? could i find them ?

> thank you for your help!



Fri, 23 May 2003 03:00:00 GMT  
 basic question
If I understand you correctly you are curious as to how COM interfaces are
attacehed to executable code since COM merely provides the interface
definition, not the implmentation.  Is this what you mean?

If it is, an interface may be implemented by one or more objects in your
project.  The interface is "connected" to a C++ class.

The interface members are then mapped to the member functions of the class.

Brian Griffin


Quote:
> hi there,

> in com, interface does not provide implementation of methods.
> but com object should provide something and we could call ? right ?
> and  where are the functions located ? could i find them ?

> thank you for your help!



Fri, 23 May 2003 03:00:00 GMT  
 basic question
Interfaces define behaviour, that behaviour is represented by the methods of
the interface. An interface can be thought of as a collection of related
methods. It is important that you only ever think of a COM method as a
member of an interface.

Classes are the named implementation of one or more interfaces, thus classes
have one or more behaviours. The name of a class is the 128-bit CLSID of the
class. A class exposes its behaviour by providing access to the interfaces
through the IUnknown::QueryInterface method. The only way to find out for
definate that an instance of a class implements an interface is to ask it if
it does (by calling IUnknown::QueryInterface), you cannot ask an object to
list the interfaces it implements.

Some interfaces are described in type libraries, and you can get a tool from
Microsoft to view type libraries - its on the Platform SDK and supplied with
VC6 - the tool is called OleView. This will show you all the interfaces
described in each registered type libraries and the description of all the
methods in those interfaces. For the interfaces that are not, or cannot be,
described by a type library, you have no option but to look at the C++
header file created for the interface. (If the interface is marshalled you
may be able to get a description of the interfaces from the marshalling
DLL - however, although the information is there, there is no tool available
to do this.)

Richard


Quote:
> hi there,

> in com, interface does not provide implementation of methods.
> but com object should provide something and we could call ? right ?
> and  where are the functions located ? could i find them ?

> thank you for your help!



Mon, 26 May 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Newbie basic question error C1083

2. A VERY basic question

3. Basic question about RSACryptoServiceProvider and encrypting to multiple keys

4. Basic questions about classes

5. A basic question

6. Basic question regarding Interface Implementations ??

7. application control -- basic question

8. basic question about variable declarations

9. Basic Question - char *str V/S int *

10. Canonical XML - basic question

11. Basic question on #include

12. Basic Question

 

 
Powered by phpBB® Forum Software