Vista and VB6 DLL

M

meldrum_scotland

Hi,

I have an add-in that uses a VB6 DLL. It works perfectly in XP but
when it's in Vista the DLL doesn't link. I put the DLL in the
system32 folder.

Has any else come across this problem know a solution?

Thank you in advance.

Best

Meldrum
 
M

meldrum_scotland

just a guess, do you have to register the dll?

--

Gary









- Show quoted text -

Hi Gary,

Thank you for your reply.

I thought about that but I use a XLA (VBA wrapper) to call the DLL
which avoided the hassle of registering the DLL, which did the trick
in 2000 and XP. Is Vista different in that all DLLs need registering
or it is it to do with access rights - just not sure.

Best

Meldrum
 
C

Chip Pearson

You need to register the DLL with RegSv32. From the Run dialog on the
Windows Start menu, enter

RegSvr32 "C:\Path\FileName.dll"

When you compile an ActiveX DLL in VB6, it is automatically registered on
that local machine. But when you move it to another machine, you must
RegSvr32 the file.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 
P

Peter T

Also, in Vista you may need to turn off UAC (User Account Control). At least
that's the only way I can get RegSvr32 to work in Vista, though I'd be very
interested to know otherwise.

Search "UAC" in Vista help to get to lead you there.

I suppose, begrudgingly, it's best to turn it back on when done.

Regards,
Peter T
 
C

Chip Pearson

I suppose, begrudgingly, it's best to turn it back on when done.

The first thing I did after installing Vista was to turn off the UAC. It is
a kludge solution to security, and it displays itself so often, users
reactively click "Continue" without even reading what action is being
approved. The boy who cried wolf and all that. The UAC is one of the dumber
things to come out of Microsoft in quite some time.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 
G

Gary Keramidas

i was and still am on the vista beta team. i complained about a lot of things,
but the only thing they relented on was giving us back list view in explorer.
otherwise, that would be gone, too.

there a things that just take more clicks to do in vista, than in xp, changing
the time, getting to the nic properties, etc. couple that with the uac prompts
and it's downright annoying. first thing i do is go into the group policy editor
and turn it all off. i don't use the interface in the user cpl applet.

there are some pretty cool things in vista that a lot of people don't know
about, but probably wouldn't care about unless they're really into computers.
all the diagnostic history, the task scheduler and the event reporting system.
but i think a lot of it at a performance cost, too.

sorry for the off topic post, but just thought i throw this out.
 
J

Jon Peltier

there a things that just take more clicks to do in vista

So it's not just Office 2007? This matches my impression of that beast. Even
though I've learned where the buttons are in the ribbon, it still takes
longer to get anything done.

- Jon
 
G

Gary Keramidas

no, but vista is a lot faster than office 2007. that is one slow app. all
the code i test runs twice as fast in 2003 than in 2007.

i asked them many times how many kindergarteners were in their usability
studies.

in vista 3 clicks to change the time, in xp, 1 double click. in vista, 6
clicks to sync the time, in xp, 1 double click and 2 clicks. this is all
without uac, add more clicks for that.
 
C

Chip Pearson

Oh, I like Vista, don't get me wrong. Now that I'm used to it and have found
where they've hidden everything, I like it at least as much as I did XP,
maybe more. I have Vista Ultimate on two desktop boxes and on one laptop.
But the niceties of Vista don't excuse the whole concept of the UAC, which
by all measures of look-and-feel seems to have been tacked on to the system
almost as an afterthought. Having to confirm nearly any significant
operation with a message box just doesn't cut it as a well thought out
strategy for dealing with security. Yes, I know there are many other
security mechanisms at work, but the popup UAC serves more to annoy the
users than prevent nefarious code from screwing with the machine. It pops up
so often that users will automatically react by allowing the operation
without even paying attention to what that operation is and what initiated
it. Too many false alarms, in my opinion.

There are some very smart people at MS -- they could have done better than
the UAC.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 
G

Gary Keramidas

they have lessened the uac annoyance in sp1. but since i turn it off, i can't
tell you how much.
 
P

Peter T

AFAIK, the need to turn off the UAC in respect to RegSvr32 is not merely to
prevent all those annoying messages. If the UAC is on RegSvr32 will not
work -
"
The module C:\path-to-the-dll was loaded but the call to DllRegisterServer
failed with error code 0x8004005.
For more information about this problem, search online using the error code
as a search term"
"
In passing, such an on-line search is notably un-helpful! I would have
thought Vista might advise "to use RegSvr32 you need to turn off the UAC".

Same applies if want to install a ComAddin via Excel/Tools/Com Addins. In
earlier OS installing that way also registers the dll. However with the UAC
on nothing happens, no message, nothing.

Not only does the UAC need to be off but also need to be logged on as an
Administrator. I cannot work out how to do register an ActiveX dll or
install a CAI for a "Standard User". It must be possible and I'd be
interested to know how to do that ???

As for Vista, I can see where MS are trying to go and superficially there
are some nice features, no doubt more I have yet to discover. Overall
though, and sadly, my early experience has been awful (an understatement).
In part that might relate to problems installing Norton 360, still not sure
if all resolved, but other issues too (way beyond those "extra clicks").

Compared to the above, following is trivial. Things seem slower in Vista
than I would expect given the specs of the brand new system, both loading
files and (say) running some long VBA. Only way to confirm would be to
install an older OS on a separate partition and dual boot, compare like with
like. FWIW to run the same version of Office on a dual boot system would
require two licenses. Alternative would be VM, though not sure that would
generate true comparisons.

Regards,
Peter T
 
G

Gary Keramidas

don't like vista's boot manager, so i have separate hard drives for xp and
vista. but i have a quad core cpu and 4 gb of ram, so i don't think vista is
really any slower. my code seems to run the same on both platforms with o2k3.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top