Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 17th, 2008, 12:27 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default “Permission Denied” adding ref. to MSComCtl.ocx

I have loaded the project in question before—within the last couple weeks—without problem.

But now when I try to open the .prj in the VB6 IDE, I get “Premission Denied.” (You’d think the
pricks at Microsoft could make message boxes like this and File Not Found tell you [u]what</u> file
was not found—since the OS was just looking for it—and to [u]what</u> you were just denied access
to—since the OS just finished trying to access it...)

I wind up with several .log files. The entries are:
Code:
Class MSComctlLib.Toolbar of control tbToolBar was not a loaded control class.
Class MSComctlLib.StatusBar of control sbStatusBar was not a loaded control class.
Class MSComctlLib.ImageList of control imlToolbarIcons was not a loaded control class.
in one, and
Code:
Property Picture in picLogo had an invalid file reference.
Property Picture in picLogo had an invalid file reference.
in the splash screen. (I presume this problem is secondary to not being able to create the
ImageList, in the first file.)

I have run the .EXE contained in vb6cli.exe: VBC6.exe.
I have run RegSvr32 "C:\WINNT\system32\MSCOMCTL.OCX" (Reported successful registration.)
I have looked at the permissions (comparing with MSCOMCT2.OCX, which I can reference
without a problem), and all seems to be copascetic.

I get this error also when I have an open application, right click on the toolbox, select
Comp[u]o</u>nents..., and try to add Microsoft Windows Common Controls 6.0 (SP6) (which is
MSComCtl.ocx), yet I can add Microsoft Windows Common Controls-2 6.0 (SP6) &
Microsoft Windows Common Controls-3 6.0 (SP5)
Reply With Quote
  #2 (permalink)  
Old March 24th, 2008, 02:36 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I’m starting to feel that no one else has encountered this...
Reply With Quote
  #3 (permalink)  
Old March 24th, 2008, 07:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have these kind of problems all the time... welcome to dll hell. The solution usually comes only after a big headache.

first of all, can you add that control to a brand new project?

"There are two ways to write error-free programs. Only the third one works."
Unknown
Reply With Quote
  #4 (permalink)  
Old March 25th, 2008, 09:55 AM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I cannot. Any attempt to add this library of controls to the ToolBox raises the same error.

The irritating thing is that this is preventing me from opening projects which I have maintained (updated, bug-fixed, etc.) on this machine, using this account, not a month ago.
Reply With Quote
  #5 (permalink)  
Old March 25th, 2008, 05:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The error message that you get "Permission denied" is quite strange, but I have a couple of ideas

Are you running as Administrator? If not, can you try it?
Do you have a anti-virus, anti-spyware running in your computer that can prevent that component to be loaded?
Did you install any software lately, that can have "overwritten" your mscomctl.ocx?
Did you try to unregister that component, and see if there is another one registered by mistake in your computer?
Can you open the component using OleView?


"There are two ways to write error-free programs. Only the third one works."
Unknown
Reply With Quote
  #6 (permalink)  
Old March 26th, 2008, 09:44 AM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I have an administrator account on the same machine. I used
Code:
   %windir%\system32\runas.exe /user:brian.wren.....@.... c:\PROGRA~1\MID03A~1\VB98\VB6.EXE
, and pointed the IDE to the program, and I was not denied access. So I presume that would also be the case if I logged on as that user.
There is anti virus software. It certainly is possible that with routine upgrades this library I used to be able to use is now inaccessible. (Of course, I have no idea how to verify that...)
I have not tried unregistering to see if there is another one registered. I’m not clear on how unregistering it would reveal that?
With what software does OleView come? If you can suggest where to find it, i’ll try it.

Apparently I am not using the third way to write error-free code... :-]
Reply With Quote
  #7 (permalink)  
Old March 26th, 2008, 10:36 AM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I found OleView through search and ran it. It warned me that some features might not function because I was not logged in as an administrator (I clicked OK).

I found ont of the controls in the library in question, and was able to view detais about it.

So I opened VB6 not as an administrator, and opened the offending project. No problems. Everything is now working fine...

Who knows...
Reply With Quote
  #8 (permalink)  
Old March 27th, 2008, 12:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

all's well then :)
This is whu is called "dll's hell", maybe you know why you arrived there ;) and most of the time you'll never know how you came out

It was a permission problem, that is some way it recovered.

Cheers,
Marco

"There are two ways to write error-free programs. Only the third one works."
Unknown
Reply With Quote
  #9 (permalink)  
Old June 29th, 2008, 09:39 AM
Registered User
 
Join Date: Nov 2007
Location: ffps fspf, jjfgkfg, India.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just UnInstall/Re-Install vB 6 ...It will solve your problem

Reply With Quote
  #10 (permalink)  
Old June 30th, 2008, 03:44 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

You clearly don't work in a large enterprise. Getting something like that done here is asceticism embodied. Frankly, I’d rather lie on a bed of nails...
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ref numbers RubyRue ASP.NET 2.0 Basics 2 January 16th, 2008 10:29 AM
Adding .ocx file created in VB 6.0 into Infopath g_b_mk VB.NET 2002/2003 Basics 1 December 5th, 2007 01:52 AM
convert from 'ref double[]' to 'ref object' wakeup C# 0 April 7th, 2006 05:14 AM
MSFLXGRD.OCX and MSDATGRD.OCX Clive Astley Access 1 July 25th, 2003 08:47 AM
mscomctl and mscomct2 ocx"s" alb Beginning VB 6 3 July 21st, 2003 12:08 PM



All times are GMT -4. The time now is 07:43 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.