自动获取OCX的CLSID源代码
我在网上下载的源代码,用VC++编译时出错,但是我才接触VC++对检查语法错误不时很懂特地上论坛来求助!
Vc++编译时出错提示如下
//--------------------------------------------------------------
Compiling...
RegOcx.cpp
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(141) : error C2065: 'LPCOLESTR' : undeclared identifier
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(141) : error C2146: syntax error : missing ')' before identifier 'x'
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(141) : error C2433: 'ocslen' : 'inline' not permitted on data declarations
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(141) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(141) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(141) : error C2447: missing function header (old-style formal list?)
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(143) : error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(143) : error C2433: 'OLECHAR' : 'inline' not permitted on data declarations
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(143) : error C2501: 'OLECHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(143) : error C2061: syntax error : identifier 'LPOLESTR'
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(144) : error C2501: 'ocscpy' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(144) : error C2065: 'LPOLESTR' : undeclared identifier
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(144) : error C2146: syntax error : missing ';' before identifier 'memcpy'
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(144) : error C2065: 'dest' : undeclared identifier
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(144) : error C2065: 'src' : undeclared identifier
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(145) : error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(145) : error C2433: 'OLECHAR' : 'inline' not permitted on data declarations
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(145) : error C2501: 'OLECHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(145) : error C2086: 'OLECHAR' : redefinition
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(145) : error C2061: syntax error : identifier 'LPOLESTR'
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(145) : error C2501: 'ocscat' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(145) : warning C4508: 'ocscat' : function should return a value; 'void' return type assumed
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(151) : error C2146: syntax error : missing ';' before identifier 'CharNextO'
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(151) : error C2433: 'LPOLESTR' : 'inline' not permitted on data declarations
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(151) : error C2501: 'LPOLESTR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(151) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
RegOcx.exe - 1 error(s), 0 warning(s)
/-----------------------------------------------
vc++自动注册ocx.rar
(1.52 KB)
由于我是新注册的的,我只有20的积分,请大师们帮我看看
另外这个代码如果成功编译后什么使用呀,据介绍中说是可以由OCX完整路径得到CLSID
---------------------------------------------------
那位大师把它编译成一个功能模块也好呀!
[ 本帖最后由 hj08103 于 2011-3-29 19:41 编辑 ]