Dear all
I'm learning about dll in MFC from my workplace. This dll was created by senior programmer. I try learn this dll and write it back into the new one.
But, when I compile 1 file. I have a lot of error even it is same as original.
this is header file
and this is .cpp fileCode:// Book.h : interface of the CBook class
#pragma once
#include "MawarCore\MawarFlit\FBSocket.h"
#include "MawarCore\MawarCtrl\DataBitmap.h"
#include "MawarCore\MawarFlit\Card.h"
#include "AkmalDataDefs.h"
class AKMAL_DATA_API CBook : public CCard
{
public:
int m_PictureID;
int m_BookAttr;
int m_Reserved[20];
public:
// function
CBitmapBin* GetBitmap(CFBSocket* pEmpSock, CRecordHnd* phBuff);
bool DeleteBitmap(CFBSocket* pEmpSock);
public:
CBook(void);
~CBook(void);
};
The error isCode:// Book.cpp : implementation of the CBook class
#include "StdAfx.h"
#include "Book.h"
/////////////////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
/////////////////////////////////////////////////////////////////////////////////
// construction/destruction
/////////////////////////////////////////////////////////////////////////////////
CBook::CBook(void)
{
}
CBook::~CBook(void)
{
}
CBitmapBin* CBook::GetBitmap(CFBSocket* pEmpSock, CRecordHnd* phBuff)
{
if(m_PictureID != 0)
{
CBitmapBin* pBin = (CBitmapBin*)pEmpSock->ReadRecord(phBuff, MRT_PICTDATA, m_PictureID);
if(pBin != NULL)
return pBin;
LogError("Missing picture........");
}
return NULL;
}
bool CBook::DeleteBitmap(CFBSocket *pEmpSock)
{
if(m_PictureID != 0)
{
pEmpSock->ReadRecord(MRT_PICTDATA, m_PictureID);
m_PictureID = 0;
}
return true;
}
1. error C2332: 'class' : missing tag name
2. error C2011: '__unnamed' : 'enum' type redefinition
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\ShlObj.h(4476) : see declaration of '__unnamed'
3. error C2470: 'CBook' : looks like a function definition, but there is no formal parameter list; skipping apparent body
4. error C2059: syntax error : 'public'
5. error C2653: 'CBook' : is not a class or namespace name
6. warning C4508: 'CBook' : function should return a value; 'void' return type assumed
7. error C2653: 'CBook' : is not a class or namespace name
8. error C2084: function 'int CBook(void)' already has a body
c:\Documents and Settings\Rokman\My Documents\Visual Studio Projects\Akmal Project Suite\Library\Akmal-Data\Book.cpp(17) : see previous definition of 'CBook'
9. error C2653: 'CBook' : is not a class or namespace name
and a few more like the class never declare......
Can anybody explain to me what all of this error mean????
ps : I really appreciate who can explain this to me..... tq
