Click here to Skip to main content
15,917,174 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dereferencing iterators Pin
Anonymous6-Nov-02 16:59
Anonymous6-Nov-02 16:59 
GeneralThread & Message Parameters Pin
stevenson6-Nov-02 15:35
stevenson6-Nov-02 15:35 
GeneralThis works, but is it the right way to do it Pin
kjessee6-Nov-02 15:33
kjessee6-Nov-02 15:33 
GeneralRe: This works, but is it the right way to do it Pin
Christian Graus6-Nov-02 15:42
protectorChristian Graus6-Nov-02 15:42 
GeneralRe: This works, but is it the right way to do it Pin
kjessee6-Nov-02 15:56
kjessee6-Nov-02 15:56 
Generalsimple ATL-COM question. Pin
devvvy6-Nov-02 15:14
devvvy6-Nov-02 15:14 
GeneralRe: simple ATL-COM question. Pin
Christian Graus6-Nov-02 15:30
protectorChristian Graus6-Nov-02 15:30 
GeneralRe: simple ATL-COM question. Pin
Stefan Pedersen6-Nov-02 15:37
Stefan Pedersen6-Nov-02 15:37 
Q1. [out,retval]
Languages like VB (and friends) handles the "real" returnvalue from the function (a HRESULT) "under the hood" and returns the retval parameter instead to the caller.

The C++ way of doing this would have been to throw an exception but C++ exceptions are not allowed to leave a COM function. (This also applies to "properties" which in C++ is mapped into 2 functions, put_ & get_ usually).
Instead the the parameter is passed by reference and marked as an out-parameter in the IDL.

By using the #import directive without any options you get wrappers for the objects that WILL generate exceptions, com_errror, but I prefer doing it raw Smile | :)

Q2. progID
From the top of my head, in the projects .rgs file.
I'm too tired to remember (and far too tired to check) but it might also be present in the .idl file...

[edit]
Ops, forgot... The STDMETHODIMP also specifices the calling convention of the function, i.e. HOW parameters are passed in and out and who is responsible for the mess afterwards Smile | :)
[/edit]
Generalkeep getting invalid progID Pin
devvvy6-Nov-02 15:57
devvvy6-Nov-02 15:57 
GeneralRe: keep getting invalid progID Pin
Stefan Pedersen6-Nov-02 16:12
Stefan Pedersen6-Nov-02 16:12 
Generalokay, now it's working, BUT.... Pin
devvvy6-Nov-02 17:55
devvvy6-Nov-02 17:55 
GeneralMSDev.exe crashing at startup Pin
Chris Meech6-Nov-02 14:31
Chris Meech6-Nov-02 14:31 
GeneralRe: MSDev.exe crashing at startup Pin
James Spibey7-Nov-02 0:20
James Spibey7-Nov-02 0:20 
GeneralRe: MSDev.exe crashing at startup Pin
Chris Meech7-Nov-02 2:43
Chris Meech7-Nov-02 2:43 
QuestionCan anyone see the problem in this code? Pin
Anonymous6-Nov-02 13:33
Anonymous6-Nov-02 13:33 
AnswerRe: Can anyone see the problem in this code? Pin
moliate6-Nov-02 14:29
moliate6-Nov-02 14:29 
GeneralRe: Can anyone see the problem in this code? Pin
Anonymous7-Nov-02 6:48
Anonymous7-Nov-02 6:48 
GeneralRe: Can anyone see the problem in this code? Pin
moliate7-Nov-02 12:15
moliate7-Nov-02 12:15 
GeneralApplication hiding and inactive at startup Pin
Anonymous6-Nov-02 13:10
Anonymous6-Nov-02 13:10 
GeneralDeleting objects created with the new operator Pin
Daniel Jurnove6-Nov-02 12:59
sussDaniel Jurnove6-Nov-02 12:59 
GeneralRe: Deleting objects created with the new operator Pin
Christian Graus6-Nov-02 13:15
protectorChristian Graus6-Nov-02 13:15 
GeneralRe: Deleting objects created with the new operator Pin
Maximilien6-Nov-02 13:17
Maximilien6-Nov-02 13:17 
GeneralVisual studio installer, shortcut question Pin
Anonymous6-Nov-02 12:58
Anonymous6-Nov-02 12:58 
Generalpoppin controls in win32 api Pin
stephen.hazel6-Nov-02 12:42
stephen.hazel6-Nov-02 12:42 
GeneralProfiling with Visual C++net Pin
el666-Nov-02 12:30
el666-Nov-02 12:30 

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.