Errors Registering/Using DicomObjects.ocx in Windows Vista

Unable to Register DicomObjects.ocx due to lack of permission

Vista systems have a high security control so explicit system admin previlege will be required when registering DicomObjects.ocx, or you will get the following error if you are a normal user:

You can easily solve this problem in either of the following ways:

  • Log off Vista and log back in as system admin, then do the ocx registration.
  • Right click on CMD and choose "Run as administrator", then use Regsvr32.exe tool to register DicomObjects.ocx

"Class not registered" error

When running DicomObjects.ocx-based .NET Application in 64bit Vista, people sometimes get the following error at runtime:

System.Runtime.InteropServices.COMException (0x80040154): Class not registered

DicomObjects.ocx has been successfully registererd but when the application starts to run, the above exception gets thrown. This is probably because the application hasn't been explicitly set to run in "x86" mode. So open the project property page, choose "Compile" tab, click on "Advanced Compile Options..." button, from the "Target CPU:" dropdown list, change the value from "AnyCPU" to "x86", as shown in the following picture:

Relevance: