Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB6 Win7 64-bit
Hello Everyone,
 
I have a funny issue I would like to share with you to move a bit forward on what could be the problem.
 
The operation system used is Windows 7 english ultimate 64bits. The user account has admin right.
 
When I run a visual basic6 32 bits application
 
The vb6 application is doing the following:
 
 
<Client.exe>
Dim objAcquisition As Object
Private Sub btnCreate_Click()
    On Error Resume Next
    Dim strProgID As String
    
    strProgID = "DummyServer.Automation"
    
    Set objAcquisition = VBA.CreateObject(strProgID)
    
    If (objAcquisition Is Nothing) Then
        Label1 = "Cannot create " & strProgID & " => " & CStr(Err.Description)
    Else
        Label1 = "Create " & strProgID & " => completed"
    End If
    
End Sub
 
The com activex exe also developped under visual basic 32bits is:
 
<dummyserver.exe>
Private frm As Form1
 
Private Sub Class_Initialize()
    Set frm = New Form1
    
    Load frm
    frm.Show 0
End Sub
 
Form1 is just a small dialog window with a big label text "Hello World"
 
When I run the client application on my development computer and also on a windows 7 pro 64bits computer, it works fine.
 
When I want to try on a windows 7 ultimate 64 bits, I get the error "object required"
 
I have disabled the UAC and also turn DEP off but nothing changes.
I am sure this is a computer configuration issue but how to recover it.
I wonder if the windows updater has not broken it.
 
I have also re-installed the vb6 redist package on that computer but did not fix the issue.
 
I have tried also based on different forum to recover the registry ActiveX issue via the tool Speedy PC Pro but still impossible to launch the acticeX exe via createobject.
 
I have implemented a small Winform C# client and this works well:
        private Type _VB6DocType = null;
        private object _VB6Control = null;
 
        private void button1_Click(object sender, EventArgs e)
        {
            _VB6DocType = System.Type.GetTypeFromProgID("DummyServer.Automation");
            if (_VB6DocType == null)
            {
                label1.Text = "DummyServer.Automation = GetTypeFromProgID failed";
                return;
            }
 
            _VB6Control = System.Activator.CreateInstance(_VB6DocType);
            if (_VB6Control == null)
            {
                label1.Text = "DummyServer.Automation = CreateInstance failed";
                return;
            }
 
            label1.Text = "DummyServer.Automation = OK";
        }
 
What could be the problem ? How would it be possible to fix it ?
 
Thank you very much in advance.
Best regards.
MiQi.
Posted 27-Nov-12 7:54am
Comments
Mathlab at 27-Nov-12 12:58pm
   
I would change my error handling first before I report this as an outright bug, I woule like to see a try catch.
SuperMiQi at 28-Nov-12 4:01am
   
Hello Matlab,
 
What do you mean with 'try catch' in vb6, I use 'on error ...' and this returns me 'object required'. I am not using vb.net where I could indeed apply a try catch around my statements.
 
Best regards.
MiQi.
Marcus Kramer at 27-Nov-12 14:18pm
   
Are you sure you have the required vb6 runtimes installed in the target machine?
SuperMiQi at 28-Nov-12 3:59am
   
Hello Marcus,
 
I installed one more the required vb6 runtimes from http://support.microsoft.com/kb/192461/en-us but this did not fix it.
 
Any ideas are welcome.
 
Thank you.
Best regards.
MiQi.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I have the same problem with my vb6 activex exe.
 
The only "fix" I have found is to start the hosting application as administrator just once.
Then after that the activex exe is registered (apparently) and runs forevermore.
 
This is what i'm trying to fix
 
Did you fix yours?
 
:Ron
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I fixed mine!
 
MSCOMCT2.OCX exists but is not registered by default in x64 SP1
 
:Ron
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 285
1 DamithSL 265
2 CPallini 195
3 Maciej Los 175
4 George Jonsson 170
0 OriginalGriff 5,415
1 DamithSL 4,422
2 Maciej Los 3,820
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,911


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 11 May 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100