[Insight-users] ITK and managed c++ 2005

Tadeusz Dracz tdracz at o2.pl
Sat Sep 30 04:54:45 EDT 2006


Hello,

I have created a sample C++ managed windows forms application that is
supposed to use ITK.
I have added all includes as in a normal unmanaged c++ project. It compiles
without errors and warnings. 
But when executed, it throws an exception just at the start. Here is the
contents of the Output window:

First-chance exception at 0x7c96cc82 in App.exe: 0xC0000005: Access
violation reading location 0x0d7cebd9.
First-chance exception at 0x781389db (msvcr80.dll) in App.exe: 0xC0000005:
Access violation writing location 0x0d7cebda.
A first chance exception of type 'System.AccessViolationException' occurred
in App.exe
A first chance exception of type
'<CrtImplementationDetails>.ModuleLoadException' occurred in msvcm80.dll
First-chance exception at 0x7c812a5b in App.exe: Microsoft C++ exception:
[rethrow] at memory location 0x00000000..
An unhandled exception of type 'System.TypeInitializationException' occurred
in Unknown Module.
Additional information: The type initializer for '<Module>' threw an
exception.
System.TypeInitializationException' occurred in Unknown Module.


The application contains just these lines that use ITK:

#include "itkImageFileReader.h"
typedef unsigned short PixelType;
const unsigned int Dimension = 3;
typedef itk::Image< PixelType, Dimension > ImageType;

Is there anybody that could help in this matter?

Regards, 
Tadeusz



More information about the Insight-users mailing list