Re: and yet another Vista question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"MikeD" <nobody@xxxxxxxxxxx> wrote in message
news:eRTxHo3uHHA.4476@xxxxxxxxxxxxxxxxxxxxxxx

"Galen Somerville" <galen@xxxxxxxxxxxxxxxx> wrote in message
news:u5ykzY3uHHA.4476@xxxxxxxxxxxxxxxxxxxxxxx

"MikeD" <nobody@xxxxxxxxxxx> wrote in message
news:Ol5Yc02uHHA.4404@xxxxxxxxxxxxxxxxxxxxxxx

"Galen Somerville" <galen@xxxxxxxxxxxxxxxx> wrote in message
news:%232aoaw1uHHA.3364@xxxxxxxxxxxxxxxxxxxxxxx
I have an app with numerous ocx's and dll's. I'm installing as Admin and
use a manifest file to avoid all the pop-ups.

Everything gets registered okay but one item fails.

My "strings" for different languages are in separate dll's. The dll's
are listed in the reference section of the IDE and all works well on XP
and 98. Here's a part of the code that fails:

On Error GoTo NoResource
Select Case gintLangBase
Case 0
Set clsRes = CreateObject("cds74eng.classcds")
strLogo = "\cds74eng.jpg"
GetResource = True
Case 1
Set clsRes = CreateObject("cds74esp.classcds")
strLogo = "\cds74esp.jpg"
GetResource = True
Case 2
Set clsRes = CreateObject("cds74frn.classcds")

gintLangBase = 0 and it Errors out on the first line of Case 0

I've tried installing cds74eng.dll on both System32 and the App folder.
In both cases I can look at the dll's properties and it is all
hunky-dory.

Any ideas?


What's the error? All you said was that it "errors out". That doesn't
tell us a thing.

--
Mike
Microsoft MVP Visual Basic


My bad

Run-time error 91
Object variable or with block variable not set.


Well....the only thing I can tell you from that is that the DLL is not
registered correctly. To my knowledge, that's the only thing that could
cause that error, *given your posted code*. There's actually lots of
different ways to get that error, but they all boil down to trying to use
an object variable that's Nothing. Since you're getting the error while
using CreateObject to instantiate the object, it pretty much means the
only cause could be that the DLL isn't registered properly (and a manifest
file to elevate permissions for your app isn't going to solve that).

Things are different in Vista due to UAC. I assume this DLL is installed
by a Setup program that was run under an Admin account? Is the app being
run by a different user? I believe that a service called something like
"ActiveX Installation" must be started (and remain running) in such a
scenario. A Vista newsgroup might be a more appropriate place to ask this.
Personally, I don't see this as a VB problem, but as a security issue with
Vista.

Hopefully, somebody who has more experience with Vista than I do will
help. For the time being, I'm lucky because I have no "publicly available"
apps out there for which I'd need to support Vista. I work for company who
is a MS partner and we support their MBS product line (Great Plains,
Solomon). We're telling our clients that at this time, upgrading to Vista
is not advisable unless they also update their Great Plains or Solomon
software to versions that have just been released (as of about a week
ago).

--
Mike
Microsoft MVP Visual Basic


Yes setup program run under admin account. ActiveX Installer Service is
turned on. Clicking properties on the dll under security, etc, shows it's
valid under SYSTEM, Admin and User accounts.

So far no customers have ordered Vista machines, but it's going to happen
darn it.

It appears they will require an Admin User account. If I can get past this
error then I can try it in a standard user account.

Galen


.



Relevant Pages

  • Re: Problem with Icons at system tray.
    ... If the user account is an admin account, User Access Control in Vista will sometimes not allow admin tasks to be directly available. ...
    (microsoft.public.windows.terminal_services)
  • Re: and yet another Vista question
    ... Well....the only thing I can tell you from that is that the DLL is not ... A Vista newsgroup might be a more appropriate place to ask this. ... Yes setup program run under admin account. ... It appears they will require an Admin User account. ...
    (microsoft.public.vb.general.discussion)
  • Re: ActiveX control (iemenu.ocx) in Vista
    ... Your out of the box admin account on Vista is not a full rights admin account on Vista like it is on XP. ... Your admin account does not inherit rights from the built-in account like it does on XP, particularly in the System32 or Programs folder. ... I would say that there is a dependency dll a common dll on XP that is not present on Vista that the legacy application needs. ...
    (microsoft.public.windows.vista.general)
  • RE: WinVerifyTrust Failure on WinXP
    ... it will work on all Vista platforms: this is a well know stability issue on ... //return itvWintrustNotOnMachine; ... PFnWTHelperProvDataFromStateData pfnWTHelperProvDataFromStateData= ... because this may create dependency loops in the DLL load order. ...
    (microsoft.public.platformsdk.security)
  • Re: DeleteFileW returns incorrect error code in Vista for DLLs
    ... MSN Messenger was just an example, we actually discovered this problem with our own software when trying to replace an in-use DLL. ... Our software offers to schedule a replacement at reboot if it gets an ERROR_SHARING_VIOLATION, and it appeared in testing that this was only failing on Vista under UAC - it works fine on XP, and it works fine on Vista in locations that do not require elevation. ... I just tested this on an XP system, and attempting to delete an in-use DLL from the Program Files folder gives the "sharing violation" error. ... Microsoft Online Community Support ...
    (microsoft.public.win32.programmer.kernel)