I have build the DCMTK3.5.4 and generated Lib files, using VC.Net 2003. Now i want to use it.
When i write a code using .Net 2003 i got Runtime exception ASSERT.
I dont get any Compile time and Linking errors.
This is the code :
Code: Select all
// This is the main project file for VC++ application project
// generated using an Application Wizard.
#include "dcmtk/config/osconfig.h"
#include "dcmtk/config/cfwin32.h"
#include <dcmtk/dcmdata/dcfilefo.h>
#include <dcmtk/dcmdata/dcdatset.h>
#include <dcmtk/dcmdata/dctag.h>
#include <dcmtk/dcmdata/dcitem.h>
#include <dcmtk/dcmdata/dcobject.h>
#include <dcmtk/ofstd/ofcond.h>
#include <dcmtk/ofstd/ofstring.h>
#include <dcmtk/zlib.h>
#include <dcmtk/zconf.h>
#include "stdafx.h"
#include "conio.h"
#using <mscorlib.dll>
using namespace System;
int _tmain()
{
// TODO: Please replace the sample code below with your own.
Console::WriteLine(S"Dicom Toolkit Demo");
Uint16 DCM_MaxReadLength = 1024;
DcmFileFormat dFile;
OFCondition Status = dFile.loadFile("C:\\596.dcm",EXS_Unknown,EGL_noChange,DCM_MaxReadLength,ERM_autoDetect);
if(Status.good())
printf("\nDicom File Status : %s", Status.text());
else
printf("\nDicom File Status : %s",Status.text());
getch();
return 0;
}