Results 1 to 17 of 17

Thread: [RESOLVED] .ocx file - changeover from XP to Vista

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    98

    Resolved [RESOLVED] .ocx file - changeover from XP to Vista

    Please help! I have read previous threads and am not experienced enough to understand how to resolve this issue.

    Our company recently moved from XP to Vista and now the program I developed is not working. There is an error regarding the msmask32.ocx file. the file or one of its dependencies is missing or invalid.

    This control related to this .ocx file was obtained from a website. I have worked out that the related .ocx file needs to be put in the users c:\WINNT\system32 directory for the program to work. Now that we switched over to new Vista labtops, there is an error message relating to this file. So, I put the file into the c:\windows\system32 directory. Now I still have the problem, this time as mentioned above.

    I do not have a VB disk as it was installed by our IS department via the network so not sure I can easily obtain the depends.exe program forum members have mentioned. I have also looked at the security settings of the .ocx, gave the user full control (admittedly the user has not rebooted) and still the same error message appears.

    Please help in lamens terms!!!

    Thanks in advance.

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: .ocx file - changeover from XP to Vista

    You need to build and then supply your IT dept with your app distribution package so they can install it properly.
    To build distribution you may use VB6's Package & Deployment Wizard or any other utility you may already have.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    98

    Re: .ocx file - changeover from XP to Vista

    Thanks for fast response, I will try to do this Friday when I am next in the office and let you know.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: .ocx file - changeover from XP to Vista

    This OCX ships with VB6, you should not have to "obtain it from a web site."

    As MSMASK32.DEP indicates there are no additional dependencies to deploy unless your application is localized for non-English use. Then there is a series of resource DLLs containing the localized strings (MSMskDE.dll, etc.).

    This OCX is OS-independent and is supported on Win95 through Win7. However improvements were made over the years so you want to deploy the VB6 SP6b version and not an old one off some random web site. Randomly dropping these files into System32 is not advised, for example under Vista64 that would be the wrong folder.

    This is one reason why you want to use a proper installation package. On Vista64 a 32-bit PDW setup will have its write accesses to System32 virtualized to SysWOW64 where 32-bit OCXs belong.

    File System Redirector

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    98

    Re: .ocx file - changeover from XP to Vista

    Please in lamens terms, what do I need to do? Most of what you have said in your email is over my head!
    Thanks in advance.

  6. #6

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    98

    Re: .ocx file - changeover from XP to Vista

    My program .exe file is kept on a shared drive and so the users can use it by creating a shortcut. The VB6 app is held on a network drive and don't have access to the disk to get any extras that VB6 offers.

  8. #8

  9. #9
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,226

    Re: .ocx file - changeover from XP to Vista

    Quote Originally Posted by RhinoBull View Post
    Regardless of where your exe is (on local machine or shared drive) ALL runtime dependencies must be installed locally.

    Build your distribution package.

    All run time dependencies need to be installed on the machine, where the program is running. Not necessarily the same machine where the exe is stored.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  10. #10

  11. #11
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,226

    Re: .ocx file - changeover from XP to Vista

    Quote Originally Posted by RhinoBull View Post
    That's what I said, didn't I?
    Doesn't have to be locally. That's all I was pointing out. I apologize for nitpicking.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  12. #12
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: .ocx file - changeover from XP to Vista

    Not at all...

    Anyway, every windows based application is always local to some machine.
    There are limited number of ways to run windows app:

    - "completely" local: application is fully installed and run from the user's workstation
    - partially local: all dependencies are installed locally but executable is located on the LAN
    - application is installed and executed on the server (note: not lan): Citrix is a great example of this method
    - web application is utilizing some activex component

    All of the above requires your application to be installed locally whether it's a workstation or the server.
    When executed from the LAN all runtime files must be installed locally.
    When web app needs to run activex component windows will check whether or not all dependencies are installed (registered) locally
    When running through Citrix (it creates a virtual session but actual execution is done on the server) your app must be installed locally on the server itself.

    So, the point I'm making is that windows application is always local to something - all of its dependecies must be registered on its parent (aka local) machine or it won't run otherwise.

    Regardless of any methodology a distribution package imho is a must.

    Regards.

  13. #13
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: .ocx file - changeover from XP to Vista

    If the app is not installed via an installation package and using an Administrator account, you will have issues like this especially if the user account is a limited one. Since you have no install package, did you at least register the ocx?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  14. #14
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: .ocx file - changeover from XP to Vista

    The following step by step procedure shows how you can
    custom install the msmask32.ocx file.

    To try this exercise, open a new Standard Exe project and do the following:

    1: Add Form1.

    2: Add an MaskEdBox1 to Form1.
    If the MaskEdBox ( it looks like this, ##|)
    is not in your toolbox, then goto ( Components/Controls ) and Selected,
    Microsoft Masked Edit Control 6.0

    3: Place the following code in Form1

    Code:
    Option Explicit
    
    Private Sub Form_Load()
    
    MaskEdBox1.Mask = "(###) ###-####"
    MaskEdBox1.Text = "(234) 654-9876"
    
    Me.Show
    
    DoEvents
    
    MsgBox " msmask32.ocx installed Ok"
    
    Unload Me
    
    End Sub
    4: build and package project.
    5: install this on new Vista laptops.

    Hope it helps.
    5ms
    Last edited by 5ms?; Sep 13th, 2009 at 09:41 AM.

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    98

    Re: .ocx file - changeover from XP to Vista

    thanks for all the replies. I have used the packaging and deployment wizard, creating a dependency file and then trying to package it by pressing the package icon. I then get an error saying that it cannot find the setup.exe, setup1.exe, ST6UNST.exe and VB6STKIT.DLL files. What are these and where can I find them? Have I missed out a step somewhere.
    Thanks in advance. I feel I am getting somewhere!

  16. #16

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    98

    Re: .ocx file - changeover from XP to Vista

    I built the package using the packaging and deployment wizard (I searched for the files and found them re email previous) and ran it on my new vista machine. (the program runs fine on my non-vista machine) However, the .ocx file can be found by my program but it needs to be registered. Please can you tell me how to register it? (did I miss something in the previous emails?)

  17. #17

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    98

    Re: .ocx file - changeover from XP to Vista

    I found out how to register the file ----I found the answer in the MSN library.
    Thanks to all those who took the time to help me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width