Click here to Skip to main content
15,921,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hide Application Pin
Simon.W27-Feb-03 2:31
Simon.W27-Feb-03 2:31 
QuestionLinker includes unused functions in output exe?? Pin
Rok27-Feb-03 0:05
Rok27-Feb-03 0:05 
AnswerRe: Linker includes unused functions in output exe?? Pin
Hans Ruck27-Feb-03 0:43
Hans Ruck27-Feb-03 0:43 
GeneralHelp required in case of a tool bar :( Pin
Farrukh4u27-Feb-03 0:04
Farrukh4u27-Feb-03 0:04 
GeneralRe: Help required in case of a tool bar :( Pin
Rage27-Feb-03 2:04
professionalRage27-Feb-03 2:04 
GeneralAbout ListView Pin
Robe26-Feb-03 23:51
Robe26-Feb-03 23:51 
GeneralRe: About ListView Pin
Joan M27-Feb-03 1:05
professionalJoan M27-Feb-03 1:05 
QuestionHow to attach C++ class to COM object? Pin
Pavel Krupets26-Feb-03 23:50
Pavel Krupets26-Feb-03 23:50 
Hello!

I have a COM (ATL) object IDataProvider which used to provide data to some services. This object can be used from other processes.

Also I have a C++ object which contains data and I need to attach this object to IDataProvider object somehow.

eg:
class CDataContainer
{
...
};

class ATL_NO_VTABLE CDataProvider :
public CComObjectRootEx<ccommultithreadmodel>,
public CComCoClass<ctestdataprovider, &clsid_dataprovider="">,
public IDataProvider
{
...
}

I need something like this:
void CDataContainer::DoDataExchange(pDX)
{
CComPtr<idataprovider> pDataProvider;

pDataProvider.CoCreateInstance(CLSID_DataProvider);

pDataProvider->SetDataContainer(this);

// pDX object can be located in another process
pDX->DoDataExchange(pDataProvider);
}

========================================================

IDataProvider object can be created only from DLL which contains CDataContainer code. Can I use it like this:

class CDataContainer
{
...
};

class CDataProvider : public IDataProvider
{
...
}

void CDataContainer::DoDataExchange(pDX)
{
CDataProvider* pDataProvider = new CDataProvider(this);

// pDX object can be located in another process
pDX->DoDataExchange(pDataProvider);
}

With regards,
Pavel Krupets
Questionhow to fetch email from aol or hotmail? Pin
coolvcguy26-Feb-03 22:50
coolvcguy26-Feb-03 22:50 
AnswerRe: how to fetch email from aol or hotmail? Pin
bryce27-Feb-03 0:17
bryce27-Feb-03 0:17 
GeneralRe: how to fetch email from aol or hotmail? Pin
coolvcguy27-Feb-03 18:05
coolvcguy27-Feb-03 18:05 
GeneralRe: how to fetch email from aol or hotmail? Pin
bryce27-Feb-03 22:28
bryce27-Feb-03 22:28 
AnswerRe: how to fetch email from aol or hotmail? Pin
Renjith Ramachandran27-Feb-03 2:55
Renjith Ramachandran27-Feb-03 2:55 
GeneralRe: how to fetch email from aol or hotmail? Pin
coolvcguy27-Feb-03 18:15
coolvcguy27-Feb-03 18:15 
GeneralRe: how to fetch email from aol or hotmail? Pin
coolvcguy27-Feb-03 18:16
coolvcguy27-Feb-03 18:16 
GeneralRe: how to fetch email from aol or hotmail? Pin
bryce27-Feb-03 18:55
bryce27-Feb-03 18:55 
GeneralRe: how to fetch email from aol or hotmail? Pin
coolvcguy27-Feb-03 19:18
coolvcguy27-Feb-03 19:18 
GeneralAssociating a value with Tree Node Pin
Ph@ntom26-Feb-03 22:26
Ph@ntom26-Feb-03 22:26 
GeneralRe: Associating a value with Tree Node Pin
567890123427-Feb-03 1:47
567890123427-Feb-03 1:47 
GeneralIntercepting WM_QUERYENDSESSION Pin
Master Vip26-Feb-03 21:46
Master Vip26-Feb-03 21:46 
GeneralRe: Intercepting WM_QUERYENDSESSION Pin
Hans Ruck26-Feb-03 21:55
Hans Ruck26-Feb-03 21:55 
GeneralWindows skins Pin
Anonymous26-Feb-03 21:45
Anonymous26-Feb-03 21:45 
Questiondelete Operator? Pin
anju26-Feb-03 21:15
anju26-Feb-03 21:15 
AnswerRe: delete Operator? Pin
Hans Ruck26-Feb-03 21:36
Hans Ruck26-Feb-03 21:36 
GeneralRe: Thanks.. Pin
anju27-Feb-03 0:13
anju27-Feb-03 0:13 

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.