-
Jun 14th, 2025, 07:10 AM
#1
Thread Starter
New Member
Trying to get 32-bit ActiveX to work in 64-bit application
I need to use DirectSS (Direct Speech Synthesis) control in 64-bit VB.NET application created using Visual Studio 2022. I asked ChatGPT about a solution, and it generated the solution for me which uses COM wrapper. But I cannot get it to work.
The error happens at these lines:
Code:
Dim t = Type.GetTypeFromProgID("DirectSSServer")
comServer = Activator.CreateInstance(t)
At first, t was returned empty, but I managed to find a partial solution which is to register DirectSSServer32.exe with
Code:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe
:
Code:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe DirectSSServer32.exe /tlb /codebase
It said: "Types registered successfully"
I tried to run, and now t is not empty, but the next line generates the error:
Code:
System.Runtime.InteropServices.COMException: 'Retrieving the COM class factory for component with CLSID {606B46D3-259B-49F6-A4B5-D4F44FC54388} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).'
I looked inside the registry and didn't find "606B46D3-259B-49F6-A4B5-D4F44FC54388" subkey under CLSID of HKEY_CLASSES_ROOT, also didn't find it in the Wow6432Node of HKLM\Software\. The search through the whole registry didn't show any results.
Can you help to correct the DirectSSServer32 project of the solution I attached for it to register properly?
As far as I understand, the only problem is the missing registry keys, but I don't know which program to use to register.
Regsvr32 fails (DllRegisterServer not found), DirectSSServer32.exe /RegServer with administrator privileges does nothing.
Can you help me? I need to get this solution working to implement the method it is using in another application.
The full solution is attached: DirectSS_COM_Project.zip.
BTW: I use free version of ChatGPT, and the allowed requests count is very limited.
-
Jun 15th, 2025, 01:43 PM
#2
Addicted Member
Re: Trying to get 32-bit ActiveX to work in 64-bit application
I do this with VB6, using a DLLSurrogate.
Ref: https://jpsoft.com/forums/threads/32...com-dll.11296/
Note that a 32-bit ActiveX has to be registered with the 32-bit RegAsm.exe
For VB.NET, I could never get it to work.
VB.NET creates both a COM .dll and a .tlb
VB6 creates the COM .dll with the .tlb
The .tlb has to be registered,
which I did,
with the 32-bit RegSvr32.exe,
but I received similar errors to yours.
I tried embedding the .tlb into the COM .dll,
but I was not successful.
Hopefully someone else can tell us what we are doing incorrectly.
Joe
-
Jun 22nd, 2025, 06:21 AM
#3
Thread Starter
New Member
Re: Trying to get 32-bit ActiveX to work in 64-bit application
I'm able to avoid the error I mentioned in the first post by following these instructions: saved in the Web Archive.
But now I'm getting new error: I cannot use the SetCallback method of the COM object, which after viewing in VS debugger turns to be just a Form.
I also cannot use the Speak method of the 32-bit out-of-process COM server, throws "Not found" error.
By the way, I used Claude to make my solution more compact.
The new solution is here: DirectSS_COM_Project(rewritten with Claude).zip
-
Jun 23rd, 2025, 02:15 AM
#4
Re: Trying to get 32-bit ActiveX to work in 64-bit application
Why would you want to use an external 32-bit component in a 64-bit .NET application when .NET provides you with a suitable namespace (System.Speech.Synthesis) for a TTS?
-
Jun 28th, 2025, 01:07 PM
#5
Thread Starter
New Member
Re: Trying to get 32-bit ActiveX to work in 64-bit application
No, that was wrong. It's just the IDE that forced the COM server to be also 64-bit.
So, I did more googling and asking neural nets. Now I'm using this Claude-generated code, but it doesn't show success in tests:
ClaudesVersion2.zip
Can somebody please show me what is wrong?
-
Jun 28th, 2025, 02:16 PM
#6
Re: Trying to get 32-bit ActiveX to work in 64-bit application
What I'm trying to say is, for .NET, it doesn't matter whether you're writing a 32-bit or 64-bit App and you use the System.Speech.Synthesis Namespace. You don't need to use an external ActiveX component if there's an existing Namespace for it in .NET.
-
Jun 28th, 2025, 02:48 PM
#7
Thread Starter
New Member
Re: Trying to get 32-bit ActiveX to work in 64-bit application
 Originally Posted by Vadim
No, that was wrong. It's just the IDE that forced the COM server to be also 64-bit.
So, I did more googling and asking neural nets. Now I'm using this Claude-generated code, but it doesn't show success in tests:
ClaudesVersion2.zip
Can somebody please show me what is wrong?
Can somebody please help? At least with creating the 32-bit out-of-process COM server with VB6, possibly.
-
Jun 28th, 2025, 06:40 PM
#8
Re: Trying to get 32-bit ActiveX to work in 64-bit application
How about starting by telling us why you have to use an archaic control rather than something newer? If there is some reason why you have to stick with that, then you have to, but you'll end up just fighting with things like this. That thing is so old it's even hard to find information about it.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|