LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a list of deprecated library functions?

Solved!
Go to solution

Recently I've upgraded from CVI 7.0 to 8.5.1. Browsing the library functions to for new routines I realized that some functions are now deprecated. It is not so complicated to adapt code in order to avoid those functions, because usually better functions have been made available. So I am wondering if there is a list of all the deprecated library functions that would make it easy to search all the code for these functions...

 

Thanks!

0 Kudos
Message 1 of 10
(5,279 Views)
Solution
Accepted by topic author Wolfgang

Hello Wolfgang,

 

first of all I did not have a list of all the deprecated library functions. But I tried to find a workaround for you. One option would be to have a look at the online Help and searching for "obsolete" The results will include the deprecated libraries. The second is that I found out some further informations:

 

This list does not include functions from hardware libraries, such as DAQmx or GPIB.

AllocImageBits
CurrThreadId
CxPolyRoots
DisableBreakOnLibraryErrors
DisableExtendedMouseEvents
DisableInterrupts
DisableTaskSwitching
EnableBreakOnLibraryErrors
EnableExtendedMouseEvents
EnableInterrupts
EnableTaskSwitching
GenWinHelpFileFromFPFile
GetAxisRange
GetExternaleModuleAddr
GetExternaleModuleAddrEx
GetImageBits
GetImageInfo
GetInterruptState
InStandaloneExecutable
LoadExternalModule
LoadExternalModuleEx
MainThreadId
ReFFT
ReleaseExternalModule
RTControllerQuery
RTControllerReboot
RunExternalModule
SetAxisRange
SetDllDebuggingOption
SetImageBits
SetProjectDebugTargetPath
SetProjectTargetPath
TDMS_GetDataValues
UnloadExternalModule

 

Jan Kniewasser | Applications Engineer | Tel.: +49 89 7413130 | Fax: +49 89 7146035

»
Message 2 of 10
(5,251 Views)

Hi Mr. Jingles,

 

This is a smart and simple solution - thanks a lot!

0 Kudos
Message 3 of 10
(5,234 Views)

After searching the online help, as suggested, I have to add two remarks:
- searching for 'deprecated' gives no result...

- searching for 'obsolete' may give puzzling results, for example, in the 'overview' page the function LinFit is marked as obsolete, but not on the function page itself. The same is true for a few other functions.

 

In general I would love to see some description what functions, function attributes etc. have changed in every version, making it a lot easier to browse code for required or useful changes.

0 Kudos
Message 4 of 10
(5,196 Views)

Hello Wolfgang,

 

CVI does not use the "deprecated" terminology. The word "obsolete" is used instead.

 

You're right about the inconsistent notation in the analysis library. We'll look into that and make sure that we update the function help accordingly. For now, you can assume that all functions marked "obsolete" in the function tree topic really are obsolete.

 

The reason the CVI release notes do not include a list of obsoleted functions, attributes, events, etc, is because backwards compatibility requires CVI to ensure that the behavior of those obsoleted functions is not altered. Usually, the reason why a function is deemed obsolete is because there is a new function that takes its place and provides a superset of its functionality. But there's absolutely nothing wrong with continuing to use the obsoleted function indefinitely.

 

Luis

NI

0 Kudos
Message 5 of 10
(5,172 Views)

Well, Luis, what you say is true almost all the times but not always. I can remember when (I suppose passing from CVI5 to 6 or from 6 to 7, I don't remember exactly) InStandaloneExecutable () function was obsoleted and BeingDebuggedByCVI () was introduced: in this case the old function lost all functionality, always returning 1 ("running the executable"), with the additional problems that the new function reversed return value significance (1 meaning "running in the IDE") Smiley Surprised

 

It's true that only a few of such changes have been introduced during years, but I second the opinion that a little list of obsoleted functions would improve the quality of new releases documentation.

 

Just my 2c Smiley Happy



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 6 of 10
(5,158 Views)

Hi, Roberto.

 

Let me start by saying that what you're saying, in general, is true. There are (rare) instances in which a function does cease to work. A good example is the CVI automation function GenWinHelpFileFromFPFile. However, I'd quibble with your example. I wouldn't say that IsStandaloneExecutable lost all functionality. It's just that with CVI 5.5 and later, every program started running as a standalone executable, so the function always returns 1. But I realize that this is somewhat a matter of interpretation so I'm sort of splitting hairs. Smiley Happy

 

You raise a good point. When something really is deprecated we do add something in the readme to that effect, but that doesn't always stand out very much. And when people skip versions they might not see all the transitions in each readme. We'll look into creating such a list.

 

Thanks,

Luis

0 Kudos
Message 7 of 10
(5,141 Views)

@LuisG wrote:
(...) It's just that with CVI 5.5 and later, every program started running as a standalone executable, so the function always returns 1. But I realize that this is somewhat a matter of interpretation so I'm sort of splitting hairs. Smiley Happy (...)

Hi Luis,

I'm a little puzzled about the quoted sentence: every version of CVI I had been using permitted me to run the program in the IDE while debugging and compile them later to deploy to the customer, obtaining an executable with exactly the same functionality and little differences with its debug version. This is a powerful feature of CVI, that permits me to reduce the debug of compiled execution to very little tests.

This being the situation, I formerly used InStandaloneExecutable () and later BeingDebuggedByCVI () functions to discriminate wether the application was running in the IDE or not, mainly to make some controls / indicators visible to permit me to examine the values of some internal parameter without need to break the application and look into the variables.

 

This is my goal while using these functions and in this respect changing the function used and reversing the meaning of the return value forced me to a complete revision of the source code in order to port old applications to the new CVI versions. Not a complicated task, I know, just a little puzzling.

 

Maybe I'm splitting hairs too Smiley Happy and probably we are now running out of this topic: I just wanted to know what do you mean when you say"every program started running as a standalone executable".



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 8 of 10
(5,133 Views)

I believe Luis was pointing out that since version 5.5, the CVI debugger runs applications "out of process". Pre-5.5, debugged applications would be run within the debugger process, whereas now they are launched as separate processes, and the debugger just connects to them. Since the behavior of IsStandaloneExecutable() function is (and always has been) to return 1 if the calling application is running in its own process, it truly did become an obsolete function after CVI 5.5. It still functions properly, but being a "standalone executable" is no longer a quality that can be used to distinguish a process being debugged from one that is not. That is why BeingDebuggedByCVI() was added.

 

Mert A.

National Instruments

0 Kudos
Message 9 of 10
(5,117 Views)
I understand, now. Thanks Mert for the explanation. Smiley Happy


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 10 of 10
(5,110 Views)