Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
PLATFORM WIN7 64bit
VS2008

I Use Vc++ create a empty project of MFC ACTIVEX control and it has been reg correctly.
I can choose the activeX from com+ list and drag it on the vb.net form.But when i run
the project without any custom code, vb.net throw a such exception
(HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)).
I just want to know where is the problem.
Posted
Comments
[no name] 23-Aug-12 10:55am    
"PLATFORM WIN7 64bit" Is the ocx 64 bit? And is your application 32 bit?

It seems your control is not properly registered, try to reinstall it, register it and try it again.

In order to register it a small google search will give you plenty of results, the first one I found is: http://www.clickteam.co.uk/resources/GTM/GTM7.htm[^]

Good luck.
 
Share this answer
 
Ok,after a long night, i find the solution.
The default debug or release platform in vb.net is x64(my Pc is WIN7 64bit),so just change the setting of debug or release to X86,it does work.
So exclude the possibility of reg,perhaps modify the project config file will do work.
 
Share this answer
 
I have uninstall and reinstall the ocx so many times.
I use the tool "TSN32.exe" to test the OCX file and it does work.
It is very interesting,the ActiveX can be used in VBA under MS Office such as Word and Excel,but it still doesn't work in vb.net.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900