10-28-2008 09:51 AM
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!
Solved! Go to Solution.
10-29-2008 10:56 AM
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
10-29-2008 03:54 PM
Hi Mr. Jingles,
This is a smart and simple solution - thanks a lot!
10-30-2008 02:04 PM
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.
10-31-2008 03:20 PM
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
11-01-2008 02:34 AM
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")
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
11-02-2008 08:23 PM
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.
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
11-03-2008 02:28 AM
@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.(...)
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 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".
11-03-2008 09:39 AM
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
11-03-2008 11:06 AM