Stephan Bourgeois
asked on
Strange problem
I have a stange problem. We have a batch of computer able to compile a code without any problem and a new batch rebuild with similar software at the exeption that Office 2010 has been installed, then uninstalled and replace by Office 2003.
The problem is related to a com typelib not loading properly, but I don't know how or where to check.
This is code for a DLL and we are using Visual C++ 6 Enterprise
The OS is Windows XP SP3 with the latest patch.
The following are the errors shown while I build the project
FieldContainer.cpp
c:\temp\irsparser\irsparse rengine\de bug\vbe6ex t.tlh(212) : error C2146: syntax error : missing ';' before identifier 'CommandBars'
c:\temp\irsparser\irsparse rengine\de bug\vbe6ex t.tlh(212) : error C2501: '__missing_type__' : missing storage-class or type specifiers
c:\temp\irsparser\irsparse rengine\de bug\vbe6ex t.tlh(212) : error C2208: 'struct Office2003::CommandBars' : no members defined using this type
c:\temp\irsparser\irsparse rengine\de bug\vbe6ex t.tlh(233) : error C2146: syntax error : missing ';' before identifier 'GetCommandBars'
c:\temp\irsparser\irsparse rengine\de bug\vbe6ex t.tlh(233) : error C2501: '__missing_type__' : missing storage-class or type specifiers
c:\temp\irsparser\irsparse rengine\de bug\vbe6ex t.tlh(255) : error C2061: syntax error : identifier '__missing_type__'
c:\temp\irsparser\irsparse rengine\de bug\vbe6ex t.tli(32) : error C2143: syntax error : missing ';' before 'tag::id'
c:\temp\irsparser\irsparse rengine\de bug\vbe6ex t.tli(32) : error C2433: '__missing_type__' : 'inline' not permitted on data declarations
c:\temp\irsparser\irsparse rengine\de bug\vbe6ex t.tli(32) : error C2501: '__missing_type__' : missing storage-class or type specifiers
c:\temp\irsparser\irsparse rengine\de bug\vbe6ex t.tli(32) : fatal error C1004: unexpected end of file found
Of course, the CommandBar is not recognized and all the following code are screw up.
Line 212 is thie first line of those following lines:
__missing_type__ CommandBars;
__declspec(property(get=Ge tCodePanes ))
_CodePanesPtr CodePanes;
__declspec(property(get=Ge tWindows))
_WindowsPtr Windows;
In VS 6 Enterprise, there is a tools to view the OLE/COM object.When I double click on Microsoft Visual Basic 6.0 Extensibility (Ver 5.3), I am getting an error as follow: Could not decompile selected ite. Error loading type library/DLL. TYPE_E_CANTLOADLIBRARY ($80029C4A)
On the computers where the build work fine, the OLEViewer open the typelib correctly.
I compare the files location and the registry and I can't find anything evident. I also use regtlib and reregister VBE6EXT.OLB, VBE6.DLLand MSO.DLL.
The import statements are:
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE11\\mso.dll" rename_namespace("Office20 03")
using namespace Office2003;
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT .olb" rename_namespace("VBE6")
using namespace VBE6;
#import "C:\\Program Files\\Microsoft Office\\Office11\\MSWORD.o lb" \
rename("ExitWindows","MyEx itWindows" ),named_gu ids, rename_namespace("Word")
using namespace Word;
#import "C:\\Program Files\\Microsoft Office\\Office11\\XL5EN32. olb" \
rename("DialogBox","Dialog Box2"),nam ed_guids, rename_namespace("Excel")
using namespace Excel;
Really need help on that one.
Thanks
The problem is related to a com typelib not loading properly, but I don't know how or where to check.
This is code for a DLL and we are using Visual C++ 6 Enterprise
The OS is Windows XP SP3 with the latest patch.
The following are the errors shown while I build the project
FieldContainer.cpp
c:\temp\irsparser\irsparse
c:\temp\irsparser\irsparse
c:\temp\irsparser\irsparse
c:\temp\irsparser\irsparse
c:\temp\irsparser\irsparse
c:\temp\irsparser\irsparse
c:\temp\irsparser\irsparse
c:\temp\irsparser\irsparse
c:\temp\irsparser\irsparse
c:\temp\irsparser\irsparse
Of course, the CommandBar is not recognized and all the following code are screw up.
Line 212 is thie first line of those following lines:
__missing_type__ CommandBars;
__declspec(property(get=Ge
_CodePanesPtr CodePanes;
__declspec(property(get=Ge
_WindowsPtr Windows;
In VS 6 Enterprise, there is a tools to view the OLE/COM object.When I double click on Microsoft Visual Basic 6.0 Extensibility (Ver 5.3), I am getting an error as follow: Could not decompile selected ite. Error loading type library/DLL. TYPE_E_CANTLOADLIBRARY ($80029C4A)
On the computers where the build work fine, the OLEViewer open the typelib correctly.
I compare the files location and the registry and I can't find anything evident. I also use regtlib and reregister VBE6EXT.OLB, VBE6.DLLand MSO.DLL.
The import statements are:
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE11\\mso.dll"
using namespace Office2003;
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT
using namespace VBE6;
#import "C:\\Program Files\\Microsoft Office\\Office11\\MSWORD.o
rename("ExitWindows","MyEx
using namespace Word;
#import "C:\\Program Files\\Microsoft Office\\Office11\\XL5EN32.
rename("DialogBox","Dialog
using namespace Excel;
Really need help on that one.
Thanks
ASKER
I am pretty sure that the problem is the OLE/COM VBE6EXT that is not loading properly.
[HKEY_CLASSES_ROOT\TypeLib \{0002E157 -0000-0000 -C000-0000 00000046}\ 5.3]
"PrimaryInteropAssemblyNam e"="Micros oft.Vbe.In terop, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e 9429c"
@="Microsoft Visual Basic for Applications Extensibility 5.3"
[HKEY_CLASSES_ROOT\TypeLib \{0002E157 -0000-0000 -C000-0000 00000046}\ 5.3\0]
[HKEY_CLASSES_ROOT\TypeLib \{0002E157 -0000-0000 -C000-0000 00000046}\ 5.3\0\win3 2]
@="C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT .OLB"
Any trick to repair broken OLE/COM module?
[HKEY_CLASSES_ROOT\TypeLib
"PrimaryInteropAssemblyNam
@="Microsoft Visual Basic for Applications Extensibility 5.3"
[HKEY_CLASSES_ROOT\TypeLib
[HKEY_CLASSES_ROOT\TypeLib
@="C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT
Any trick to repair broken OLE/COM module?
I can't find much helpful information on that topic other than various levels of advice to reinstall products or perform in-place upgrades. On that note I'll again say that reinstalling Office 2010 may be a viable option that is worth a try. Do a good backup first so you can roll back the changes if necessary. On that I like to use a hard drive cloning tool or duplicator to make an exact sector by sector copy of a hard drive, and then use the destination copy for experimentation. That keeps my hard drive intact and on the shelf to quickly drop back into the machine should things turn out wrong.
ASKER
This morning, I uninstalled all Office 2003 apps and Microsoft Visual Studio 6 Enterprise.
I cleanup the disk and the registry of all reference to any VBA6 or OFFICEXX.
I restarted the system, I am assuming that the hard drive is clean from any VB6 typelib or Office 2003 typelib.
Office 2010 has never been installed on the working PC at the exception of the Compatibilty pack.
The working PC has often freezes for a couple of minutes, thats why we don't want to go with this build.
When I look at external depencies in Visual Studio, I am missing the following
mso.dll, msword.olb, vbe6ext.olb, xl5en32.olb
The compilation error:
error C2772: #import referenced a type from a missing type library; '__missing_type__' used as a placeholder
The line where the error occured:
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT .olb" rename_namespace("VBE6")
using namespace VBE6;
I cleanup the disk and the registry of all reference to any VBA6 or OFFICEXX.
I restarted the system, I am assuming that the hard drive is clean from any VB6 typelib or Office 2003 typelib.
Office 2010 has never been installed on the working PC at the exception of the Compatibilty pack.
The working PC has often freezes for a couple of minutes, thats why we don't want to go with this build.
When I look at external depencies in Visual Studio, I am missing the following
mso.dll, msword.olb, vbe6ext.olb, xl5en32.olb
The compilation error:
error C2772: #import referenced a type from a missing type library; '__missing_type__' used as a placeholder
The line where the error occured:
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT
using namespace VBE6;
I had assumed Office 2010 had been installed and uninstalled, as this is what you stated in your original post. I don't know if this will help?
http://msdn.microsoft.com/en-us/library/aa449281.aspx
http://msdn.microsoft.com/en-us/library/aa449281.aspx
ASKER
Office 2010 has been installed and uninstall, but the required type library is from Office 2003. I really did a deep cleanup to remove all reference to Office 2010 and 2003 before reinstalling Office 2003.
The secondary type is:
__missing_type__ CommandBars;
But I really don't know why it is not registering properly, since I reinstall everything from a cleaned state.
The secondary type is:
__missing_type__ CommandBars;
But I really don't know why it is not registering properly, since I reinstall everything from a cleaned state.
Can you compare the computers that work with the ones that don't to find what is different with file versions, registry settings, etc.?
ASKER
I tried that, but the working computer is not really the same and I don't know where to compare.
By googling, the problem is for sure in the mso.dll file. This Type library refuse to load.
I am currently searching all the disk for any MSO.DLL that might be located somewher else.
By googling, the problem is for sure in the mso.dll file. This Type library refuse to load.
I am currently searching all the disk for any MSO.DLL that might be located somewher else.
This may help:
http://support.microsoft.com/kb/2597941
http://support.microsoft.com/kb/2597941
Or this looks even more promising...
http://support.microsoft.com/kb/2516475
http://support.microsoft.com/kb/2516475
ASKER
I just install VS C++ 6 on a fresh new XP and Office 2003 and the workspace is building correctly.
I would prefer to put my finger on the problem since I have many computers to rebuild and there is a lot of devellopement applications to install and finetune.
Again, Office 2010 should not be loaded on those computers.
I would prefer to put my finger on the problem since I have many computers to rebuild and there is a lot of devellopement applications to install and finetune.
Again, Office 2010 should not be loaded on those computers.
There's always paid Microsoft support - they can guide you thru the inner workings and find stuff like that when nobody else can.
ASKER
I will install the 137 Windows updates. That might fixed the problem.
If not, I will call Microsoft or rebuild the system from scratch.
If not, I will call Microsoft or rebuild the system from scratch.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe this solution will work for you as well?
http://forums.codeguru.com/showthread.php?131345-Console-App-without-MFC-Project-Settings
Also some details available here may help:
http://www.networkingprogramming.com/1024x768/mfc1.html
These links are more about using MFC than not using it, but may contain something useful.
http://www.codersource.net/MFC/MFCTutorials/MFCTutorialPart1.aspx
http://msdn.microsoft.com/en-us/library/b1kyh79x.aspx
http://support.microsoft.com/kb/173974
ftp://ftp.microsoft.com/misc1/DEVELOPR/VISUAL_C/KB/Q120/9/26.TXT
http://forums.codeguru.com/showthread.php?131345-Console-App-without-MFC-Project-Settings
Also some details available here may help:
http://www.networkingprogramming.com/1024x768/mfc1.html
These links are more about using MFC than not using it, but may contain something useful.
http://www.codersource.net/MFC/MFCTutorials/MFCTutorialPart1.aspx
http://msdn.microsoft.com/en-us/library/b1kyh79x.aspx
http://support.microsoft.com/kb/173974
ftp://ftp.microsoft.com/misc1/DEVELOPR/VISUAL_C/KB/Q120/9/26.TXT
ASKER
None of the other solutions helped to fix the issue.
One possibility: Look in the C:\Program Files\Microsoft Office folder to see if there is a subfolder named "Office 14" and perhaps you will find some of the missing files there. Make the appropriate change from Office 11 to Office 14 in your code to find the missing files.
Another possibility: Reinstall Office 2010 as an additional program, leaving Office 2003 intact. (If you never launch it you will not have to activate it.)