Discussion:
MSCAL.OCX Registration question
(too old to reply)
Richard Sherkin
2005-05-11 21:45:33 UTC
Permalink
I managed to distribute an older version of mscal.ocx (8.0.0.5007) with my
VB 6.0 app deployed on a Windows 2003 Terminal Server. This control causes
the date numbers to be displayed as dashes. I have a newer version of the
ocx file (10.0.0.2601) which I want to register. The trouble is when I try
unregistering the 8.x version using the command;

regsvr32 mscal.ocx /u

I get the following message;

DllUnregisterSterver in mscal.ocx failed.
Retun code was: 0x80004005

Is it possible to just register the new mscal.ocx file without unregistering
the older version? If not, can someone explain how to overcome this
un-register error. I was able to do this successfully on a different
Windows 2003 Terminal Server.

Any help would be greatly appreciated!
Steven Burn
2005-05-11 22:15:59 UTC
Permalink
DllUnregisterServer errors usually indicate the file not requiring de-registration (e.g. the DLL entry point does not exist).

As for registering over the existing version, you can do that without any problems (in my experience anyway), depending on the file.
--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
Post by Richard Sherkin
I managed to distribute an older version of mscal.ocx (8.0.0.5007) with my
VB 6.0 app deployed on a Windows 2003 Terminal Server. This control causes
the date numbers to be displayed as dashes. I have a newer version of the
ocx file (10.0.0.2601) which I want to register. The trouble is when I try
unregistering the 8.x version using the command;
regsvr32 mscal.ocx /u
I get the following message;
DllUnregisterSterver in mscal.ocx failed.
Retun code was: 0x80004005
Is it possible to just register the new mscal.ocx file without unregistering
the older version? If not, can someone explain how to overcome this
un-register error. I was able to do this successfully on a different
Windows 2003 Terminal Server.
Any help would be greatly appreciated!
MikeD
2005-05-11 23:48:15 UTC
Permalink
Post by Richard Sherkin
I managed to distribute an older version of mscal.ocx (8.0.0.5007) with my
VB 6.0 app deployed on a Windows 2003 Terminal Server. This control causes
the date numbers to be displayed as dashes. I have a newer version of the
ocx file (10.0.0.2601) which I want to register. The trouble is when I try
unregistering the 8.x version using the command;
regsvr32 mscal.ocx /u
I get the following message;
DllUnregisterSterver in mscal.ocx failed.
Retun code was: 0x80004005
If the folder where the OCX is located is not the current folder, you'd need
to include the full path. It's always best to just include the full path
regardless.
Post by Richard Sherkin
Is it possible to just register the new mscal.ocx file without
unregistering the older version?
It would be if the 2 versions are binary compatible with one another. I
seem to recall reading somewhere, however, that the version 10 OCX is not
binary compatible with previous versions. Ah. A quick search found this:

BUG: Office XP Version of Mscal.ocx Breaks Binary Compatibility For Early
Bound Clients
http://support.microsoft.com/default.aspx?scid=kb;en-us;311219

Now this shouldn't cause a problem unregistering the OCX, but it does mean
you must manually unregister it.
Post by Richard Sherkin
If not, can someone explain how to overcome this un-register error. I was
able to do this successfully on a different Windows 2003 Terminal Server.
In all honesty, IMO you'd be better off dropping this control. Certain
versions of it are not redistributable at all, and other versions of it are
only redistributable if you have the Developers Edition of Office. To my
knowledge, there's only ever been one version of it that's freely
distributable and it had to be downloaded from MS (IOW, none of the versions
included with Office, VB, or VS are freely distributable). If you check the
REDIST.TXT file included with VB, you won't find this file listed. That's a
pretty good indication you can't redistribute it. And these KB articles make
it about as clear as it can possibly be:

OFFXPDEV: Cannot Redistribute Calendar Control Unless You Have a Microsoft
Office Developer License
http://support.microsoft.com/default.aspx?scid=kb;en-us;329573

MOD2000: Cannot Redistribute Calendar Control Without Microsoft Office
Developer License
http://support.microsoft.com/default.aspx?scid=kb;en-us;279098

ADT/ODE: Can't Redistribute Calendar Control Without ODE License
http://support.microsoft.com/default.aspx?scid=kb;en-us;170692

All these articles basically state the same thing. There each just for a
different version of Office. But the simple fact that MS documents this in
at least 3 different articles should tell you something. The last article
mentioned above also includes a link to where you can download the version
that is freely redistributable.

Instead of using MSCAL, I recommend that you use the DateTimePicker or
MonthView included with VB as part of the Windows Common Controls 2. For
that matter, there's a control (with full source) included with VB that is
very similar to MSCAL. Even that would be better to use than MSCAL. Look on
your VB disc(s) for a folder named CALENDAR. Exactly where and on what disc
you'll find this depends on whether you have VB or VS and what edition.
--
Mike
Microsoft MVP Visual Basic
Richard Sherkin
2005-05-12 22:57:50 UTC
Permalink
Thanks for the suggestion. I replaced the MSCAL control throughout my app
with the two MSCOMCT2 calenders. They work great and popped right into the
code with little fuss. The problem is solved! Thanks again!!!

Richard
CodeMan
2005-05-26 19:19:25 UTC
Permalink
Hi,
Does this mean that Windows Server 2003 needs a new version of
mscal.ocx - v10 or can v8 be used?

I am facing exactly the same problem, but I cannot remove the mscal.ocx
now - too late.

Any help is greatly appreciated!!



--
CodeMan
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------
Richard Sherkin
2005-05-30 17:44:47 UTC
Permalink
Hey CM,

I'm not sure which version works with 2003 but I can say this; I thought
there would be NO WAY I could re-write all my modules which utilized the
calender. I bit the bullet and used the controls in MSCOMCT2.OCX. It was
surprisingly easy! Just remove the MSCAL calender, drop in the new one and
give it the same name. That's it! All your coding will stay the same and
it just works. Nicer interface too.

Registering your application for the new control is even easier; Just copy
MSCOMCT2.OCX into your system32 folder and register it. No need to
re-install.

I felt the same way you did about the prospect of re-doing everything but
with the grief the MSCAL control has caused me over these past many year
made the operation well worth it. I highly recommend it!

Richard

Loading...