1。请问如何用vc产生guid2。请问在51页的例子中
typedef BOOL (_stdcall * MyFunctionType)(const CLSID & clsid,
const IID& iid, void ** ppv);
MyFunctionType fnCreateObject;
如何解释3。请问在160页提到vc自动提供DllRegisterServer功能,他注册了那些东西
如何在自己实现的DllUnregisterServer中反注册晴多多执教

解决方案 »

  1.   

    1、不是有附带工具吗?P232、你去看看C++的书吧,你的C++还须加强。
      意思就是定义MyFunctionType作为函数返回BOOL,并且带有3个参数。
      
      有了上面的定义,语句:
        MyFunctionType fnCreateObject;
      相当于:
        BOOL fnCreateObject(const CLSID & clsid,
                    const IID& iid, void ** ppv);  MSDN上有这么一段,你看了就明白了:
    typedef void DRAWF( int, int );This example provides the type DRAWF for a function returning no value and taking two int arguments. This means, for example, that the declarationDRAWF box; is equivalent to the declaration void box( int, int );
    3、我还没看到那里,Sorry。
      

  2.   

    I 服了 U
    一上来就是COM
      

  3.   

    DllRegisterServer会将你程序中用到的Class ID和Interface ID写入注册表,DllUnregisterServer会从注册标中将这些值删掉。
      

  4.   

    你还是先看看c++的书吧,一上来就COM,估计没有人这么学吧------------------
         注:纯粹瞎说
      

  5.   

    uuidgen生成器可生成唯一ID,一般用COM生成向导是不需自指定ID值的BOOL fnCreateObject(const CLSID & clsid,
                    const IID& iid, void ** ppv);
    三参数分别是:类ID 接口ID 和指向接口的地址]DllRegisterServer会将你程序中用到的Class ID和Interface ID写入注册表,其包括符号化和序号化注册。