该dll是用C++写的,delphi调用都没问题。
VC中用#import "CRC_CCITT.DLL" 引入
编译时提示如下:
D:\phs_vc\PHS_T\func.cpp(3) : fatal error C1083: Cannot open type library file: 'CRC_CCITT.DLL':加载类型库/DLL时出错。
用MFC ClassWizard-Automation-Add Class-From a type library方法打开dll时,又出现如下错误提示:
loadtypelib returned error ,maybe the file is not a type library.
可我那个dll工程里没有tlb文件,这是为什么?
VC中用#import "CRC_CCITT.DLL" 引入
编译时提示如下:
D:\phs_vc\PHS_T\func.cpp(3) : fatal error C1083: Cannot open type library file: 'CRC_CCITT.DLL':加载类型库/DLL时出错。
用MFC ClassWizard-Automation-Add Class-From a type library方法打开dll时,又出现如下错误提示:
loadtypelib returned error ,maybe the file is not a type library.
可我那个dll工程里没有tlb文件,这是为什么?
由于这个dll有许多接口函数急着用,拜托哪位大哥救救兄弟,能给一点建设性建议也散分。
不然我完不成任务!!!
//加载我们的dll
HINSTANCE hinst=::LoadLibrary("COM_1.dll");
2,调用带头文件的
#include "..\header.h"//注意路径//注意路径,加载 COM_1.lib 的另一种方法是 Project | setting | link 设置里
#pragma comment(lib,"COM_1.lib")
loadtypelib returned error ,maybe the file is not a type library.
可我那个dll工程里没有tlb文件,这是为什么?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
你的dll是一般的动态连接库,不是vc中的com工程
2.在使用的.cpp文件中 #include "CRC_CCITT.h"即可。