error MIDL2020 : error generating type library

axnst2
axnst2 used Ask the Experts™
on
I am working with someone else's C++ program that generates a DLL.  When I try to run it I get the follow error:

error MIDL2020 : error generating type library : SaveAllChanges Failed

Does anyone know what this means?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
axnst2IT Manager

Author

Commented:
Here is the whole error message:

midl\oleaut32.dll : error MIDL2020 : error generating type library : SaveAllChanges Failed : .\../bin/DNCLIB.tlb
Error executing midl.exe.

Any help would be greatly appreciated,

Thanks,

axnst2
axnst2IT Manager

Author

Commented:
o.k. seriously here is the whole thing:

Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\msxml.idl
msxml.idl
midl\oleaut32.dll : error MIDL2020 : error generating type library : SaveAllChanges Failed : .\../bin/DNCLIB.tlb
Error executing midl.exe.
axnst2IT Manager

Author

Commented:
Creating Type Library...
Microsoft (R) MIDL Compiler Version 5.01.0164  
Copyright (c) Microsoft Corp 1991-1997. All rights reserved.
Processing C:\04099 (Riverside)\Butler\dnc\DNCLIB.IDL
DNCLIB.IDL
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oaidl.idl
oaidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\objidl.idl
objidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\unknwn.idl
unknwn.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\wtypes.idl
wtypes.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ocidl.idl
ocidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oleidl.idl
oleidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\servprov.idl
servprov.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\urlmon.idl
urlmon.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\msxml.idl
msxml.idl
midl\oleaut32.dll : error MIDL2020 : error generating type library : SaveAllChanges Failed : .\../bin/DNCLIB.tlb
Error executing midl.exe.

bossdnc.dll - 1 error(s), 0 warning(s)
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

Commented:
See if any of the files are currently in use, or open in some browser window.

   You might have to reboot your computer to ensure they are free.

jkr
Top Expert 2012

Commented:
Have you added some methods since compiling it the last time) This could be an ID collision - see e.g. http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnarguion/html/msdn_093098.asp

------------------------------------------------------->8---------------------------------------------

Adding methods is the same as before with one gotcha: Visual Studio doesn't pay attention to the fact that IFoo2 is inherited from IFoo, so it will, by default, generate a dispatch ID of 1. You can change this as you declare the method by clicking the Attributes button in the wizard, or you can change the IDL by hand later. If you don't change it, you'll get the following incredibly helpful error message:

midl\oleaut32.dll : error MIDL2020 : error generating type library :
AddImplType failed : MultiInterface

Nice, huh? As soon as you avoid ID collision by changing Func3's ID to something other than 1 or 2, the error will go away.

------------------------------------------------------->8---------------------------------------------
axnst2IT Manager

Author

Commented:
Unfortunatelly that wasn't it. I rebooted and still getting the same error
axnst2IT Manager

Author

Commented:
Also, unfortunatelly, for me it is the SaveAllChanges method that fails and not the AddImplType method.  Thanks though jkr.
Top Expert 2012
Commented:
Is either the .tlb file or any other involved files set to 'read-only' or is any path longer than 126 characters? That's what the USENET archives suggest regarding that problem.
jkr
Top Expert 2012

Commented:
BTW, here's an excerpt from the no longer existing Microsoft Knowledge Base article Q165687:

  MIDL2020: error generating type library: save all changes failed

  This error can result if the path to the .IDL file is longer than
  126 characters, which is because oleaut32.dll does not currently
  support path names that are greater than 126 characters. The
  workaround is to reduce the path to the .IDL file so that it is
  less than 126 characters.
axnst2IT Manager

Author

Commented:
jkr you are a life saver and I am retarded.  SourceSafe had all my files locked up becasue I didn't check them out.   I can't believe I didn't think of that.

Thanks my friend!
jkr
Top Expert 2012

Commented:
You're most welcome :o)

Commented:
Also check if that  DNCLIB.tlb exist in the directory because of previous builds. Just delete it and build it again.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial