Click here to Skip to main content
15,848,483 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to link to dll using function names rather than ordinals Pin
Naveen24-Aug-09 21:34
Naveen24-Aug-09 21:34 
AnswerRe: How to link to dll using function names rather than ordinals Pin
Chesnokov Yuriy24-Aug-09 22:02
professionalChesnokov Yuriy24-Aug-09 22:02 
AnswerRe: How to link to dll using function names rather than ordinals Pin
Rick York25-Aug-09 7:12
mveRick York25-Aug-09 7:12 
AnswerRe: How to link to dll using function names rather than ordinals Pin
Chesnokov Yuriy25-Aug-09 20:08
professionalChesnokov Yuriy25-Aug-09 20:08 
QuestionOutlook Automation Pin
john563224-Aug-09 21:12
john563224-Aug-09 21:12 
AnswerRe: Outlook Automation Pin
_AnsHUMAN_ 24-Aug-09 23:08
_AnsHUMAN_ 24-Aug-09 23:08 
QuestionRe: Outlook Automation Pin
David Crow25-Aug-09 4:27
David Crow25-Aug-09 4:27 
QuestionUsing dynamic_cast for Clist Pin
blontek24-Aug-09 21:08
blontek24-Aug-09 21:08 
Please I need help on this, I'm new in C++.

Here are the details:
1. I have a base class and 3 derived classes:

Base class
class CRepositoryData
{
...
};
Derived classes
class CUser_data : public CRepositoryData
{
...
};
class CLock_data : public CRepositoryData
{
...
};
class CReferences_data : public CRepositoryData
{
...
};

2. My declaration for my classes in my function uses CList <>
main()
{
CList <CLock_data,CLock_data&> listLockDataTemp_L;
CList <CReferences_data,CReferences_data&> listLocationDataTemp_L;
CList <CUser_data,CUser_data&> listUserDataTemp_L;

if(Lock)
{
CreateBatchToSend(
dynamic_cast<CList<CRepositoryData,CRepositoryData&>*>(&listLockDataTemp_L));
}else if(CReferences)
{
CreateBatchToSend(
dynamic_cast<CList<CRepositoryData,CRepositoryData&>*>&listLocationDataDataTemp_L));

}else
CreateBatchToSend(
dynamic_cast<CList<CRepositoryData,CRepositoryData&>*>(&listUserDataTemp_L));

}

}

3. Is this code possible for my CreateBatchToSend()?

BOOL CreateBatchToSend(CList <CRepositoryData,CRepositoryData&> *pListRepData_P)
{
...
CList <CLock_data,CLock_data&> listLockDataTemp_L;
listLockDataTemp = dynamic_cast<CList<CLock_data,CLock_data&>*>pListRepData_P;
...
}


4. I am trying to create a function that can take those 3 derived classes in a list by using the base class as the argument and then use dynamic cast to revert back to their respective class.
Do I need to use other containers to implement this?

Any suggestions would be very helpful. Thanks a lot...
AnswerRe: Using dynamic_cast for Clist Pin
Cedric Moonen24-Aug-09 21:50
Cedric Moonen24-Aug-09 21:50 
GeneralRe: Using dynamic_cast for Clist Pin
blontek24-Aug-09 22:33
blontek24-Aug-09 22:33 
GeneralRe: Using dynamic_cast for Clist Pin
Cedric Moonen24-Aug-09 22:41
Cedric Moonen24-Aug-09 22:41 
GeneralRe: Using dynamic_cast for Clist Pin
Stuart Dootson25-Aug-09 0:54
professionalStuart Dootson25-Aug-09 0:54 
GeneralRe: Using dynamic_cast for Clist Pin
blontek25-Aug-09 1:42
blontek25-Aug-09 1:42 
GeneralRe: Using dynamic_cast for Clist Pin
Stuart Dootson25-Aug-09 3:46
professionalStuart Dootson25-Aug-09 3:46 
QuestionCWebBrowser Control - Proxy setting Pin
Member 383463024-Aug-09 20:56
Member 383463024-Aug-09 20:56 
AnswerRe: CWebBrowser Control - Proxy setting Pin
autodebug24-Aug-09 21:26
autodebug24-Aug-09 21:26 
GeneralRe: CWebBrowser Control - Proxy setting Pin
Member 383463024-Aug-09 21:53
Member 383463024-Aug-09 21:53 
GeneralRe: CWebBrowser Control - Proxy setting Pin
autodebug24-Aug-09 22:31
autodebug24-Aug-09 22:31 
GeneralRe: CWebBrowser Control - Proxy setting Pin
Member 383463024-Aug-09 23:55
Member 383463024-Aug-09 23:55 
GeneralRe: CWebBrowser Control - Proxy setting Pin
Stuart Dootson25-Aug-09 3:49
professionalStuart Dootson25-Aug-09 3:49 
GeneralRe: CWebBrowser Control - Proxy setting Pin
Member 383463025-Aug-09 20:42
Member 383463025-Aug-09 20:42 
GeneralRe: CWebBrowser Control - Proxy setting Pin
Stuart Dootson25-Aug-09 21:58
professionalStuart Dootson25-Aug-09 21:58 
GeneralRe: CWebBrowser Control - Proxy setting Pin
msrikant2-Sep-09 12:36
msrikant2-Sep-09 12:36 
QuestionCDatabase Create Table Pin
rdop24-Aug-09 20:46
rdop24-Aug-09 20:46 
AnswerRe: CDatabase Create Table Pin
rdop24-Aug-09 21:38
rdop24-Aug-09 21:38 

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.