【急求助】程序中出现missing ';' before 'PCH creation point'错误信息是怎么回事?
程序中出现missing ';' before 'PCH creation point'错误信息是怎么回事?各位大虾帮忙!
源码:
//factory.cpp文件
#include "Factory.h"
#include "Math.h"
extern ULONG g_LockNumber;
extern ULONG g_MathNumber;
CMathFactory::CMathFactory()
{
m_Ref=0;
}
CMathFactory::~CMathFactory()
{
}
HRESULT CMathFactory::QueryInterface(const IID& iid,void **ppv)
{
if(iid==IID_IUnknow)
{
*ppv=(IUnknow*)this;
((IUnknow*)(*ppv))->AddRef();
}
else if(iid==IID_IClassFactory)
{
*ppv=(IAdd*)this;
((IClassFactory*)(*ppv))->AddRef();
}
else
{
*ppv=NULL;
return E_NOINTERFACE;
}
return S_OK;
}
ULONG CMathFactory::AddRef()
{
return (ULONG) (++m_Ref);
}
ULONG CMathFactory::Release()
{
if(--m_Ref==0)
{
delete this;
return 0;
}
return (ULONG) m_Ref;
}
HRESULT CMathFactory::CreateInstance(IUnknown *pUnknownOuter,const IID &iid,void **ppv)
{
CMath* pObj;
HRESULT hr;
*ppv=NULL;
hr=E_OUTOFMEMORY;
if(NULL!=pUnknownOuter)
return CLASS_E_NOAGGREGATION;
pObj=new CMath();
if(NULL==pObj)
return hr;
hr=pObj->QueryInterface(iid,ppv);
if(hr!=S_OK)
{
g_MathNumber--;
delete pObj;
}
return hr;
}
HRESULT CMathFactory::LockServer(BOOL block)
{
if(block)
g_LockNumber++;
else
g_LockNumber--;
return NOERROR;
}
factory.h文件
#ifndef __MATH_FACTORY__
#define __MATH_FACTORY__
#include "Unknwn.h"
class CMathFactory:public IClassFactory
{
protected:
ULONG m_Ref;
public:
CMathFactory();
~CMathFactory();
HRESULT __stdcall QueryInterface(const IID& iid,void **ppv);
ULONG __stdcall AddRef();
ULONG __stdcall Release();
HRESULT __stdcall CreateInstance(IUnknown *,const IID& iid,void **ppv);
HRESULT __stdcall LockServer(BOOL block);
};
#endif;