2

I was trying to generate type library from one of PSDK shipped IDL files, but whilst midl session completes successfully (ERRORLEVEL 0) no .tlb file was generated. Currently i do not have any idea what wrong. Please advise.

Here is a verbose output form midl session:

>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 **

Parts and tools used:

  • unmodified emptyvc.idl from Windows SDK version 7.0
  • MIDL version 7.00.0555
  • CL version 14.00.50727.42

NOTE: i believe this is not environment problem, as first thing i tried was to compile other .idl file and i got resulting .tbl as expected, with in the turn was processed by TLIBIMP without any trouble.


Here is CL output (which ran by MIDL completely silenced):

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
OnTheFly
  • 2,059
  • 5
  • 26
  • 61
  • 1
    Where is the `Delphi` or `Pascal` part of your question? AFAICT, this is strictly a `MIDL` question. There's no mention of `Delphi` except in the tags, and no mention of `Pascal` except in the title. – Ken White Oct 15 '11 at 15:10

1 Answers1

1

MIDL has this somewhat annoying habit of not producing output if there is nothing to produce. Have you confirmed that the emptyvc.idl file has types in it which can be represented in a typelib (classes, interfaces, a library directive, etc)?

Larry Osterman
  • 16,086
  • 32
  • 60
  • Hm, someone removed [delphi] tag which was destined to indicate what i'm kinda MSVC n00b. No, i didnt confirm, but `.idl` file looks pretty valid for my quite n00bish eye. Currently i figured out what intermediate `.c` and `.h` being produced, and then midl runs completely silenced `cl` on them which, in turn, fails preprocessing step. – OnTheFly Dec 16 '11 at 10:09
  • Updated the Q on CL side. Do you have ideas what might cause problem, CL or input .idl file (PSDK is newer that MS C compiler)? – OnTheFly Dec 16 '11 at 10:17
  • Does the .idl file contain a library block with a name with classes in it? – Larry Osterman Dec 17 '11 at 06:24
  • do you mean library as in Microsoft extension to IDL? Looks like no such block there, anyway, here is an entire IDL source: http://pastebin.com/kxD6YgbF Looks valid but resulting `dlldata.c` fails to compile with output i pasted above. – OnTheFly Dec 18 '11 at 00:45
  • I'd have to look at the source, but I don't believe that MIDL will emit a tlb file without a "library" directive in the IDL file. – Larry Osterman Dec 18 '11 at 17:14