_Problem从PSDK IDL文件生成PASCAL绑定文件

时间:2011-10-15 05:56:50

标签: delphi idl typelib platform-sdk

我试图从PSDK发送的IDL文件中生成类型库,但在midl会话成功完成(ERRORLEVEL 0)时,没有生成.tlb文件。目前我不知道有什么不对。请指教。

这是一个详细的输出形式midl会话:

>midl emptyvc.idl /tlb .\emptyvc.tlb /I "\Program Files\Microsoft SDKs\Windows\v7.0\Include" /W4
Microsoft (R) 32b/64b MIDL Compiler Version 7.00.0555
Copyright (c) Microsoft Corporation. All rights reserved.
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\emptyvc.idl
emptyvc.idl
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl
objidl.idl
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\unknwn.idl
unknwn.idl
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\wtypes.idl
wtypes.idl
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\basetsd.h
basetsd.h
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\guiddef.h
guiddef.h
\Program Files\Microsoft SDKs\Windows\v7.0\Include\wtypes.idl(671) : warning MIDL2111 : identifier length exceeds 31 characters : STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2308) : warning MIDL2111 : identifier length exceeds 31 characters : FMTID_MediaFileSummaryInformation
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2499) : warning MIDL2111 : identifier length exceeds 31 characters : tagEOLE_AUTHENTICATION_CAPABILITIES
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2518) : warning MIDL2111 : identifier length exceeds 31 characters : EOLE_AUTHENTICATION_CAPABILITIES
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2616) : warning MIDL2111 : identifier length exceeds 31 characters : tagRPCOPT_SERVER_LOCALITY_VALUES
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2652) : warning MIDL2111 : identifier length exceeds 31 characters : COMGLB_EXCEPTION_DONOT_HANDLE_FATAL
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2653) : warning MIDL2111 : identifier length exceeds 31 characters : COMGLB_EXCEPTION_DONOT_HANDLE_FATAL
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2654) : warning MIDL2111 : identifier length exceeds 31 characters : COMGLB_EXCEPTION_DONOT_HANDLE_ANY
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2660) : warning MIDL2111 : identifier length exceeds 31 characters : COMGLB_RPC_THREADPOOL_SETTING_DEFAULT_POOL
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2661) : warning MIDL2111 : identifier length exceeds 31 characters : COMGLB_RPC_THREADPOOL_SETTING_PRIVATE_POOL
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(3359) : warning MIDL2111 : identifier length exceeds 31 characters : APTTYPEQUALIFIER_NA_ON_IMPLICIT_MTA
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\oleidl.idl
oleidl.idl
\Program Files\Microsoft SDKs\Windows\v7.0\Include\oleidl.idl(329) : warning MIDL2111 : identifier length exceeds 31 characters : OLEMISC_RENDERINGISDEVICEINDEPENDENT
\Program Files\Microsoft SDKs\Windows\v7.0\Include\oleidl.idl(339) : warning MIDL2111 : identifier length exceeds 31 characters : OLEMISC_IGNOREACTIVATEWHENVISIBLE
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\oaidl.idl
oaidl.idl
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\oaidl.acf
oaidl.acf
\Program Files\Microsoft SDKs\Windows\v7.0\Include\emptyvc.idl(108) : warning MIDL2392 : [local] procedure without [call_as] : [ Procedure 'Initialize'  ]
\Program Files\Microsoft SDKs\Windows\v7.0\Include\emptyvc.idl(157) : warning MIDL2392 : [local] procedure without [call_as] : [ Procedure 'InitializeEx'  ]
** ERRORLEVEL is 0 at this point **

使用的零件和工具:

  • Windows SDK 7.0版中未经修改的emptyvc.idl
  • MIDL版本7.00.0555
  • CL版本14.00.50727.42

注意:我认为这不是环境问题,因为我尝试的第一件事是编译其他.idl文件,我得到了预期的结果.tbl,在转弯时由TLIBIMP处理没有任何麻烦。


这是CL输出(由MIDL完全静音运行):

dlldata.c
dlldata.c(24) : error C2061: syntax error : identifier 'PROXYFILE_LIST_START'
dlldata.c(24) : error C2059: syntax error : ';'
dlldata.c(31) : error C2146: syntax error : missing ';' before identifier 'DLLDATA_ROUTINES'
dlldata.c(38) : fatal error C1004: unexpected end-of-file found

1 个答案:

答案 0 :(得分:1)

MIDL有一种令人讨厌的习惯,即如果没有任何东西可以产生,就不会产生输出。您是否确认emptyvc.idl文件中包含可以在类型库(类,接口,库指令等)中表示的类型?