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

Chapter 6 Function Descriptions

FPathToAZString

MgErr FPathToAZString(p, txt);

Purpose

Converts a path to an LStr and stores the string as an application zone handle. The LStr contains the platform-specific syntax for the path.

Parameters

Name

Type

Description

 

 

 

 

 

 

p

Path

Path you want to convert to a string.

 

 

 

txt

LstrHandle *

Address at which FPathToAZString stores

 

 

the resulting string. If nonzero, the function

 

 

assumes it is a valid handle, resizes the

 

 

handle, fills in its value, and stores the handle

 

 

at the address referred to by txt. 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:

mgArgErr

A bad argument was passed to the function. Verify the path.

mFullErr

Insufficient memory.

fIOErr

Unspecified I/O error.

Using External Code in LabVIEW

6-104

www.ni.com

Chapter 6 Function Descriptions

FPathToDSString

MgErr FPathToDSString(p, txt);

Purpose

Converts a path to an LStr and stores the string as a data space zone handle. The LStr contains the platform-specific syntax for the path.

Parameters

Name

Type

Description

 

 

 

 

 

 

p

Path

Path you want to convert to a string.

 

 

 

txt

LstrHandle *

Address at which FPathToDSString stores

 

 

the resulting string. If nonzero, the function

 

 

assumes it is a valid handle, resizes the

 

 

handle, fills in its value, and stores the handle

 

 

at the address referred to by txt. 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:

mgArgErr

A bad argument was passed to the function. Verify the path.

mFullErr

Insufficient memory.

fIOErr

Unspecified I/O error.

© National Instruments Corporation

6-105

Using External Code in LabVIEW

Chapter 6 Function Descriptions

FPathToPath

MgErr FPathToPath(p);

Purpose

Duplicates a path and returns the new path in the same variable.

Parameters

Name

Type

Description

 

 

 

 

 

 

p

Path *

Address of the path you want to duplicate.

 

 

Variable to which FPathToPath returns the

 

 

resulting path. 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:

mgArgErr

A bad argument was passed to the function. Verify the path.

Using External Code in LabVIEW

6-106

www.ni.com

Chapter 6 Function Descriptions

FRefNumToFD

MgErr FRefNumToFD(refNum, fdp);

Purpose

Gets the file descriptor associated with the specified file refnum.

If no error occurs, the resulting file descriptor is stored in the address referred to by fdp. If an error occurs, NULL is stored in the address referred to by fdp and the error is returned.

Parameters

Name

Type

Description

 

 

 

 

 

 

refNum

LVRefNum

The file refnum whose associated file

 

 

descriptor you want to get.

 

 

 

fdp

File *

Address at which FRefNumToFD stores the

 

 

file descriptor associated with the specified

 

 

file refnum. 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:

mgArgErr

File refnum is not valid.

© National Instruments Corporation

6-107

Using External Code in LabVIEW

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