New utility library functions, Changes and clarifications to existing utility lib – National Instruments Window User Manual

Page 33

Advertising
background image

©

National Instruments Corporation

33

LabWindows/CVI Release Notes for Windows

declaration of the function pointer. For example, if you declare the function in the external
module as

int __stdcall SetADouble (double d);

and the default calling convention is

__cdecl

, declare the function pointer as

int (__stdcall * SetADouble_FnPtr)(double d) = NULL;

Use the Compiler Options command in the Options menu of the Project window to
determine the default calling convention.

If you launch a 16-bit executable on Windows NT,

ExecutableHasTerminated

cannot determine whether the executable process has terminated. The value

ExectuableHasTerminated

returns is always

1

. In addition,

TerminateExecutable

cannot attempt to terminate the launched executable process.

New Utility Library Functions

LabWindows/CVI 5.0 adds three new functions to the Utility Library.

MapPhysicalMemory

maps a physical address to a pointer that can be used in your program

like any other C pointer. For example, you can read or write an area of physical memory by
incrementing the pointer after each access.

UnMapPhysicalMemory

unmaps an address that was mapped using

MapPhysicalMemory

.

CVIRTEHasBeenDetached

indicates whether Windows 95/NT has detached the

LabWindows/CVI Run-time Engine from your standalone executable process.

Changes and Clarifications to Existing Utility Library Functions

For

Delay

and

SyncWait

on Windows 95/NT and UNIX, the respective delay and interval

parameters might now suspend the execution of the current thread while waiting for the
specified interval to expire. In previous versions of LabWindows/CVI, the functions wait
without releasing control to other threads, unnecessarily using CPU cycles. This change
should not require any modifications to your source code.

For Windows 95/NT,

CheckForDuplicateAppInstance

determines if another copy of the

same executable is running. This function knows if another copy of the executable is running
only if:

The other copy has already called this function.

The other copy of the executable was the only one running when that copy of the
executable called this function.

The other copy of the executable has the same path as the current executable.

In previous versions of LabWindows/CVI, the

Timer

function returns an invalid result if your

program runs for more than 49.71 days. At some point between 49.71 days and 99.42 days
after your first call to

Timer

, the function returns a value 4,294,967.297 seconds less than it

Advertising