?
Solved

Problems with Classes

Posted on 2003-02-26
6
Medium Priority
?
160 Views
Last Modified: 2010-05-01
Hi,

I have a ActiveX OCX control which contains several usercontrols, and four class modules which essentially provide the same collection as the comctl Listview:

ListView (UserControl) ->
    ListItems (Col) ->
        ListItem(Class) ->
            ListSubItems (Col) ->
                ListSubItem(Class)

(Obviously not with the same names as the comctl control.)  

There is also a basic History Collection and class.


This works fine on my machine and every test machine I run it on in my office.  But when i compile the ocx and the program and copy them onto the client machine
(running regsvr32 on the OCX) I get an Automation Error with no number or description, before anything is visible on the screen (I declare the History object in the startup module).

I have all the Class Modules declared as GlobalMultiUse.

The user's machine's are NT4 SP6, and the IT support people use NT policies all over the place to lock down the machines.  I have several other pieces of software written in VB working on these machines, the only major difference with this new one is the class modules and the fact it is an MDI app.  That's why i suspect the class modules.

Please tell me one of you guys has crossed this bridge before as I am starting to wear a head shaped dent in my desk...

Cheers,

North
0
Comment
Question by:North
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 4

Accepted Solution

by:
RanaHossain earned 800 total points
ID: 8027734
I think you are in luck, as I had a similar problem last night, that took the whole night to figure out.

I persume this class as multi-use - it has its own clsid - or should. To check it out, download filemon and regmon from sysinternals.com

then find out exactly what files/registry fails. in my case, my activex had a clsid which was not registered, and the user didn't have the previledge to create it.

best of luck

0
 
LVL 5

Expert Comment

by:JohnMcCann
ID: 8027760
Is it possible the target machines use different versions of the controls you are using, or different versions of any dll declarations.

When you said running regsvr32 on the OCX

did you mean you manualy install the programs.

It may be worth trying different package and deployment programs as one of these make pick up a missed dependency or scrutinise there versions better.
0
 

Expert Comment

by:merphie
ID: 8027837
Is the target computer a XP machine?   Is the machine that did the compiling XP?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:webJose
ID: 8030444
An Automation Error message with no number generally means, according to Microsoft, that you are raising an error with Err.Raise and a number that is not a regular number.  Try compiling your usercontrol with debug code to write a text file and see where it stops.  Then start from there.
0
 
LVL 1

Author Comment

by:North
ID: 8032191
Hi all,

Thanks for all responses and apologies for my absence, i'm in the UK and left work at 6.

Rana: Sounds like a plausible answer as the target machines are locked up very tight.

John: I am manually putting the exe on the machine as it takes an entire week to get the proper paperwork signed and an IT guy out to log in as an administrator and install the software.  It also has to go through office testing which can take another week.  They are extremely paranoid about a user breaking a machine, so the client wanted a work around for the short term.  It's the bane of my life!

Merphie, target is NT4, I develop under XP but compile on NT4.  This works fine with my other progs.

webJose: The first line of code doesn't even execute, so I can only assume that it is one of the declarations killing the prog.

Rana, I will download these files and look into it, it does seem the most likely answer at the moment.

Thanks again to everyone.

North
0
 
LVL 1

Author Comment

by:North
ID: 8078783
Hi,

Having finally got to the bottom of this I discovered that the user was telling me one thing and actuallity was completely different.  So this question was pretty much redundant, I don't know why we bother with users! ;-)

But that said, Rana's comments did inspire me to learn more about classes, and the site he linked to will certainly come in handy elsewhere so the points go to him.

Thanks to all,

North
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question