DCMTK + .Net 2003 Need advise

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
kathirvel_kg
Posts: 7
Joined: Fri, 2006-08-04, 09:53

DCMTK + .Net 2003 Need advise

#1 Post by kathirvel_kg »

Hi,
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;
}

kattabomane
Posts: 43
Joined: Tue, 2005-02-01, 22:53

post errors

#2 Post by kattabomane »

Hello,
Could you please post some errors generated by your compiler ?
Thanks

kathirvel_kg
Posts: 7
Joined: Fri, 2006-08-04, 09:53

DCMTK + .Net 2003 Need advise

#3 Post by kathirvel_kg »

Hi,
It throws Runtime Exception showing
error in 'dbgdlg.h' _ASSERT()

when the following statement in the code is executed.

DcmFileFormat dFile;

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 1 guest