IDiaSymbol::get_numericProperties
Recupera il set di proprietà numeriche per questo simbolo.
Sintassi
HRESULT get_numericProperties(
DWORD cnt,
DWORD *pcnt,
DWORD *pProperties
);
Parametri
cnt
[in] Numero di DWORD a cui punta il buffer pProperties
.
pcnt
[out] Restituisce il numero di proprietà valide impostate in pProperties
.
pProperties
[out] Restituisce il set di proprietà per questo simbolo.
Valore restituito
Se ha esito positivo, restituisce S_OK
; in caso contrario, restituisce S_FALSE
o un codice di errore.
Nota
Un valore S_FALSE
restituito indica che la proprietà non è disponibile per il simbolo.
Esempio
CComPtr<pSymbol> pSymbol;
BOOL f = FALSE;
HRESULT hr = E_FAIL;
...
hr = pSymbol->get_isHLSLData(&f);
if (FAILED(hr)) {
return hr;
}
if (f) {
DWORD value = 0;
hr = pSymbol->get_numberOfRegisterIndices(&value);
if (hr == S_OK && value > 0) {
DWORD *pOff = new (std::nothrow) DWORD[value];
if (pOff == NULL) {
return E_OUTOFMEMORY;
}
DWORD propertiesRead;
if (IfOkOrReportAuto(pSymbol->get_numericProperties(value, &propertiesRead, pOff))) {
value = __min(value, propertiesRead);
for (DWORD i = 0; i < value; i++) {
printf("%u\n", pOff[i]);
}
}
delete[] pOff;
}
}