Click here to Skip to main content
15,922,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to open default mail client and pass to it subject, body and an attachement? Pin
David Crow28-Jul-05 5:44
David Crow28-Jul-05 5:44 
GeneralRe: How to open default mail client and pass to it subject, body and an attachement? Pin
petehero28-Jul-05 18:43
petehero28-Jul-05 18:43 
GeneralRe: How to open default mail client and pass to it subject, body and an attachement? Pin
David Crow29-Jul-05 2:28
David Crow29-Jul-05 2:28 
GeneralRe: How to open default mail client and pass to it subject, body and an attachement? Pin
petehero31-Jul-05 19:48
petehero31-Jul-05 19:48 
Generalmodeless dialog pointer Pin
sayup27-Jul-05 18:58
sayup27-Jul-05 18:58 
GeneralRe: modeless dialog pointer Pin
Christian Graus27-Jul-05 19:14
protectorChristian Graus27-Jul-05 19:14 
GeneralRe: modeless dialog pointer Pin
sayup27-Jul-05 20:53
sayup27-Jul-05 20:53 
GeneralRe: modeless dialog pointer Pin
Christian Graus28-Jul-05 15:10
protectorChristian Graus28-Jul-05 15:10 
GeneralRe: modeless dialog pointer Pin
sayup28-Jul-05 19:39
sayup28-Jul-05 19:39 
GeneralRe: modeless dialog pointer Pin
Christian Graus28-Jul-05 19:49
protectorChristian Graus28-Jul-05 19:49 
GeneralRe: modeless dialog pointer Pin
sayup28-Jul-05 21:51
sayup28-Jul-05 21:51 
GeneralRe: modeless dialog pointer Pin
Christian Graus31-Jul-05 13:13
protectorChristian Graus31-Jul-05 13:13 
GeneralRe: modeless dialog pointer Pin
ddmcr27-Jul-05 21:46
ddmcr27-Jul-05 21:46 
GeneralRe: modeless dialog pointer Pin
sayup28-Jul-05 19:40
sayup28-Jul-05 19:40 
Questionhow to debug exe service? Pin
HeartFriend27-Jul-05 17:03
HeartFriend27-Jul-05 17:03 
AnswerRe: how to debug exe service? Pin
Christian Graus27-Jul-05 17:05
protectorChristian Graus27-Jul-05 17:05 
Questionhow to design multiple inheritance classes? Pin
nm_11427-Jul-05 16:39
nm_11427-Jul-05 16:39 
AnswerRe: how to design multiple inheritance classes? Pin
Christian Graus27-Jul-05 16:49
protectorChristian Graus27-Jul-05 16:49 
GeneralRe: how to design multiple inheritance classes? Pin
nm_11427-Jul-05 18:02
nm_11427-Jul-05 18:02 
GeneralRe: how to design multiple inheritance classes? Pin
Christian Graus27-Jul-05 18:08
protectorChristian Graus27-Jul-05 18:08 
GeneralRe: how to design multiple inheritance classes? Pin
nm_11427-Jul-05 18:34
nm_11427-Jul-05 18:34 
GeneralRe: how to design multiple inheritance classes? Pin
Christian Graus27-Jul-05 19:06
protectorChristian Graus27-Jul-05 19:06 
GeneralRe: how to design multiple inheritance classes? Pin
nm_11427-Jul-05 19:56
nm_11427-Jul-05 19:56 
ok, i think i *almost* have it, but its giving me the following errors:
Linking...
winiotest.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall WinFileOutInterface::DoWriteFile(void const *,unsigned long)" (?DoWriteFile@WinFileOutInterface@@UAEHPBXK@Z)
winiotest.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall WinFileInInterface::DoReadFile(void *,unsigned long)" (?DoReadFile@WinFileInInterface@@UAEHPAXK@Z)
winiotest.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall WinFileInInterface::Open(char const *)" (?Open@WinFileInInterface@@UAEHPBD@Z)
winiotest.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall WinFileOutInterface::Open(char const *)" (?Open@WinFileOutInterface@@UAEHPBD@Z)
Debug/winiotest.exe : fatal error LNK1120: 4 unresolved externals


here's my code so far:
struct WFIOInfo
{
	HANDLE m_hFile;
	DWORD m_dwBytes;
};

class WinFileInInterface
{
public:
	virtual BOOL Open(LPCTSTR lpszFileName);
	virtual BOOL DoReadFile(LPVOID lpBuffer, DWORD nNumberOfBytesToRead);
};

class WinFileOutInterface
{
public:
	virtual BOOL Open(LPCTSTR lpszFileName);
	virtual BOOL DoWriteFile(LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite);
};

class CWinFileIn : WFIOInfo, WinFileInInterface
{
public:
	virtual BOOL Open(LPCTSTR lpszFileName)
	{
		return TRUE;
	}
	virtual BOOL DoReadFile(LPVOID lpBuffer, DWORD nNumberOfBytesToRead)
	{
		return ::ReadFile(m_hFile, lpBuffer, nNumberOfBytesToRead, &m_dwBytes, NULL);
	}
};

class CWinFileOut : WFIOInfo, WinFileOutInterface
{
public:
	virtual BOOL Open(LPCTSTR lpszFileName)
	{
		return TRUE;
	}
	virtual BOOL DoWriteFile(LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite)
	{
		return ::WriteFile(m_hFile, lpBuffer, nNumberOfBytesToWrite, &m_dwBytes, NULL);
	}
};

class CWinFileInOut : WFIOInfo, WinFileInInterface, WinFileOutInterface
{
public:
	BOOL Open(LPCTSTR lpszFileName)
	{
		return TRUE;
	}
};


any idea what i'm doing wrong?
GeneralRe: how to design multiple inheritance classes? Pin
GDavy27-Jul-05 20:29
GDavy27-Jul-05 20:29 
GeneralRe: how to design multiple inheritance classes? Pin
nm_11428-Jul-05 18:02
nm_11428-Jul-05 18:02 

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.