PDA

View Full Version : Spurious error message when trying to register DAO350.DLL on Vista


Leigh W
03-05-2007, 05:06 PM
Hi all:

I have been in touch with Indigo Rose Tech Support about this issue, but thought it may be helpful for other users that may encounter this problem.

SUF v7.0.6.1 IS registering the dll OK - but is outputting a SPURIOUS error message, "Failed to register COM (ActiveX) control".

Background to DAO350.DLL

The dll, DAO350.DLL, is a database component used by many VB6 applications.
By the way, Microsoft announced that VB6 is supported on Vista, see: http://msdn2.microsoft.com/en-us/vbasic/ms788708.aspx.
Furthermore that announcement includes DAO350.DLL on the list "Tested and Not Shipping In Windows Vista".

Usually DAO350.DLL is installed to %CommonFilesFolder%\Microsoft Shared\DAO.
I have run some independent tests that confirm that DAO350.DLL can be registered on Vista without any error messages:


When installing the VB6 IDE
Running regsvr32.exe from Vista command prompt (opened using "Run as administrator")


Just for the record, Vista comes with DAO360.DLL (a successor to DAO350.DLL) pre-installed (and registered), located in %CommonFilesFolder%\Microsoft Shared\DAO). So clearly it is still Microsoft's intention that these DAO files are to be installed to that folder on Vista.

Different Target Location?

The error doesn't appear to be related to the choice of target folder. For example, the same error occurs if DAO350.DLL installed to %SystemFolder%. That is - SUF 7.0.6.1 reports an error, but the file in fact is registered.

Earlier versions of SUF don't have this problem
An installer created with SUF v7.0.4.0 using the same .sf7 file and source files worked fine on Vista (I have never used any SUF version between v7.0.4.0 and v7.0.6.1).

Regards,
Leigh Wardle

wunder
03-18-2008, 04:40 PM
I just hit this error myself. Is there a workaround?

Leigh W
03-18-2008, 04:55 PM
I call this function....

function g_boolRegister_DAO350DLL()

strCommonFilesFolder = SessionVar.Expand("%CommonFilesFolder%");
strDAOFolder = strCommonFilesFolder .. "\\Microsoft Shared\\DAO" ;

System.RegisterActiveX(strDAOFolder .. "\\DAO350.DLL");

--Check to see if an error occurred.
error = Application.GetLastError();

-- If an error occurred, display the error message (skip if Vista).
if not g_boolIsVista() then
if (error ~= 0) then
Dialog.Message("Error - RegisterActiveX - DAO350.DLL", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end

end

Regards,
Leigh

wunder
03-18-2008, 05:01 PM
Wow- thanks a lot. I'm a newbie here, can I bother you for the g_boolIsVista() function too?

Leigh W
03-18-2008, 05:16 PM
We all started as newbies once...

function g_boolIsVista()

-- Get the current OS Version information
tVersionInfo = System.GetOSVersionInfo();

return (String.ToNumber(tVersionInfo.MajorVersion) == 6);

end

Cheers,
Leigh

wunder
03-18-2008, 06:00 PM
Thanks again- looks to be working correctly now.