Valhalla Legends Forums Archive | Visual Basic Programming | [SOLVED] (VB6+Vista) Creating Objects

AuthorMessageTime
Ersan
So yeah, I write an ActiveX DLL with a class that has multiuse instancing, register it (successful), and try to use its class as an object, but I get ActiveX component can't create object when I run Object = CreateObject("ProjName.ClassName") in Vista only, works fine in all previous versions of windows.  It's a shot in the dark but I figure I'll ask here if anyone knows why, or what I can do.
November 22, 2006, 10:52 AM
Grok
Is the DLL signed with a trust chain that leads to one of your trusted root providers?  Vista may have additional security requirements on COM creation and usage previously not seen in Windows.
November 22, 2006, 4:10 PM
Ersan
Guess I have some reading to do...
November 22, 2006, 10:48 PM
Quarantine
Have you tried putting the ActiveX in the cwd? As a last resort you can try turning User Account Control off, I've had issues with UAC and ActiveX files anyhow..

Or maybe it's a reason to stop using VB6? :D
November 23, 2006, 11:01 PM
Ersan
I don't for anything new, I wonder if it would work if I used "Run as Administrator".  I'll tell you when I get home.

EDIT: nope.

EDIT: It seems to work with User Account Control turned off, probably a problem with my implementation of DllRegisterServer (I use the API, but the program won't work with UAC on either) - When I get some time I'll set it to manually do the regkeys.  UAC won't let you modify the HKLM section of the registry (without Administrator priveleges, no not the "My account is in the Administrators group" kind), so if you want to implement DllRegisterServer with UAC turned on you need to use HKCU for the regkeys, not HKLM.
November 24, 2006, 3:23 AM
Quarantine
[quote author=Ersan link=topic=16063.msg161688#msg161688 date=1164338597]
I don't for anything new, I wonder if it would work if I used "Run as Administrator".  I'll tell you when I get home.

EDIT: nope.

EDIT: It seems to work with User Account Control turned off, probably a problem with my implementation of DllRegisterServer (I use the API, but the program won't work with UAC on either) - When I get some time I'll set it to manually do the regkeys.  UAC won't let you modify the HKLM section of the registry (without Administrator priveleges, no not the "My account is in the Administrators group" kind), so if you want to implement DllRegisterServer with UAC turned on you need to use HKCU for the regkeys, not HKLM.
[/quote]

There is a page on MSDN on programming with UAC in mind (Installation, Paths, etc..) I could link it to you if you want.
November 24, 2006, 7:44 PM
Ersan
Please do.
November 24, 2006, 9:26 PM
Quarantine
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/UxGuide/UXGuide/Environment/UAC/UAC.asp

http://msdn.microsoft.com/windowsvista/reference/default.aspx?pull=/library/en-us/dnlong/html/AccProtVista.asp

http://www.microsoft.com/technet/windowsvista/security/uacppr.mspx

Some may be older than others so just keep that in mind although I doubt much has changed conceptually.
November 24, 2006, 11:47 PM

Search