Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Ini_FileWrite

I am having a problem using the Ini_WriteToFile() function in the toolbox.

I am compiling with Visual C++6.0 under measurement studio 6.0.

I make the call: Ini_WriteToFile(iniText, pathName);

Stepping down into this function to find out why the file is never created/updated I find that:

Ini_writeToFile() calls GetFileWriteability() which calls GetFileInfo(). Now I can't find out how/where to step
into GetFileInfo(), but the switch statement following this call is always taking the case UIETooManyFilesOpen.
I am not sure what this means or why it is occurring because I only have this one file open that I am trying to create.

What causes 'UIETooManyFilesOpen' and how can I correct it? I get this error for both cases: ini file trying to create

already exists and case ini file does not exist.
0 Kudos
Message 1 of 4
(3,802 Views)
I am not familiar with the Ini_WriteToFile function. If it is a CVI function, you might try posting this question to the CVI forum. Otherwise, the Windows Platform SDK provides functions GetPrivateProfile... and WritePrivateProfile... for dealing with INI files. Documentation on this set of functions is available in MSDN.

Tony
NI - MeasurementStudio
0 Kudos
Message 2 of 4
(3,802 Views)
Tony,

I am familiar with the GetPrivateProfile() type calls. The problem I posted above is a confirmed bug by National Instruments. They have verified that when compiling with Visual C++ this inifile library does not function. I downloaded a cool C++ class from the web that Gary McNickle wrote and used it successfully to get around the CVI issue. His CDataFile class also handles registry type stuff I think. Anyway, hoping that NI fixes the problem quickly because the workaround has/is causing me a few extra headaches unrelated to actual code/working--but rather SQA type stuff..... Thanks for the post.
0 Kudos
Message 3 of 4
(3,803 Views)

I am updating this entry in case someone else comes across this problem. The issue here is that the VC 6.0 CVI Project wizards were linking incorrectly against cvi_lvrt.lib. Change the project settings to link against cvirt.lib instead. This should fix the issue.

This is no longer a problem with the VS 2003 CVI Project wizards.

Bilal Durrani
NI
0 Kudos
Message 4 of 4
(3,699 Views)