| 编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛
全能ASP/PHP/ASP.NET主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付学习型 ASP/PHP/ASP.NET 主机 30元/年
高端软件开发 = 年薪十万不是梦赛孚耐:软件保护加密专家身份认证令牌USB KEY 
共有 264 人关注过本帖
标题:【急求助】程序中出现missing ';' before 'PCH creation point'错误信息是怎么回事?
收藏  订阅  推荐  打印
lixuanalex
Rank: 2
等级:注册会员
帖子:42
积分:548
注册:2008-4-23
【急求助】程序中出现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;
搜索更多相关主题的帖子: PCH  错误信息  程序中  creation  point  
2008-5-21 08:31
关于我们 | 广告合作 | 编程中国 | 清除Cookies | Archiver | WAP | TOP

编程中国 版权所有,并保留所有权利。鲁ICP备08000592号
Powered by Discuz, Processed in 0.047310 second(s), 9 queries.
Copyright©2004-2008, BCCN.NET, All Rights Reserved