This project has moved and is read-only. For the latest updates, please go here.

windows x64 with sharpmap and ecw raster

Jan 18, 2008 at 9:57 AM

I try to open ECW raster with sharpmap.
That works well on a x86 system but I need to register the dll (regsvr32 NCSEcw).
But if I try on x64 computer, I register the dll in the same way with no error but at the .net execution I have an error :
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {D63891F1-E026-11D3-A6C3-005004055C6C} failed due to the following error: 80040154
Did someone got the same error? Is there a way to bypass the error?

Thanks for your help.

Jan 21, 2008 at 8:36 AM
If someone is interested in the topic, I post a question about ermapper sdk and 64bit here:
But from now, I have no relevant answer.
May 18, 2010 at 11:06 AM


We have a Winforms App that contains a SharpMap part. Until now we had WinXP 32bit workstations. I registered the ncsecw.dll under c:\windows\system32\regsvr32.exe "C:\...\Earth Resource Mapping\ECW SDK\redistributable\vc71\ncsecw.dll" and everything worked great.

Now we switched some Workstations to Win7 64bit. I tried different ways to register the ncsecw.dll:

c:\windows\syswow64\regsvr32.exe "C:\Program Files (x86)\Earth Resource Mapping\ECW SDK\redistributable\vc71\ncsecw.dll"

c:\windows\system32\regsvr32.exe "C:\Program Files (x86)\Earth Resource Mapping\ECW SDK\redistributable\vc71\ncsecw.dll"

But I always get the error:

System.Runtime.InteropServices.COMException (0x80040154): Die COM-Klassenfactory für die Komponente mit CLSID {D63891F1-E026-11D3-A6C3-005004055C6C} konnte aufgrund des folgenden Fehlers nicht abgerufen werden: 80040154.
   bei SharpMap.Layers.EcwRasterLayer..ctor(String strLayerName, String imageFilename)
   bei ProPlanSys_01.frmMandateKarte.getLayers(Map mapUebergabe) ..........

Does anybody have an idea how to fix this?

Thanks for your help




May 18, 2010 at 12:30 PM
Edited May 18, 2010 at 1:23 PM

Hello Stefan,

please verify that

  • your application does target x86 machines (not AnyCPU or x64)
  • all possible dependencies for ncsecw.dll are met (dependency-viewer from

hth FObermaier

May 18, 2010 at 3:12 PM
Hi FObermaier Thank you for your hint!!! The application target was set to AnyCPU. Now SharpMap with GDAL works on the Win7 64bit machine :-) I wouldn't have found the solution without your help. THX stefan