Interface IXpsOMFontResource (xpsobjectmodel.h)
Fournit une interface IStream à une ressource de police.
Héritage
L’interface IXpsOMFontResource hérite d’IXpsOMResource. IXpsOMFontResource a également les types de membres suivants :
Méthodes
L’interface IXpsOMFontResource a ces méthodes.
IXpsOMFontResource ::GetEmbeddingOption Obtient l’option d’incorporation qui sera appliquée lorsque la ressource sera sérialisée. |
IXpsOMFontResource ::GetStream Obtient une nouvelle copie en lecture seule du flux associé à cette ressource. (IXpsOMFontResource.GetStream) |
IXpsOMFontResource ::SetContent Définit le flux en lecture seule à associer à cette ressource. (IXpsOMFontResource.SetContent) |
Remarques
L’exemple de code qui suit montre comment créer une instance de cette interface.
IXpsOMFontResource *newInterface;
IOpcPartUri *partUri;
// Note the implicit requirement that CoInitializeEx
// has previously been called from this thread.
hr = CoCreateInstance(
__uuidof(XpsOMObjectFactory),
NULL,
CLSCTX_INPROC_SERVER,
_uuidof(IXpsOMObjectFactory),
reinterpret_cast<LPVOID*>(&xpsFactory)
);
if (SUCCEEDED(hr))
{
// The partUriString and acquiredStream variables
// are defined outside of this example.
hr = xpsFactory->CreatePartUri(partUriString, &partUri);
if (SUCCEEDED(hr))
{
hr = xpsFactory->CreateFontResource (
acquiredStream,
XPS_FONT_EMBEDDING_NORMAL, // normal
partUri,
FALSE, // not obfuscated
&newInterface);
if (SUCCEEDED(hr))
{
// use newInterface
newInterface->Release();
}
partUri->Release();
}
xpsFactory->Release();
}
else
{
// evaluate HRESULT error returned in hr
}
Configuration requise
Condition requise | Valeur |
---|---|
Client minimal pris en charge | Windows 7, Windows Vista avec SP2 et Mise à jour de plateforme pour Windows Vista [applications de bureau | Applications UWP] |
Serveur minimal pris en charge | Windows Server 2008 R2, Windows Server 2008 avec SP2 et Platform Update pour Windows Server 2008 [applications de bureau | Applications UWP] |
Plateforme cible | Windows |
En-tête | xpsobjectmodel.h |
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