[This sample code uses features that were implemented in MSXML 5.0 for Microsoft Office Applications. XML digital signatures are not supported in MXSML 6.0 and later.]
Retrieves the handle to the cryptographic service provider associated with this key object. The resultant CSP handle can be used in the appropriate CryptoAPI functions to perform other Cryptographic operations.
HRESULT getCSPHandle (ULONG_Ptr *hCSProv);
C/C++ Syntax Using Smart Pointers
ULONG_Ptr hCSProv = objIXMLDSigKeyEx.getCSPHandle();
Handle to the cryptographic service provider associated with this key object.
The handle was retrieved successfully.
Failed to retrieve the handle and the resultant
hCSProv parameter is NULL.
When the key object is created using the
IXMLDigitalSignature::createKeyFromCSP method, you can call this method to get the handle to the underlying cryptographic service provider. You can examine and use other cryptographic information associated with this key by calling the appropriate CryptoAPI functions.
For keys created by
IXMLDigitalSignatureEx::createKeyfromHMACSecretBinary, no CSP handles will be created and the resultant
hCSProv parameter will be NULL.
MSXML 5.0 for Microsoft Office Applications and later