InitPropVariantFromBuffer, fonction (propvarutil.h)
Initialise une structure PROPVARIANT à l’aide du contenu d’une mémoire tampon.
Syntaxe
PSSTDAPI InitPropVariantFromBuffer(
[in] const void *pv,
[in] UINT cb,
[out] PROPVARIANT *ppropvar
);
Paramètres
[in] pv
Type : const void*
Pointeur vers la mémoire tampon.
[in] cb
Type : UINT
Longueur de la mémoire tampon, en octets.
[out] ppropvar
Type : PROPVARIANT*
Lorsque cette fonction est retournée, contient la structure PROPVARIANT initialisée.
Valeur retournée
Type : HRESULT
Si cette fonction réussit, elle retourne S_OK. Sinon, elle retourne un code d’erreur HRESULT.
Remarques
Crée un VT_VECTOR | VT_UI1 propvariant.
Exemples
L’exemple suivant, à inclure dans le cadre d’un programme plus large, montre comment utiliser InitPropVariantFromBuffer.
// void *pv;
// UINT cb;
// Assume variable pv and cb are initialized and valid. pv points to a buffer
// and cb contains the size of the buffer in bytes.
PROPVARIANT propvar;
HRESULT hr = InitPropVariantFromBuffer(pv, cb, &propvar);
if (SUCCEEDED(hr))
{
// propvar now is valid and has type VT_VECTOR | VT_UI1.
PropVariantClear(&propvar);
}
Configuration requise
Condition requise | Valeur |
---|---|
Client minimal pris en charge | Windows XP avec SP2, Windows Vista [applications de bureau uniquement] |
Serveur minimal pris en charge | Windows Server 2003 avec SP1 [applications de bureau uniquement] |
Plateforme cible | Windows |
En-tête | propvarutil.h |
Bibliothèque | Propsys.lib |
DLL | Propsys.dll (version 6.0 ou ultérieure) |
Composant redistribuable | Windows Desktop Search (WDS) 3.0 |
Voir aussi
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour