COMException "Class not registered"

P

Polad Mirzayev

Hi there,

I'm working on the .NETCF 2.0 application for PocketPC and I have a third
party ActiveX DLL (AXISMEDIACONTROL.dll) that I need to use on my form. I
use AxImp.exe tool to generate C# source of the Interop library of the DLL.
It creates a class that is derived from AxHost. Everything works just fine
and I even get my [AxAxisMediaControl] ActiveX control appear on the VS 2005
Toolbox with all the properties and events. The project also compiles
without any errors when I "Build" it but as soon as I run it on either the
"Win Mobile 5.0" emulator or the real device it throws this:

--------------------------------------------------------
COMException was unhandled

System.Runtime.InteropServices.COMException: {"Class not registered"}

"at System.Windows.Forms.AxHost.CoCreateInstance()
at System.Windows.Forms.AxHost.CreateWithoutLicense()
at System.Windows.Forms.AxHost.CreateInstanceCore()
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo()
at System.Windows.Forms.AxHost.GetOcx()
at System.Windows.Forms.AxHost..ctor()
at System.Windows.Forms.AxHost..ctor()
at AxAXISMEDIACONTROLLib.AxAxisMediaControl..ctor()
at DeviceApplication1.Form1.InitializeComponent()
at DeviceApplication1.Form1..ctor()
at DeviceApplication1.Program.Main()"
--------------------------------------------------------

By the way I was doing everything according to the foloowing article
"Hosting ActiveX Controls in the .NET Compact Framework 2.0":
http://msdn.microsoft.com/library/d...n-us/dnnetcomp/html/host_activex_controls.asp

Also another strange thing is I get the same error when I try to run the
sample project that comes with the article though it also compiles without
any errors.

I'm really stuck at this point as it seems to me that I'm doing everything
right.
I'd really appreciate any help with this matter.

Thanks in advance,

Polad.
 
P

Polad Mirzayev

Hi Chris,

I was trying to find the regsvrce.exe but I couldn't find it. So I went the
other way and created the CAB installation package with *.INF file that had
a [CESelfRegister] section listing the DLL that should be registered on the
device. Installation went smooth and created all the shortcuts and files in
the proper directories. I'm not sure if it registered the DLLs after that
but it didn't solve the problem either. When I'm trying to run the
application on the device after installtion it prompts exactly the same
error:
"COMException Class not registered".

Any ideas on that?
Thanks for your help.

Polad.

P.S. By the way how can I check if the DLL is registered on the device?


Is the COM DLL registered on the device?

-Chris


Polad Mirzayev said:
Hi there,

I'm working on the .NETCF 2.0 application for PocketPC and I have a third
party ActiveX DLL (AXISMEDIACONTROL.dll) that I need to use on my form. I
use AxImp.exe tool to generate C# source of the Interop library of the
DLL. It creates a class that is derived from AxHost. Everything works
just fine and I even get my [AxAxisMediaControl] ActiveX control appear
on the VS 2005 Toolbox with all the properties and events. The project
also compiles without any errors when I "Build" it but as soon as I run
it on either the "Win Mobile 5.0" emulator or the real device it throws
this:

--------------------------------------------------------
COMException was unhandled

System.Runtime.InteropServices.COMException: {"Class not registered"}

"at System.Windows.Forms.AxHost.CoCreateInstance()
at System.Windows.Forms.AxHost.CreateWithoutLicense()
at System.Windows.Forms.AxHost.CreateInstanceCore()
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo()
at System.Windows.Forms.AxHost.GetOcx()
at System.Windows.Forms.AxHost..ctor()
at System.Windows.Forms.AxHost..ctor()
at AxAXISMEDIACONTROLLib.AxAxisMediaControl..ctor()
at DeviceApplication1.Form1.InitializeComponent()
at DeviceApplication1.Form1..ctor()
at DeviceApplication1.Program.Main()"
--------------------------------------------------------

By the way I was doing everything according to the foloowing article
"Hosting ActiveX Controls in the .NET Compact Framework 2.0":
http://msdn.microsoft.com/library/d...n-us/dnnetcomp/html/host_activex_controls.asp

Also another strange thing is I get the same error when I try to run the
sample project that comes with the article though it also compiles
without any errors.

I'm really stuck at this point as it seems to me that I'm doing
everything right.
I'd really appreciate any help with this matter.

Thanks in advance,

Polad.
 
G

Guest

USe the remote registry editor to see if the class is indeed registered.
The problem with using a CAB for registration is I don't believe you get any
feedback on failure. So if the DLL is for a different processor, or for the
desktop, I don't think you'll get any notification of failure.

-Chris


Polad Mirzayev said:
Hi Chris,

I was trying to find the regsvrce.exe but I couldn't find it. So I went
the other way and created the CAB installation package with *.INF file
that had a [CESelfRegister] section listing the DLL that should be
registered on the device. Installation went smooth and created all the
shortcuts and files in the proper directories. I'm not sure if it
registered the DLLs after that but it didn't solve the problem either.
When I'm trying to run the application on the device after installtion it
prompts exactly the same error:
"COMException Class not registered".

Any ideas on that?
Thanks for your help.

Polad.

P.S. By the way how can I check if the DLL is registered on the device?


Is the COM DLL registered on the device?

-Chris


Polad Mirzayev said:
Hi there,

I'm working on the .NETCF 2.0 application for PocketPC and I have a
third party ActiveX DLL (AXISMEDIACONTROL.dll) that I need to use on my
form. I use AxImp.exe tool to generate C# source of the Interop library
of the DLL. It creates a class that is derived from AxHost. Everything
works just fine and I even get my [AxAxisMediaControl] ActiveX control
appear on the VS 2005 Toolbox with all the properties and events. The
project also compiles without any errors when I "Build" it but as soon
as I run it on either the "Win Mobile 5.0" emulator or the real device
it throws this:

--------------------------------------------------------
COMException was unhandled

System.Runtime.InteropServices.COMException: {"Class not registered"}

"at System.Windows.Forms.AxHost.CoCreateInstance()
at System.Windows.Forms.AxHost.CreateWithoutLicense()
at System.Windows.Forms.AxHost.CreateInstanceCore()
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo()
at System.Windows.Forms.AxHost.GetOcx()
at System.Windows.Forms.AxHost..ctor()
at System.Windows.Forms.AxHost..ctor()
at AxAXISMEDIACONTROLLib.AxAxisMediaControl..ctor()
at DeviceApplication1.Form1.InitializeComponent()
at DeviceApplication1.Form1..ctor()
at DeviceApplication1.Program.Main()"
--------------------------------------------------------

By the way I was doing everything according to the foloowing article
"Hosting ActiveX Controls in the .NET Compact Framework 2.0":
http://msdn.microsoft.com/library/d...n-us/dnnetcomp/html/host_activex_controls.asp

Also another strange thing is I get the same error when I try to run the
sample project that comes with the article though it also compiles
without any errors.

I'm really stuck at this point as it seems to me that I'm doing
everything right.
I'd really appreciate any help with this matter.

Thanks in advance,

Polad.
 
P

Polad Mirzayev

Hi Chris,

Sorry for my late reply, I was away for a few weeks now I'm back to my
project. So I've registered the DLL on the device manually using the VS2005
Remote Registry editor as you suggested:

\HKCR\CLSID\{...."MyClsidAttribute"...}

and also added below subkeys to this:

\HKCR\CLSID\{...."MyClsidAttribute"...}\Control

\HKCR\CLSID\{...."MyClsidAttribute"...}\InprocServer32 with values:
(Default) = "\Program Files\....\axismediacontrollib.dll"
ThreadingModel = "Both"

I'm not sure if I should put anything else in the registry but it looks like
the DLL is registered now because the previous error "Class not registered"
has gone and replaced with the new error:

[System.Runtime.InteropServices.COMException]: {"Error in the DLL "}
ErrorCode: -2147220999
StackTrace:
"at System.Windows.Forms.AxHost.CoCreateInstance()
....
at OfficeViewer.Form1.InitializeComponent()
at OfficeViewer.Form1..ctor()
at OfficeViewer.Program.Main()"

the error pops out on the line where:
MyProject.Form1.Controls.Add(this.axAxisMediaControl1);

I'm stuck on this phase now. Could you shed some light on this?
I really apreciate your help.

Thanks,

Polad.



USe the remote registry editor to see if the class is indeed registered.
The problem with using a CAB for registration is I don't believe you get
any
feedback on failure. So if the DLL is for a different processor, or for
the
desktop, I don't think you'll get any notification of failure.

-Chris


Polad Mirzayev said:
Hi Chris,

I was trying to find the regsvrce.exe but I couldn't find it. So I went
the other way and created the CAB installation package with *.INF file
that had a [CESelfRegister] section listing the DLL that should be
registered on the device. Installation went smooth and created all the
shortcuts and files in the proper directories. I'm not sure if it
registered the DLLs after that but it didn't solve the problem either.
When I'm trying to run the application on the device after installtion it
prompts exactly the same error:
"COMException Class not registered".

Any ideas on that?
Thanks for your help.

Polad.

P.S. By the way how can I check if the DLL is registered on the device?


Is the COM DLL registered on the device?

-Chris


in
message Hi there,

I'm working on the .NETCF 2.0 application for PocketPC and I have a
third party ActiveX DLL (AXISMEDIACONTROL.dll) that I need to use on my
form. I use AxImp.exe tool to generate C# source of the Interop library
of the DLL. It creates a class that is derived from AxHost. Everything
works just fine and I even get my [AxAxisMediaControl] ActiveX control
appear on the VS 2005 Toolbox with all the properties and events. The
project also compiles without any errors when I "Build" it but as soon
as I run it on either the "Win Mobile 5.0" emulator or the real device
it throws this:

--------------------------------------------------------
COMException was unhandled

System.Runtime.InteropServices.COMException: {"Class not registered"}

"at System.Windows.Forms.AxHost.CoCreateInstance()
at System.Windows.Forms.AxHost.CreateWithoutLicense()
at System.Windows.Forms.AxHost.CreateInstanceCore()
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo()
at System.Windows.Forms.AxHost.GetOcx()
at System.Windows.Forms.AxHost..ctor()
at System.Windows.Forms.AxHost..ctor()
at AxAXISMEDIACONTROLLib.AxAxisMediaControl..ctor()
at DeviceApplication1.Form1.InitializeComponent()
at DeviceApplication1.Form1..ctor()
at DeviceApplication1.Program.Main()"
--------------------------------------------------------

By the way I was doing everything according to the foloowing article
"Hosting ActiveX Controls in the .NET Compact Framework 2.0":
http://msdn.microsoft.com/library/d...n-us/dnnetcomp/html/host_activex_controls.asp

Also another strange thing is I get the same error when I try to run
the
sample project that comes with the article though it also compiles
without any errors.

I'm really stuck at this point as it seems to me that I'm doing
everything right.
I'd really appreciate any help with this matter.

Thanks in advance,

Polad.
 
G

Guest

Are you certain this DLL is built for the ARM processor?

-Chris

Polad Mirzayev said:
Hi Chris,

Sorry for my late reply, I was away for a few weeks now I'm back to my
project. So I've registered the DLL on the device manually using the
VS2005 Remote Registry editor as you suggested:

\HKCR\CLSID\{...."MyClsidAttribute"...}

and also added below subkeys to this:

\HKCR\CLSID\{...."MyClsidAttribute"...}\Control

\HKCR\CLSID\{...."MyClsidAttribute"...}\InprocServer32 with values:
(Default) = "\Program Files\....\axismediacontrollib.dll"
ThreadingModel = "Both"

I'm not sure if I should put anything else in the registry but it looks
like the DLL is registered now because the previous error "Class not
registered" has gone and replaced with the new error:

[System.Runtime.InteropServices.COMException]: {"Error in the DLL "}
ErrorCode: -2147220999
StackTrace:
"at System.Windows.Forms.AxHost.CoCreateInstance()
...
at OfficeViewer.Form1.InitializeComponent()
at OfficeViewer.Form1..ctor()
at OfficeViewer.Program.Main()"

the error pops out on the line where:
MyProject.Form1.Controls.Add(this.axAxisMediaControl1);

I'm stuck on this phase now. Could you shed some light on this?
I really apreciate your help.

Thanks,

Polad.



USe the remote registry editor to see if the class is indeed registered.
The problem with using a CAB for registration is I don't believe you get
any
feedback on failure. So if the DLL is for a different processor, or for
the
desktop, I don't think you'll get any notification of failure.

-Chris


Polad Mirzayev said:
Hi Chris,

I was trying to find the regsvrce.exe but I couldn't find it. So I went
the other way and created the CAB installation package with *.INF file
that had a [CESelfRegister] section listing the DLL that should be
registered on the device. Installation went smooth and created all the
shortcuts and files in the proper directories. I'm not sure if it
registered the DLLs after that but it didn't solve the problem either.
When I'm trying to run the application on the device after installtion
it
prompts exactly the same error:
"COMException Class not registered".

Any ideas on that?
Thanks for your help.

Polad.

P.S. By the way how can I check if the DLL is registered on the device?


Is the COM DLL registered on the device?

-Chris


in
message Hi there,

I'm working on the .NETCF 2.0 application for PocketPC and I have a
third party ActiveX DLL (AXISMEDIACONTROL.dll) that I need to use on
my
form. I use AxImp.exe tool to generate C# source of the Interop
library
of the DLL. It creates a class that is derived from AxHost. Everything
works just fine and I even get my [AxAxisMediaControl] ActiveX control
appear on the VS 2005 Toolbox with all the properties and events. The
project also compiles without any errors when I "Build" it but as soon
as I run it on either the "Win Mobile 5.0" emulator or the real device
it throws this:

--------------------------------------------------------
COMException was unhandled

System.Runtime.InteropServices.COMException: {"Class not registered"}

"at System.Windows.Forms.AxHost.CoCreateInstance()
at System.Windows.Forms.AxHost.CreateWithoutLicense()
at System.Windows.Forms.AxHost.CreateInstanceCore()
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo()
at System.Windows.Forms.AxHost.GetOcx()
at System.Windows.Forms.AxHost..ctor()
at System.Windows.Forms.AxHost..ctor()
at AxAXISMEDIACONTROLLib.AxAxisMediaControl..ctor()
at DeviceApplication1.Form1.InitializeComponent()
at DeviceApplication1.Form1..ctor()
at DeviceApplication1.Program.Main()"
--------------------------------------------------------

By the way I was doing everything according to the foloowing article
"Hosting ActiveX Controls in the .NET Compact Framework 2.0":
http://msdn.microsoft.com/library/d...n-us/dnnetcomp/html/host_activex_controls.asp

Also another strange thing is I get the same error when I try to run
the
sample project that comes with the article though it also compiles
without any errors.

I'm really stuck at this point as it seems to me that I'm doing
everything right.
I'd really appreciate any help with this matter.

Thanks in advance,

Polad.
 
P

Polad Mirzayev

How can I check that?

Thanks,
Polad

Are you certain this DLL is built for the ARM processor?

-Chris

Polad Mirzayev said:
Hi Chris,

Sorry for my late reply, I was away for a few weeks now I'm back to my
project. So I've registered the DLL on the device manually using the
VS2005 Remote Registry editor as you suggested:

\HKCR\CLSID\{...."MyClsidAttribute"...}

and also added below subkeys to this:

\HKCR\CLSID\{...."MyClsidAttribute"...}\Control

\HKCR\CLSID\{...."MyClsidAttribute"...}\InprocServer32 with values:
(Default) = "\Program Files\....\axismediacontrollib.dll"
ThreadingModel = "Both"

I'm not sure if I should put anything else in the registry but it looks
like the DLL is registered now because the previous error "Class not
registered" has gone and replaced with the new error:

[System.Runtime.InteropServices.COMException]: {"Error in the DLL "}
ErrorCode: -2147220999
StackTrace:
"at System.Windows.Forms.AxHost.CoCreateInstance()
...
at OfficeViewer.Form1.InitializeComponent()
at OfficeViewer.Form1..ctor()
at OfficeViewer.Program.Main()"

the error pops out on the line where:
MyProject.Form1.Controls.Add(this.axAxisMediaControl1);

I'm stuck on this phase now. Could you shed some light on this?
I really apreciate your help.

Thanks,

Polad.



USe the remote registry editor to see if the class is indeed registered.
The problem with using a CAB for registration is I don't believe you get
any
feedback on failure. So if the DLL is for a different processor, or for
the
desktop, I don't think you'll get any notification of failure.

-Chris


in
message Hi Chris,

I was trying to find the regsvrce.exe but I couldn't find it. So I went
the other way and created the CAB installation package with *.INF file
that had a [CESelfRegister] section listing the DLL that should be
registered on the device. Installation went smooth and created all the
shortcuts and files in the proper directories. I'm not sure if it
registered the DLLs after that but it didn't solve the problem either.
When I'm trying to run the application on the device after installtion
it
prompts exactly the same error:
"COMException Class not registered".

Any ideas on that?
Thanks for your help.

Polad.

P.S. By the way how can I check if the DLL is registered on the device?


Is the COM DLL registered on the device?

-Chris


in
message Hi there,

I'm working on the .NETCF 2.0 application for PocketPC and I have a
third party ActiveX DLL (AXISMEDIACONTROL.dll) that I need to use on
my
form. I use AxImp.exe tool to generate C# source of the Interop
library
of the DLL. It creates a class that is derived from AxHost.
Everything
works just fine and I even get my [AxAxisMediaControl] ActiveX
control
appear on the VS 2005 Toolbox with all the properties and events. The
project also compiles without any errors when I "Build" it but as
soon
as I run it on either the "Win Mobile 5.0" emulator or the real
device
it throws this:

--------------------------------------------------------
COMException was unhandled

System.Runtime.InteropServices.COMException: {"Class not
registered"}

"at System.Windows.Forms.AxHost.CoCreateInstance()
at System.Windows.Forms.AxHost.CreateWithoutLicense()
at System.Windows.Forms.AxHost.CreateInstanceCore()
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo()
at System.Windows.Forms.AxHost.GetOcx()
at System.Windows.Forms.AxHost..ctor()
at System.Windows.Forms.AxHost..ctor()
at AxAXISMEDIACONTROLLib.AxAxisMediaControl..ctor()
at DeviceApplication1.Form1.InitializeComponent()
at DeviceApplication1.Form1..ctor()
at DeviceApplication1.Program.Main()"
--------------------------------------------------------

By the way I was doing everything according to the foloowing article
"Hosting ActiveX Controls in the .NET Compact Framework 2.0":
http://msdn.microsoft.com/library/d...n-us/dnnetcomp/html/host_activex_controls.asp

Also another strange thing is I get the same error when I try to run
the
sample project that comes with the article though it also compiles
without any errors.

I'm really stuck at this point as it seems to me that I'm doing
everything right.
I'd really appreciate any help with this matter.

Thanks in advance,

Polad.
 
G

Guest

Check out www.prtracker.com/support/pr948.html

it states that error code is a currupt MDAC. (Microsoft Data Access
Compnents) For some reason I found this very hard to find here on the various
Microsoft sites and on the Web. This page refers you to 2 Microsoft sites for
a possible way of fixing it.

http://support.microsoft.com/default.aspx?scid=kb
http://www.microsoft.com/downloads/...df6-4a21-4b43-f53-14332ef092c9&DisplayLang=en

Hope this helps or sends you in the right direction.

Polad Mirzayev said:
How can I check that?

Thanks,
Polad

Are you certain this DLL is built for the ARM processor?

-Chris

Polad Mirzayev said:
Hi Chris,

Sorry for my late reply, I was away for a few weeks now I'm back to my
project. So I've registered the DLL on the device manually using the
VS2005 Remote Registry editor as you suggested:

\HKCR\CLSID\{...."MyClsidAttribute"...}

and also added below subkeys to this:

\HKCR\CLSID\{...."MyClsidAttribute"...}\Control

\HKCR\CLSID\{...."MyClsidAttribute"...}\InprocServer32 with values:
(Default) = "\Program Files\....\axismediacontrollib.dll"
ThreadingModel = "Both"

I'm not sure if I should put anything else in the registry but it looks
like the DLL is registered now because the previous error "Class not
registered" has gone and replaced with the new error:

[System.Runtime.InteropServices.COMException]: {"Error in the DLL "}
ErrorCode: -2147220999
StackTrace:
"at System.Windows.Forms.AxHost.CoCreateInstance()
...
at OfficeViewer.Form1.InitializeComponent()
at OfficeViewer.Form1..ctor()
at OfficeViewer.Program.Main()"

the error pops out on the line where:
MyProject.Form1.Controls.Add(this.axAxisMediaControl1);

I'm stuck on this phase now. Could you shed some light on this?
I really apreciate your help.

Thanks,

Polad.



USe the remote registry editor to see if the class is indeed registered.
The problem with using a CAB for registration is I don't believe you get
any
feedback on failure. So if the DLL is for a different processor, or for
the
desktop, I don't think you'll get any notification of failure.

-Chris


in
message Hi Chris,

I was trying to find the regsvrce.exe but I couldn't find it. So I went
the other way and created the CAB installation package with *.INF file
that had a [CESelfRegister] section listing the DLL that should be
registered on the device. Installation went smooth and created all the
shortcuts and files in the proper directories. I'm not sure if it
registered the DLLs after that but it didn't solve the problem either.
When I'm trying to run the application on the device after installtion
it
prompts exactly the same error:
"COMException Class not registered".

Any ideas on that?
Thanks for your help.

Polad.

P.S. By the way how can I check if the DLL is registered on the device?


Is the COM DLL registered on the device?

-Chris


in
message Hi there,

I'm working on the .NETCF 2.0 application for PocketPC and I have a
third party ActiveX DLL (AXISMEDIACONTROL.dll) that I need to use on
my
form. I use AxImp.exe tool to generate C# source of the Interop
library
of the DLL. It creates a class that is derived from AxHost.
Everything
works just fine and I even get my [AxAxisMediaControl] ActiveX
control
appear on the VS 2005 Toolbox with all the properties and events. The
project also compiles without any errors when I "Build" it but as
soon
as I run it on either the "Win Mobile 5.0" emulator or the real
device
it throws this:

--------------------------------------------------------
COMException was unhandled

System.Runtime.InteropServices.COMException: {"Class not
registered"}

"at System.Windows.Forms.AxHost.CoCreateInstance()
at System.Windows.Forms.AxHost.CreateWithoutLicense()
at System.Windows.Forms.AxHost.CreateInstanceCore()
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo()
at System.Windows.Forms.AxHost.GetOcx()
at System.Windows.Forms.AxHost..ctor()
at System.Windows.Forms.AxHost..ctor()
at AxAXISMEDIACONTROLLib.AxAxisMediaControl..ctor()
at DeviceApplication1.Form1.InitializeComponent()
at DeviceApplication1.Form1..ctor()
at DeviceApplication1.Program.Main()"
--------------------------------------------------------

By the way I was doing everything according to the foloowing article
"Hosting ActiveX Controls in the .NET Compact Framework 2.0":
http://msdn.microsoft.com/library/d...n-us/dnnetcomp/html/host_activex_controls.asp

Also another strange thing is I get the same error when I try to run
the
sample project that comes with the article though it also compiles
without any errors.

I'm really stuck at this point as it seems to me that I'm doing
everything right.
I'd really appreciate any help with this matter.

Thanks in advance,

Polad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top