usesgetlasterror (attributo)
L'attributo [usesgetlasterror] segnala al chiamante che può chiamare GetLastError per recuperare il codice di errore.
[
module-attributes
]
module module-name
{
[entry(entry-id), usesgetlasterror [, other-attributes]] return-type function-name(param-list);
};
Parametri
-
attributi del modulo
-
Zero o più attributi MIDL che verranno applicati al modulo.
-
nome modulo
-
Nome identificatore del modulo.
-
entry-id
-
Specifica il nome del punto di ingresso del modulo o il numero di identificazione integer.
-
altri attributi
-
Zero o più attributi MIDL che verranno applicati alla procedura remota.
-
tipo restituito
-
Tipo di dati restituiti dalla procedura remota al completamento.
-
nome funzione
-
Nome della routine remota come definito nel file IDL.
-
param-list
-
Zero o più parametri per la procedura remota.
Commenti
L'attributo [usesgetlasterror] può essere impostato su un punto di ingresso del modulo, se tale punto di ingresso usa la funzione Windows SetLastError per restituire i codici di errore. L'attributo indica al chiamante che, se si verifica un errore durante la chiamata a tale funzione, il chiamante può quindi chiamare GetLastError per recuperare il codice di errore.
Esempi
[
dllname("MyOwn.dll")
]
module MyModule
{
[entry("One"), usesgetlasterror, bindable, requestedit,
propputref, defaultbind] HRESULT Func1(
[in]IUnknown * iParam1,
[out] long * Param2) ;
[entry("TwentyOne"), usesgetlasterror,
hidden, vararg] SAFEARRAY (int) Func2(
[in, out] SAFEARRAY (variant) *varP) ;
// Other module definition statements.
};
Vedere anche