Utilità, stringhe e buffer comuni

Questa pagina contiene voci di riferimento nella famiglia di API comuni. Ogni voce include la dichiarazione e i requisiti.

Funzioni di utilità

EspInitUnicodeString

L'API EspInitUnicodeString inizializza uno ESP_UNICODE_STRING struct da una stringa con terminazione Null.

Syntax

HRESULT
WINAPI
EspInitUnicodeString(
    _In_opt_ PCWSTR String,
    _Out_ ESP_UNICODE_STRING* UnicodeString
    );

Parameters

String

Fornisce una stringa con terminazione Null.

UnicodeString

Riceve la stringa Unicode inizializzata.

Valore restituito

Restituisce un oggetto HRESULT che indica il risultato dell'operazione. Usare SUCCEEDED o FAILED per testare il risultato.

Requirements

Requirement Value
Header espclient.h
DLL espclient.dll

Vedere anche

EspStringMatchesPattern

L'API EspStringMatchesPattern controlla se una stringa corrisponde a un determinato modello.

Syntax

HRESULT
WINAPI
EspStringMatchesPattern(
    _In_ const ESP_UNICODE_STRING* String,
    _In_ const ESP_UNICODE_STRING* Pattern,
    _Out_ BOOL* Matches
    );

Parameters

String

Fornisce la stringa da associare al criterio.

Pattern

Fornisce il modello di stringa.

Matches

Riceve un valore booleano che indica se la stringa corrisponde al criterio.

Valore restituito

Restituisce un oggetto HRESULT che indica il risultato dell'operazione. Usare SUCCEEDED o FAILED per testare il risultato.

Requirements

Requirement Value
Header espclient.h
DLL espclient.dll

Vedere anche

EspFreeMemory

L'API EspFreeMemory viene usata per liberare memoria allocata da varie API WESP. Ad esempio, viene usato per liberare la memoria allocata dall'API EspEnumerateConnectedClients.

Syntax

void
WINAPI
EspFreeMemory(
    _In_ _Post_invalid_ void* Buffer
    );

Parameters

Buffer

Fornisce un puntatore al buffer da liberare.

Valore restituito

None.

Requirements

Requirement Value
Header espclient.h
DLL espclient.dll

Vedere anche

Macro stringa

ESP_CONSTANT_UNICODE_STRING

La macro ESP_CONSTANT_UNICODE_STRING dichiara un oggetto ESP_UNICODE_STRING da una stringa costante. Ad esempio, può essere usato per dichiarare un oggetto ESP_UNICODE_STRING come indicato di seguito:

Syntax

#ifdef __cplusplus
#define ESP_CONSTANT_UNICODE_STRING(s) \
    (ESP_UNICODE_STRING{ (UINT16)(sizeof(s) - sizeof((s)[0])), s })
#else
#define ESP_CONSTANT_UNICODE_STRING(s) \
    ((ESP_UNICODE_STRING){ (UINT16)(sizeof(s) - sizeof((s)[0])), s })
#endif

Requirements

Requirement Value
Header esptypes.h

Vedere anche

Stringhe, percorsi e buffer

ESP_PATH_FORMAT

L'enumerazione ESP_PATH_FORMAT definisce un formato di percorso.

Syntax

typedef enum ESP_PATH_FORMAT
{
    ESP_PATH_FORMAT_NONE = 0,
    ESP_PATH_FORMAT_DOS,
    ESP_PATH_FORMAT_NT
} ESP_PATH_FORMAT;

Values

VALORE DESCRIZIONE
ESP_PATH_FORMAT_DOS Il formato del percorso è DOS ,ad esempio "C:\Windows\notepad.exe").
ESP_PATH_FORMAT_NT Il formato del percorso è NT ,ad esempio \Device\HarddiskVolume1\Windows\notepad.exe.

Requirements

Requirement Value
Header esptypes.h

Vedere anche

ESP_UNICODE_STRING

La struttura ESP_UNICODE_STRING rappresenta una stringa Unicode con conteggiata.

Syntax

typedef struct ESP_UNICODE_STRING
{
    UINT16 Length;
    _Field_size_bytes_(Length) PCWCH Buffer;
} ESP_UNICODE_STRING;

Members

FIELD DESCRIZIONE
Length Specifica la lunghezza in byte della stringa.
Buffer Specifica il buffer di stringa.

Requirements

Requirement Value
Header esptypes.h

Vedere anche

ESP_PATH

La struttura ESP_PATH rappresenta un percorso.

Syntax

typedef struct ESP_PATH
{
    ESP_PATH_FORMAT Format;
    ESP_UNICODE_STRING Path;
} ESP_PATH;

Members

FIELD DESCRIZIONE
Format Specifica il formato del percorso. I valori supportati sono NT o DOS.
Percorso Specifica una stringa Unicode che contiene il percorso.

Requirements

Requirement Value
Header esptypes.h

Vedere anche

ESP_BUFFER

La struttura ESP_BUFFER rappresenta un buffer.

Syntax

typedef struct ESP_BUFFER
{
    UINT32 DataSize;
    _Field_size_bytes_(DataSize) const void* Data;
} ESP_BUFFER;

Members

FIELD DESCRIZIONE
DataSize Specifica le dimensioni in byte del buffer.
Dati Specifica i dati del buffer.

Requirements

Requirement Value
Header esptypes.h

Vedere anche

ESP_STRING_LIST

La struttura ESP_STRING_LIST rappresenta un elenco di stringhe.

Syntax

typedef struct ESP_STRING_LIST
{
    UINT32 StringsCount;
    _Field_size_(StringsCount) const ESP_UNICODE_STRING* Strings;
} ESP_STRING_LIST;

Members

FIELD DESCRIZIONE
StringsCount Specifica il numero di elementi nella matrice di stringhe.
Stringhe Specifica una matrice di stringhe.

Requirements

Requirement Value
Header esptypes.h

Vedere anche