 |
Date: |
01-12-2002 |
|
Title: |
"Object library not
registered" error when attempting to run eVB |
|
Author: |
Gene Ostrowski |
|
|
|
|
|
|
Summary
This article discusses a solution to an error
message that appears when you try to run eMbedded Visual Basic
after installing additional applications on the machine.
When you try to run eVB and create a project for the PocketPC
device, you receive an error message indicating that there is an
"Object library not registered" error.
Re-installing the eVB and eVC products do not fix the problem.
Reinstalling the OS won't fix the problem either.
Product Affected
This problem seems to affect only the eMbedded
Visual Basic 3.0 product, but could also affect other
applications, since it is a pretty generic problem. The
operating system affected in my case was NT Server 4.0, SP6a.
Background
I ran across this little nastiness one afternoon
when attempting to work on one of my Visual Basic
applications. I had just finished rebuilding my server, and
installed the eVC and eVB toolkits. Once everything was
working properly, I decided that I wanted to have some additional
applications on the development server, namely Microsoft Office
2000.
Once I finished installing Office, everything
seemed OK. However, a week later when I decided to do some
development on an old eVB application--- blam! I received
the error message and was unable to create new projects or even
open up existing projects for the PocketPC platform. The
other platforms, such as HPC, seemed to work correctly.
However,
when I tried to create a new project for the PPC platform, I noticed that the toolbar
controls were all missing after I received this error message.
I tried to remove and reinstall the toolkits, but
the problem did not go away. It seemed that one of the
controls .DLLs or .OCXs was missing or corrupt (or worse,
overwritten with an older version).
I searched the web high and low, and could only
find one single reference on how to solve this
problem. It was a thread on a newsgroup somewhere (I did not
save the link). I've written this article to hopefully save
someone a day's (or week's) worth of work if they run into this issue.
Hopefully, the search engines will index this page and it may be
of assistance to someone. At any rate, there will now be at
least two references on the web for how to resolve this problem.
:)
The research seemed to indicate that these files
are used by any application that uses Visual Basic for
Applications and how they work with the ActiveX desktop
controls. For whatever reason, installing Office 2000 caused
something to get horked, so the file was no longer
registered. To make matters worse, I tried to discover
how to re-register the controls into the system. It seemed
that REGSVR32.EXE did not like the offending file, since it was not a DLL or
an OCX file. I needed to find a way to register this
file.
Solution
The solution is to re-register the proper control
onto your system. The offending control is VB6PPC.OLB, which
should be located in the \Program Files\Microsoft eMbedded
Tools\EVB directory on your development server. UPDATE!
(3/13) Several users have noted that on the PocketPC 2002
version of the OS, the filename is VB6PPC2.OLB. Kudos
to Terry Davis for being the first to bring it to my attention.
Additional research revealed that I needed to run
a program called REGTLIB.EXE against this file in order to
re-register it properly. Unfortunately, I could not file
this REGTLIB.EXE file anywhere.
All the information that I was gathering indicated
that the REGTLIB.EXE file is included on the installation of
Visual Studio. I checked all of my development servers and
could not find the file. I then searched to original CDs on both the Visual Studio 6.0 product (the Enterprise edition, no
less!) and the eMbedded toolkits product, but could STILL not locate
it. If it is included on one of the installation CDs for
these products, it is either compressed or buried in a .cab file
somewhere. Alas, I finally discovered that this file is
included in several other installation packages, namely IE 5 and
others. I was able to obtain the file by installing the
Microsoft Windows Library Update patch, found at Microsoft's
website. Once I ran the patch, the REGTLIB.EXE file was
sitting in my c:\winnt directory. UPDATE!
(3/13) It's my understanding that the REGTLIB.EXE file is
installed when you update Visual Studio with Service Pack 3.
Note that I said Visual Studio and not eMbedded Visual C++)
Steps Necessary To Fix The Problem
1a) Download the Windows Library Update Patch from
Microsoft, or get it here. Note that the file included on
*this* site is the US English version of the file. You may
want to go directly to MS and get the file. Type in
"Windows Library Update Patch" into their search box and
you should get to where the file is located.
- OR -
1b) Or you can first try to download just
the REGTLIB.EXE file here and go to step 3.
2) Install the patch, and reboot your system.
3) Start a command prompt and go to the \Program
Files\Microsoft eMbedded Tools\EVB directory on the machine.
4) Run the following command : REGTLIB
VB6PPC.OLB (Update: the filename is VB6PPC2.OLB on
PocketPC 2002 OS).
5) You should see a message indicating
success. You should now be able to run eVB properly.
Note that this solution worked fine for me.
It may be that in my case, my server had the proper combination of
OS version, software, etc. that allowed this to work. I
followed the steps above and it worked fine for me. You may
be able to just download the REGTLIB.EXE file and re-register it
and everything will be ok. I don't know for sure. Then
again, maybe this won't work at all in your case.
Therefore, I cannot be held responsible if doing
this blows up your machine. Who knows what happens when you
muck around with the registry on these machines? Note that
I performed these steps on an NT 4.0 server box. These steps
may not work on other operating systems (such as 2000), so do this AT YOUR OWN RISK.
And as always, BACKUP YOUR MACHINE before you do anything like
this.... of course, I don't need to tell you this. The
chances seem pretty low that anything bad could happen from just
registering some desktop controls, but who really knows for sure
these days...
Conclusion
Hopefully, this article helps someone else get out
of the same jam that I was in. I was dreading the thought of
having to rebuild my server yet again to resolve this issue.
After installing the patch and re-registering the controls, I was
back in business in no time.
If this article helped you at all, please drop me
a note at gene@baysidestudios.com
and let me know. It's nice to hear that I was able to help
out.
Update! (3/13) - I'm glad I wrote this
article. I've received many emails of thanks from users who
have been struck by this horrid problem and were unable to get out
of the jam without the help of this article. I'm thinking
that I need to start writing more of these and start building a
documentation library of fixes for these types of problems...
BTW, Terry Davis notes that apparently Microsoft
has come around and discovered it's a problem. They even
wrote a Q article about it on their support site (Q315576).
Allan Malcom wrote in to tell me that the problem
happens on Windows2000 Professional SP1 as well,
but that the fix still works. He stated that he has both the
2002 and the 2000 versions of the SDK installed, and that not both
of them were corrupted. I suspect that if you run into an
issue where they are both corrupt, you could re-register both of
the OLB files independently... Thanks Allan!
Regards,
Gene Ostrowski