Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Using External Code in LabVIEW.pdf
Скачиваний:
48
Добавлен:
29.05.2015
Размер:
1.85 Mб
Скачать

Chapter 6 Function Descriptions

AZDisposePtr/DSDisposePtr

MgErr AZDisposePtr(p);

MgErr DSDisposePtr(p);

Purpose

Releases the memory referenced by the specified pointer.

Parameters

Name

Type

Description

 

 

 

 

 

 

p

UPtr

Pointer you want to dispose of.

 

 

 

Return Value

mgErr, which can contain the following errors:

NoErr

No error.

mZoneErr

Handle or pointer not in specified zone.

Using External Code in LabVIEW

6-14

www.ni.com

Chapter 6 Function Descriptions

AZGetHandleSize/DSGetHandleSize

int32 AZGetHandleSize(h); int32 DSGetHandleSize(h);

Purpose

Returns the size of the block of memory referenced by the specified handle.

Parameters

Name

Type

Description

 

 

 

 

 

 

h

UHandle

Handle whose size you want to determine.

 

 

 

Return Value

The size in bytes of the relocatable block referenced by the handle h. If an error occurs, this function returns a negative number.

© National Instruments Corporation

6-15

Using External Code in LabVIEW

Chapter 6 Function Descriptions

AZHandAndHand/DSHandAndHand

MgErr AZHandAndHand(h1, h2);

MgErr DSHandAndHand(h1, h2);

Purpose

Appends the data referenced by h1 to the end of the memory block referenced by h2.

The function resizes handle h2 to hold h1 and h2 data. If h1 is an AZ handle, lock it, because this routine can move memory.

Parameters

Name

Type

Description

 

 

 

 

 

 

h1

UHandle

Source of data you want to append to h2.

 

 

 

h2

UHandle

Initial handle, to which the data of h1 is

 

 

appended.

 

 

 

Return Value

mgErr, which can contain the following errors:

NoErr

No error.

MFullErr

Not enough memory to perform the operation.

mZoneErr

Handle or pointer not in specified zone.

Using External Code in LabVIEW

6-16

www.ni.com

Chapter 6 Function Descriptions

AZHandToHand/DSHandToHand

MgErr AZHandToHand(hp);

MgErr DSHandToHand(hp);

Purpose

Copies the data referenced by the handle to which hp points into a new handle, and returns a pointer to the new handle in hp.

Use this routine to copy an existing handle into a new handle. The old handle remains allocated. This routine writes over the pointer that is passed in, so you should maintain a copy of the original handle.

Parameters

Name

Type

Description

 

 

 

 

 

 

hp

UHandle

Pointer to handle you want to duplicate. A

 

 

pointer to the resulting handle is returned in

 

 

this parameter. Refer to the Pointers as

 

 

Parameters section in Chapter 3, CINs, for

 

 

more information about using this parameter.

 

 

 

Return Value

mgErr, which can contain the following errors:

NoErr

No error.

MFullErr

Not enough memory to perform the operation.

mZoneErr

Handle or pointer not in specified zone.

© National Instruments Corporation

6-17

Using External Code in LabVIEW

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]