Click here to Skip to main content
15,894,362 members
Home / Discussions / COM
   

COM

 
AnswerRe: Difference between COM and DLL Pin
Steve S21-Jun-07 2:05
Steve S21-Jun-07 2:05 
AnswerRe: Difference between COM and DLL Pin
CPallini24-Jun-07 20:38
mveCPallini24-Jun-07 20:38 
QuestionProblem facing with connection points Pin
Raj Prathap17-Jun-07 21:05
Raj Prathap17-Jun-07 21:05 
AnswerRe: Problem facing with connection points Pin
HakunaMatada20-Jun-07 19:38
HakunaMatada20-Jun-07 19:38 
GeneralRe: Problem facing with connection points Pin
Raj Prathap20-Jun-07 21:52
Raj Prathap20-Jun-07 21:52 
QuestionConfused about queryinterface and cocreateinstance Pin
sawerr17-Jun-07 20:39
sawerr17-Jun-07 20:39 
AnswerRe: Confused about queryinterface and cocreateinstance Pin
cool_raja19-Jun-07 21:04
cool_raja19-Jun-07 21:04 
AnswerRe: Confused about queryinterface and cocreateinstance Pin
Steve S20-Jun-07 1:46
Steve S20-Jun-07 1:46 
CoCreateInstance will give you an instance of a class of object (defined by the CLSID), and allow you to reference it via an interface (defined by the IID).

You can then ask the object for a different interface via QueryInterface.

As an example, imagine an object which displays data onto a device context. This uses an 'IRender' interface, which allows you to specify stuff like where to render to, and stuff like a zoom ratio, etc. But the object also supports the IPersistFile interface, to allow the saving/loading of the object to/from file.

The only way to get to IPersistFile from IRender is via IUnknown's QueryInterface method.

If you only use simple objects, they may only implement one (custom) interface, although in practice IUnknown must always be supported as well.

Does that help?

Steve S
Developer for hire

GeneralRe: Confused about queryinterface and cocreateinstance Pin
sawerr20-Jun-07 3:04
sawerr20-Jun-07 3:04 
QuestionCLSID Pin
Rose8116-Jun-07 16:14
Rose8116-Jun-07 16:14 
QuestionThird-party COM Pin
Gregory Mermoud16-Jun-07 14:27
Gregory Mermoud16-Jun-07 14:27 
QuestionDLL Registration Pin
Rose8116-Jun-07 2:21
Rose8116-Jun-07 2:21 
Questiontype library generation Pin
ttomanek14-Jun-07 21:53
ttomanek14-Jun-07 21:53 
AnswerRe: type library generation Pin
ttomanek15-Jun-07 3:04
ttomanek15-Jun-07 3:04 
QuestionExport to Excel via VB.NET 1.1 Not Working [modified] Pin
Brendan Vogt14-Jun-07 20:48
Brendan Vogt14-Jun-07 20:48 
AnswerRe: Export to Excel via VB.NET 1.1 Not Working Pin
HakunaMatada20-Jun-07 19:42
HakunaMatada20-Jun-07 19:42 
Questioncode for representing "Events" for a custom control in classic ASP Pin
MurtyINM14-Jun-07 19:59
MurtyINM14-Jun-07 19:59 
Questionwhy can't be CoCreateInstance after install to COM+ app? Pin
Chen Jiadong13-Jun-07 20:56
Chen Jiadong13-Jun-07 20:56 
QuestionConnection points for Chat server using ATL/COM Pin
Raj Prathap12-Jun-07 20:37
Raj Prathap12-Jun-07 20:37 
QuestionA bit of help requested for an IE BHO Pin
keesp12-Jun-07 11:48
keesp12-Jun-07 11:48 
QuestionError info of FileSystemObject Pin
Lane Yu11-Jun-07 4:12
Lane Yu11-Jun-07 4:12 
AnswerRe: Error info of FileSystemObject Pin
Steve S11-Jun-07 6:47
Steve S11-Jun-07 6:47 
GeneralRe: Error info of FileSystemObject Pin
Lane Yu12-Jun-07 2:47
Lane Yu12-Jun-07 2:47 
GeneralRe: Error info of FileSystemObject Pin
Steve S13-Jun-07 1:33
Steve S13-Jun-07 1:33 
QuestionCOM Error :( Pin
gvanto7-Jun-07 14:36
gvanto7-Jun-07 14:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.