描述:
一个进程外com组件(EXE),没有头文件,不知道怎么调用
用#import "...." 会报很多下面的错
:\c\stream player\def\debug\shrdll.tlh(1637) : error C2011: 'ShellSpecialFolderConstants' : 'enum' type redefinition
e:\c\stream player\def\debug\shrdll.tlh(1667) : error C2059: syntax error : '('
e:\c\stream player\def\debug\shrdll.tlh(1671) : error C2143: syntax error : missing ';' before '}'
e:\c\stream player\def\debug\shrdll.tlh(1671) : error C2143: syntax error : missing ';' before '}'
还有MIDL.EXE这个东西怎么用
解决方案1:
还有MIDL.EXE这个东西怎么用
==============
在DOS提示符下使用:Midl *.idl,还可以使用很多参数确定生成的头文件和c文件的名称。但是可以在事后改之。
regsvr32注册组件,使用OLE Viewer查看接口,获得相关的IDL文件,使用Midl编译生成相关的头文件,包含进工程。使用CoCreateInstance创建组件,查询接口,调用其接口函数完成你需要的功能!