Click here to Skip to main content
15,884,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to handle HANDLE from CreateEvent() after used it? Pin
zecodela27-Jun-02 18:07
zecodela27-Jun-02 18:07 
AnswerRe: how to handle HANDLE from CreateEvent() after used it? Pin
Prem Kumar27-Jun-02 19:43
Prem Kumar27-Jun-02 19:43 
GeneralRe: how to handle HANDLE from CreateEvent() after used it? Pin
zecodela28-Jun-02 16:17
zecodela28-Jun-02 16:17 
QuestionHow to return a COM Obj from ATL Pin
27-Jun-02 16:55
suss27-Jun-02 16:55 
AnswerRe: How to return a COM Obj from ATL Pin
Prem Kumar27-Jun-02 19:44
Prem Kumar27-Jun-02 19:44 
AnswerRe: How to return a COM Obj from ATL Pin
A.A.28-Jun-02 17:13
A.A.28-Jun-02 17:13 
GeneralRe: How to return a COM Obj from ATL Pin
29-Jun-02 7:45
suss29-Jun-02 7:45 
GeneralRe: How to return a COM Obj from ATL Pin
A.A.29-Jun-02 14:02
A.A.29-Jun-02 14:02 
What I was recommending is just create the new Object the same way you created the first one but apparantly by reading your new message I understand what you want to do is something a little different.

First of all you can't just return new Object and just cast that to IMyInterface*(If you want the reasons let me know). So what you need to create the first object with Aggretable support. Then create the second simple object using createInstance in the first Object(you will be passing the IUnkonwn* of the first object). Add the COM_INTERFACE_ENTRY_AGGREGATE() macro in the COM map. Dont forget to decrement the reference count when you dont need the second object(remember its still considered a COM object). No need to mess with IDL.

Note: There is a Macro similar to the above that takes care of creation and destruction.

If something is still unclear or need help with a specific part of the code let me know.
Generalwriting a dll Pin
Steve L.27-Jun-02 14:24
Steve L.27-Jun-02 14:24 
GeneralRe: writing a dll Pin
Navin27-Jun-02 15:47
Navin27-Jun-02 15:47 
GeneralRe: writing a dll Pin
Alexandru Savescu27-Jun-02 18:06
Alexandru Savescu27-Jun-02 18:06 
GeneralSet Check and CTreeCtrl Pin
Mr. Bill27-Jun-02 13:34
Mr. Bill27-Jun-02 13:34 
GeneralRe: Set Check and CTreeCtrl Pin
Mr. Bill28-Jun-02 6:37
Mr. Bill28-Jun-02 6:37 
GeneralAccelerator Keys for dynamic created Context Menus Pin
27-Jun-02 11:24
suss27-Jun-02 11:24 
GeneralRe: Accelerator Keys for dynamic created Context Menus Pin
Prem Kumar27-Jun-02 19:56
Prem Kumar27-Jun-02 19:56 
GeneralRe: Accelerator Keys for dynamic created Context Menus Pin
Bill S27-Jun-02 20:27
professionalBill S27-Jun-02 20:27 
QuestionOLE DB Provider running as a service? Pin
StefanM27-Jun-02 11:19
StefanM27-Jun-02 11:19 
GeneralSystemTray tooltip text limit Pin
Ola Carlsson27-Jun-02 11:04
Ola Carlsson27-Jun-02 11:04 
GeneralExe File Pin
27-Jun-02 8:54
suss27-Jun-02 8:54 
GeneralRe: Exe File Pin
Bill Wilson27-Jun-02 9:37
Bill Wilson27-Jun-02 9:37 
GeneralRe: Exe File Pin
udayGovekar27-Jun-02 10:30
udayGovekar27-Jun-02 10:30 
GeneralRe: Exe File Pin
Mazdak27-Jun-02 10:20
Mazdak27-Jun-02 10:20 
GeneralRe: Exe File Pin
27-Jun-02 10:22
suss27-Jun-02 10:22 
GeneralRe: Exe File Pin
Navin27-Jun-02 12:33
Navin27-Jun-02 12:33 
GeneralRe: Exe File Pin
[Shadow]27-Jun-02 14:31
[Shadow]27-Jun-02 14:31 

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.