关于comip.h(690)./comip.h(195) 编译错误的修改

来源:互联网 发布:2017年气象灾害数据 编辑:程序博客网 时间:2024/06/15 21:38

最近做一个KTV点歌系统, 编译时发现两个错误,网上找了好久,无意中看到解决方法,编译通过了.

 

c:/program   files/microsoft   visual   studio/vc98/include/comip.h(690)   :   error   C2227:   left   of   '->QueryInterface'   must   point   to   class/struct/union  
                  c:/program   files/microsoft   visual   studio/vc98/include/comip.h(195)   :   see   reference   to   function   template   instantiation   'long   __thiscall   _com_ptr_t<class   _com_IIID<struct   _Connection,&struct   __s_GUID     _GUID_00000550_0000_0010_8000_00aa006d2ea4  
  >   >::_QueryInterface(long   *const   &   )'   being   compiled  

 

修改程序中的bool 类型为BOOL,因为我程序中函数返回值是BOOL,而代码中是return true/false;应该改为 return  TRUE/FALSE.

所有函数的返回值都对应后就OK了.