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

Chapter 6 Function Descriptions

PStrCpy

PStr PStrCpy(dst, src);

Purpose

Copies the Pascal string src to the Pascal string dst. This function assumes dst is large enough to contain src.

Parameters

Name

Type

Description

 

 

 

 

 

 

dst

PStr

Pointer to a Pascal string.

 

 

 

src

PStr

Pointer to a Pascal string.

 

 

 

Return Value

A copy of the destination Pascal string pointer.

Using External Code in LabVIEW

6-154

www.ni.com

Chapter 6 Function Descriptions

PStrLen

Macro

uInt8 PStrLen(s);

Purpose

Returns the length of a Pascal string, that is, the value at the first byte at the specified address.

Parameters

Name

Type

Description

 

 

 

 

 

 

s

PStr

Pointer to a Pascal string.

 

 

 

© National Instruments Corporation

6-155

Using External Code in LabVIEW

Chapter 6 Function Descriptions

PStrNCpy

PStr PStrNCpy(dst, src, n);

Purpose

Copies the Pascal string src to the Pascal string dst. If the source string is greater than n, this function copies only n bytes. The function assumes dst is large enough to contain src.

Parameters

Name

Type

Description

 

 

 

 

 

 

dst

PStr

Pointer to a Pascal string.

 

 

 

src

PStr

Pointer to a Pascal string.

 

 

 

n

int32

Maximum number of bytes you want to copy,

 

 

including the length byte.

 

 

 

Return Value

A copy of the destination Pascal string pointer.

Using External Code in LabVIEW

6-156

www.ni.com

Chapter 6 Function Descriptions

PToCStr

int32 PToCStr(pstr, cstr);

Purpose

Converts a Pascal string to a C string. This function works even if the pointers pstr and cstr refer to the same memory location. The function assumes cstr is large enough to contain pstr.

Parameters

Name

Type

Description

 

 

 

 

 

 

pstr

PStr

Pointer to a Pascal string.

 

 

 

cstr

CStr

Pointer to a C string.

 

 

 

Return Value

The length of the string.

© National Instruments Corporation

6-157

Using External Code in LabVIEW

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