Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

DDC_saveFile-Problem

$
0
0

hi all,

 

we use the nilibddc.dll to build and handle tdms-files. till now all worked fine, but:

 

if I delete a channelgroup from the file I am not able to store the file anymore. deleting-command itself (DDC_removeChannelGroup()) does not produce an error. the DDC_saveFile-command throws an exception (see below).

 

a little snippet to illustrate the problem. most is C++-stuff using Qt-framework, look for //--> to see the problem.

 

thanks and best regards

 

Simon

 

int CubeExperiment::removeDbFromExperiment(const QString& sName)
{
int ret;

bool bCloseAfterCheck=false;
if(!this->ddcfileHandle)
{
bCloseAfterCheck=true;
ret=this->open();
if(ret) return ret;
}

unsigned int usIntChannelGroupNumber;

//Get group number
ret=DDC_GetNumChannelGroups(this->ddcfileHandle,&usIntChannelGroupNumber);
if(ret) return ret;
if(!usIntChannelGroupNumber) return 0x00;

//Get group handles
DDCChannelGroupHandle* channelGroupHandles=0x00;
channelGroupHandles=new DDCChannelGroupHandle[usIntChannelGroupNumber];
ret=DDC_GetChannelGroups (this->ddcfileHandle, channelGroupHandles, usIntChannelGroupNumber);
if(ret) goto cleanUp;
{
QByteArray helper;
char* pcName=qStringToPchar(sName,helper);

//Work groups
for(uint ix=0; ix < usIntChannelGroupNumber; ix++)
{
char buffer[EXP_MAY_PROPERTY_LEN];
ret=DDC_GetChannelGroupProperty (*(channelGroupHandles+ix), DDC_CHANNELGROUP_NAME, buffer, EXP_MAY_PROPERTY_LEN);
if(ret) goto cleanUp;
if(!strcmp(buffer,pcName))
{
//-->The following is worked without an error...
ret=DDC_RemoveChannelGroup (*(channelGroupHandles+ix));
goto cleanUp;
}
}
}

cleanUp:

if(bCloseAfterCheck)
//-->The following line calls DDC_SaveFile() --> and the error messages beneath appear...
ret=this->saveAndClose(true);


//Exception at 0x74c2c41f, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in uspTdms!USI_130_USP

return ret;


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>