Click here to Skip to main content
15,912,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Sending and receiving files trought CAsyncSocket derived class Pin
Masaaki Onishi4-Aug-02 7:18
Masaaki Onishi4-Aug-02 7:18 
QuestionCRDBMS??? Pin
alex.barylski4-Aug-02 2:18
alex.barylski4-Aug-02 2:18 
AnswerRe: CRDBMS??? Pin
Pavel Klocek4-Aug-02 6:54
Pavel Klocek4-Aug-02 6:54 
QuestionATL Problems ? Pin
Leesen3-Aug-02 22:56
Leesen3-Aug-02 22:56 
AnswerRe: ATL Problems ? Pin
Christian Graus3-Aug-02 23:07
protectorChristian Graus3-Aug-02 23:07 
GeneralRe: ATL Problems ? Pin
Leesen3-Aug-02 23:39
Leesen3-Aug-02 23:39 
AnswerRe: ATL Problems ? Pin
Michael P Butler4-Aug-02 2:40
Michael P Butler4-Aug-02 2:40 
AnswerRe: ATL Problems ? Pin
Philippe Mori5-Aug-02 8:15
Philippe Mori5-Aug-02 8:15 
You should returns a new object; something like:

STDMETHODIMP CTeacher::get_OneStudent(IStudent **pVal)
{
   AFX_MANAGE_STATE(AfxGetStaticModuleState())

   // TODO: Add your implementation code here
   **pVal = * m_aStudent;
   (*pVal)->AddRef();
   return S_OK;
}


Also note that others functions need to be modified. For example setting a new student would have to update the pointer (and properly adjusting reference count).

As mentionned in another answer, you cannot pass object around but only interface to objects...

Philippe Mori
GeneralADO in console App Pin
Virtual Destructor3-Aug-02 22:02
Virtual Destructor3-Aug-02 22:02 
GeneralRe: ADO in console App Pin
Michael P Butler3-Aug-02 23:46
Michael P Butler3-Aug-02 23:46 
QuestionHow can i know if the desktop windows Z order has been changed Pin
adara3-Aug-02 20:34
adara3-Aug-02 20:34 
GeneralCommand Line arguments Pin
CaLvin Tan3-Aug-02 19:28
CaLvin Tan3-Aug-02 19:28 
GeneralRe: Command Line arguments Pin
Michael Dunn3-Aug-02 20:13
sitebuilderMichael Dunn3-Aug-02 20:13 
QuestionHow to draw shadow of sphere and line Pin
dark-gura3-Aug-02 18:52
dark-gura3-Aug-02 18:52 
Question(Cloning) How do I enable "Multiple Instance" in a C++ app? Pin
BaByBoI3-Aug-02 18:51
sussBaByBoI3-Aug-02 18:51 
AnswerRe: (Cloning) How do I enable "Multiple Instance" in a C++ app? Pin
Ravi Bhavnani3-Aug-02 20:56
professionalRavi Bhavnani3-Aug-02 20:56 
AnswerRe: (Cloning) How do I enable "Multiple Instance" in a C++ app? Pin
Daniel Lohmann5-Aug-02 7:20
Daniel Lohmann5-Aug-02 7:20 
Questionhow does script engine in IE work ? Pin
Anonymous3-Aug-02 18:39
Anonymous3-Aug-02 18:39 
GeneralHELP! My Visual C++ 6.0 could not find Iphlpapi.h Pin
Anonymous3-Aug-02 18:26
Anonymous3-Aug-02 18:26 
GeneralRe: HELP! My Visual C++ 6.0 could not find Iphlpapi.h Pin
adara3-Aug-02 19:02
adara3-Aug-02 19:02 
GeneralRe: Could not download Update Platform SDK Pin
ATC9-Aug-02 4:50
ATC9-Aug-02 4:50 
GeneralRe: I could not download it! Pin
ATC9-Aug-02 8:35
ATC9-Aug-02 8:35 
GeneralMy DLL's registry functions Pin
Selevercin3-Aug-02 15:36
Selevercin3-Aug-02 15:36 
GeneralThrowing exceptions Pin
alex.barylski3-Aug-02 15:22
alex.barylski3-Aug-02 15:22 
GeneralRe: Throwing exceptions Pin
Vivek Rajan3-Aug-02 18:55
Vivek Rajan3-Aug-02 18:55 

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.