Click here to Skip to main content
15,920,513 members
Home / Discussions / COM
   

COM

 
GeneralRe: Keeping COM server active Pin
igor19603-Sep-03 11:36
igor19603-Sep-03 11:36 
GeneralRe: Keeping COM server active Pin
Gilrock3-Sep-03 11:50
Gilrock3-Sep-03 11:50 
GeneralRe: Keeping COM server active Pin
igor19603-Sep-03 12:01
igor19603-Sep-03 12:01 
GeneralRe: Keeping COM server active Pin
Gilrock3-Sep-03 12:13
Gilrock3-Sep-03 12:13 
GeneralRe: Keeping COM server active Pin
Gilrock3-Sep-03 13:02
Gilrock3-Sep-03 13:02 
GeneralRe: Keeping COM server active Pin
Gilrock4-Sep-03 6:20
Gilrock4-Sep-03 6:20 
GeneralRe: Keeping COM server active Pin
igor19604-Sep-03 6:50
igor19604-Sep-03 6:50 
GeneralReturn Interface Pointer Pin
Daniel Strigl1-Sep-03 4:50
Daniel Strigl1-Sep-03 4:50 
Hi!

I am very new to COM and ATL and try to implement something like this:
I have a simple COM server with the following interface:
[
    object, ...
]
interface ITest : IUnknown
{
    [id(1), helpstring("Methode GetInterface")] HRESULT GetInterface([in] int n, [out] ITest2** pITest2);
};

The interface method GetInterface should return a new pointer to the interface
ITest2. This function should not work like QueryInterface, the
interface ITest2 is not in the same coclass as the ITest, it's in
another coclass.

This function should work like the following DirectX (DirectDraw) function CreateSurface:
LPDIRECTDRAW        lpDD = NULL;
LPDIRECTDRAWSURFACE lpDDSPrimary = NULL;
...
HRESULT hError = lpDD->CreateSurface(&DDSurfaceDesc, &lpDDSPrimary, NULL);
...

How can I implement the GetInterface function?
The ITest2 interface (and the coclass of the interface) should not be creatable
with the CoCreateInstance, it should be only created by the GetInterface
method!

Daniel Wink | ;)
---------------------------
Never change a running system!
GeneralRe: Return Interface Pointer Pin
valikac1-Sep-03 6:01
valikac1-Sep-03 6:01 
GeneralRe: Return Interface Pointer Pin
Daniel Strigl1-Sep-03 20:03
Daniel Strigl1-Sep-03 20:03 
GeneralRe: Return Interface Pointer Pin
Stefan Pedersen1-Sep-03 10:20
Stefan Pedersen1-Sep-03 10:20 
GeneralRe: Return Interface Pointer Pin
Daniel Strigl1-Sep-03 20:04
Daniel Strigl1-Sep-03 20:04 
GeneralRe: Return Interface Pointer Pin
Lim Bio Liong18-Sep-03 19:28
Lim Bio Liong18-Sep-03 19:28 
GeneralRe: Return Interface Pointer Pin
Lim Bio Liong18-Sep-03 19:34
Lim Bio Liong18-Sep-03 19:34 
GeneralRe: Return Interface Pointer Pin
Daniel Strigl11-Oct-03 2:27
Daniel Strigl11-Oct-03 2:27 
Question"parameter not optional"? Pin
Yu Zhiquan1-Sep-03 1:24
Yu Zhiquan1-Sep-03 1:24 
AnswerRe: "parameter not optional"? Pin
Stefan Pedersen1-Sep-03 10:21
Stefan Pedersen1-Sep-03 10:21 
AnswerRe: "parameter not optional"? Pin
igor19603-Sep-03 10:59
igor19603-Sep-03 10:59 
GeneralThread Id of client app Pin
In-At31-Aug-03 23:08
In-At31-Aug-03 23:08 
GeneralRe: Thread Id of client app Pin
valikac1-Sep-03 6:03
valikac1-Sep-03 6:03 
GeneralRe: Thread Id of client app Pin
In-At1-Sep-03 18:26
In-At1-Sep-03 18:26 
GeneralRe: Thread Id of client app Pin
valikac2-Sep-03 4:46
valikac2-Sep-03 4:46 
GeneralDetecting COM leaks Pin
sharlila31-Aug-03 5:38
sharlila31-Aug-03 5:38 
GeneralRe: Detecting COM leaks Pin
Stefan Pedersen1-Sep-03 10:24
Stefan Pedersen1-Sep-03 10:24 
Generalhmm, no Pin
sharlila2-Sep-03 6:20
sharlila2-Sep-03 6:20 

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.