MFC中引来ADO类库出错,求大神解答
MFC中引入ADO类库出错,求大神解答
// Created by Microsoft (R) C/C++ Compiler Version 12.00.8168.0 (56f07146).
//
// c:\users\administrator\desktop\新建\层次\debug\msado15.tli
//
// Wrapper implementations for type library C:\Program Files\Common Files\System\ado\msado15.dll
// compiler-generated file created 01/12/15 at 20:29:59 - DO NOT EDIT!
//
// interface _Collection wrapper method implementations
//
项目目录下有msado15.tli 和msado15.tlh 文件,但类里面却没有包含

------解决思路----------------------
这不是import进去的吗,能用_ConnectionPtr之类的就可以了
------解决思路----------------------
参考资料http://www.vckbase.com/index.php/wv/1776.html
------解决思路----------------------
使用了#import,是不需要再使用#include的。#import会由.tlb文件生成.tlh之类的文件,并将其包含进来,同时建立COM智能指针。若不使用#import,纯手工调COM组件,是很费劲的(我就这么干过,^_^)。
// Created by Microsoft (R) C/C++ Compiler Version 12.00.8168.0 (56f07146).
//
// c:\users\administrator\desktop\新建\层次\debug\msado15.tli
//
// Wrapper implementations for type library C:\Program Files\Common Files\System\ado\msado15.dll
// compiler-generated file created 01/12/15 at 20:29:59 - DO NOT EDIT!
//
// interface _Collection wrapper method implementations
//
项目目录下有msado15.tli 和msado15.tlh 文件,但类里面却没有包含
------解决思路----------------------
这不是import进去的吗,能用_ConnectionPtr之类的就可以了
------解决思路----------------------
参考资料http://www.vckbase.com/index.php/wv/1776.html
------解决思路----------------------
使用了#import,是不需要再使用#include的。#import会由.tlb文件生成.tlh之类的文件,并将其包含进来,同时建立COM智能指针。若不使用#import,纯手工调COM组件,是很费劲的(我就这么干过,^_^)。