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

Chapter 6 Function Descriptions

FStrFitsPat

Bool32FStrFitsPat(pat, str, pLen, sLen);

Purpose

Determines whether a filename, str, matches a pattern, pat.

Parameters

Name

Type

Description

 

 

 

 

 

 

pat

uChar *

Pattern (string) to which filename is to be

 

 

compared. The following characters have

 

 

special meanings in the pattern.

 

 

\ is literal, not treated as having a special

 

 

meaning. A single backslash at the end of pat

 

 

is the same as two backslashes.

 

 

? matches any one character.

 

 

* matches zero or more characters.

 

 

 

str

uChar *

Filename (string) to compare to pattern.

 

 

 

pLen

int32

Number of characters in pat.

 

 

 

sLen

int32

Number of characters in str.

 

 

 

Return Value

Bool32, which can contain the following values:

TRUE

Filename fits the pattern.

FALSE

Filename does not match the pattern.

Using External Code in LabVIEW

6-116

www.ni.com

Chapter 6 Function Descriptions

FStringToPath

MgErr FStringToPath(text, p);

Purpose

Creates a path from an LStr. The LStr contains the platform-specific syntax for a path.

Parameters

Name

Type

Description

 

 

 

 

 

 

text

LstrHandle

String that contains the path in

 

 

platform-specific syntax.

 

 

 

p

Path *

Address at which FstringToPath stores

 

 

the resulting path. If non-zero, the function

 

 

assumes it is a valid path, resizes the path,

 

 

and fills in its value. If NULL, the function

 

 

creates a new path, fills in its value, and

 

 

stores the path at the address referred to by p.

 

 

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:

mFullErr

Insufficient memory.

© National Instruments Corporation

6-117

Using External Code in LabVIEW

Chapter 6 Function Descriptions

FTextToPath

MgErr FTextToPath(text, tlen, *p);

Purpose

Creates a path from a string (at the address text) that represents a path in the platform-specific syntax for a path.

Parameters

Name

Type

Description

 

 

 

 

 

 

text

UPtr

String that contains the path in

 

 

platform-specific syntax.

 

 

 

tlen

int32

Number of characters in text.

 

 

 

p

Path *

Address at which FTextToPath stores the

 

 

resulting path. If non-zero, the function

 

 

assumes it is a valid path, resizes the path,

 

 

and fills in its value. If NULL, the function

 

 

creates a new path, fills in its value, and

 

 

stores the path at the address referred to by p.

 

 

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:

mFullErr

Insufficient memory.

Using External Code in LabVIEW

6-118

www.ni.com

Chapter 6 Function Descriptions

FUnFlattenPath

int32 FUnFlattenPath(fp, pPtr);

Purpose

Converts a flattened path (created using FFlattenPath) into a path.

Parameters

Name

Type

Description

 

 

 

 

 

 

fp

UPtr

Pointer to the flattened path you want to

 

 

convert to a path.

 

 

 

pPtr

Path *

Address at which FUnFlattenPath stores

 

 

the resulting path. Refer to the Pointers as

 

 

Parameters section in Chapter 3, CINs, for

 

 

more information about using this parameter.

 

 

 

Return Value

Number of bytes the function interpreted as a path.

© National Instruments Corporation

6-119

Using External Code in LabVIEW

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