// xenroll.idl : IDL source for xenroll.dll // // This file will be processed by the MIDL tool to // produce the type library (xenroll.tlb) and marshalling code. import "oaidl.idl"; import "ocidl.idl"; import "wincrypt.idl"; //+-------------------------------------------------------------------------- // interface ICEnroll [ object, uuid(43F8F288-7A20-11D0-8F06-00C04FC295E1), dual, helpstring("ICEnroll Interface"), pointer_default(unique) ] interface ICEnroll : IDispatch { // // Walk the end user through the process of generating a key // pair, which either will or will not be required to use some form // of hardware private key management, per the fRequireHardware // parameter. Return to the caller a PKCS#10 of the resulting // generated key, where in the subject name // HRESULT createFilePKCS10( [in] BSTR DNName, [in] BSTR Usage, [in] BSTR wszPKCS10FileName ); // // Accept delivery of the credentials that correspond to a previous // call to GenerateKeyPair. This method puts the credentials // whereever they are supposed to go for easy subsequent access // by the user. // HRESULT acceptFilePKCS7( [in] BSTR wszPKCS7FileName ); HRESULT createPKCS10( // This is the DN name for the certificate in X500 name syntax. // For example CN=KeithV [in] BSTR DNName, // This is the usage string, it will end up in the certificate // enumerating what the certificate is used for. For example // ClientAuth, Or CodeSigning. It can be any string. [in] BSTR Usage, // The return value is a Base64 encoded // PKCS10 Cert Request [out, retval] BSTR* pPKCS10 ); // // Accept delivery of the credentials that correspond to a previous // call to GenerateKeyPair. This method puts the credentials // whereever they are supposed to go for easy subsequent access // by the user. // HRESULT acceptPKCS7( // // The credentials that are to be stored. Credentials // are a PKCS#7 SignedData that is used simply as a bucket // to convey a bunch of certificates. There must be precisely // one certificate with no child in the bucket. // [in] BSTR PKCS7 ); HRESULT getCertFromPKCS7( [in] BSTR wszPKCS7, [out, retval] BSTR* pbstrCert ); HRESULT enumProviders( [in] LONG dwIndex, [in] LONG dwFlags, [out, retval] BSTR* pbstrProvName ); HRESULT enumContainers( [in] LONG dwIndex, [out, retval] BSTR* pbstr ); // // Session Id's must be appropriately clean up // HRESULT freeRequestInfo( // // The session Id that represents the data // [in] BSTR PKCS7OrPKCS10 ); [propget] HRESULT MyStoreName( [out, retval] BSTR * pbstrName ); [propput] HRESULT MyStoreName( [in] BSTR bstrName ); [propget] HRESULT MyStoreType( [out, retval] BSTR * pbstrType ); [propput] HRESULT MyStoreType( [in] BSTR bstrType ); [propget] HRESULT MyStoreFlags( [out, retval] LONG * pdwFlags ); [propput] HRESULT MyStoreFlags( [in] LONG dwFlags ); [propget] HRESULT CAStoreName( [out, retval] BSTR * pbstrName ); [propput] HRESULT CAStoreName( [in] BSTR bstrName ); [propget] HRESULT CAStoreType( [out, retval] BSTR * pbstrType ); [propput] HRESULT CAStoreType( [in] BSTR bstrType ); [propget] HRESULT CAStoreFlags( [out, retval] LONG * pdwFlags ); [propput] HRESULT CAStoreFlags( [in] LONG dwFlags ); [propget] HRESULT RootStoreName( [out, retval] BSTR * pbstrName ); [propput] HRESULT RootStoreName( [in] BSTR bstrName ); [propget] HRESULT RootStoreType( [out, retval] BSTR * pbstrType ); [propput] HRESULT RootStoreType( [in] BSTR bstrType ); [propget] HRESULT RootStoreFlags( [out, retval] LONG * pdwFlags ); [propput] HRESULT RootStoreFlags( [in] LONG dwFlags ); [propget] HRESULT RequestStoreName( [out, retval] BSTR * pbstrName ); [propput] HRESULT RequestStoreName( [in] BSTR bstrName ); [propget] HRESULT RequestStoreType( [out, retval] BSTR * pbstrType ); [propput] HRESULT RequestStoreType( [in] BSTR bstrType ); [propget] HRESULT RequestStoreFlags( [out, retval] LONG * pdwFlags ); [propput] HRESULT RequestStoreFlags( [in] LONG dwFlags ); [propget] HRESULT ContainerName( [out, retval] BSTR * pbstrContainer ); [propput] HRESULT ContainerName( [in] BSTR bstrContainer ); [propget] HRESULT ProviderName( [out, retval] BSTR * pbstrProvider ); [propput] HRESULT ProviderName( [in] BSTR bstrProvider ); [propget] HRESULT ProviderType( [out, retval] LONG * pdwType ); [propput] HRESULT ProviderType( [in] LONG dwType ); [propget] HRESULT KeySpec( [out, retval] LONG * pdw ); [propput] HRESULT KeySpec( [in] LONG dw ); [propget] HRESULT ProviderFlags( [out, retval] LONG * pdwFlags ); [propput] HRESULT ProviderFlags( [in] LONG dwFlags ); [propget] HRESULT UseExistingKeySet( [out, retval] BOOL * fUseExistingKeys ); [propput] HRESULT UseExistingKeySet( [in] BOOL fUseExistingKeys ); [propget] HRESULT GenKeyFlags( [out, retval] LONG * pdwFlags ); [propput] HRESULT GenKeyFlags( [in] LONG dwFlags ); [propget] HRESULT DeleteRequestCert( [out, retval] BOOL * fDelete ); [propput] HRESULT DeleteRequestCert( [in] BOOL fDelete ); [propget] HRESULT WriteCertToCSP( [out, retval] BOOL * fBool ); [propput] HRESULT WriteCertToCSP( [in] BOOL fBool ); [propget] HRESULT SPCFileName( [out, retval] BSTR * pbstr ); [propput] HRESULT SPCFileName( [in] BSTR bstr ); [propget] HRESULT PVKFileName( [out, retval] BSTR * pbstr ); [propput] HRESULT PVKFileName( [in] BSTR bstr ); [propget] HRESULT HashAlgorithm( [out, retval] BSTR * pbstr ); [propput] HRESULT HashAlgorithm( [in] BSTR bstr ); }; //+-------------------------------------------------------------------------- // interface ICEnroll2 [ object, uuid(704ca730-c90b-11d1-9bec-00c04fc295e1), dual, helpstring("ICEnroll2 Interface"), pointer_default(unique) ] interface ICEnroll2 : ICEnroll { HRESULT addCertTypeToRequest( [in] BSTR CertType ); HRESULT addNameValuePairToSignature( [in] BSTR Name, [in] BSTR Value ); [propget] HRESULT WriteCertToUserDS( [out, retval] BOOL * fBool ); [propput] HRESULT WriteCertToUserDS( [in] BOOL fBool ); [propget] HRESULT EnableT61DNEncoding( [out, retval] BOOL * fBool ); [propput] HRESULT EnableT61DNEncoding( [in] BOOL fBool ); }; //+-------------------------------------------------------------------------- // interface ICEnroll3 [ object, uuid(c28c2d95-b7de-11d2-a421-00c04f79fe8e), dual, helpstring("ICEnroll3 Interface"), pointer_default(unique) ] interface ICEnroll3 : ICEnroll2 { HRESULT InstallPKCS7( [in] BSTR PKCS7 ); HRESULT Reset( void ); HRESULT GetSupportedKeySpec( [out, retval] LONG * pdwKeySpec ); HRESULT GetKeyLen( [in] BOOL fMin, [in] BOOL fExchange, [out, retval] LONG * pdwKeySize ); HRESULT EnumAlgs( [in] LONG dwIndex, [in] LONG algClass, [out, retval] LONG * pdwAlgID ); HRESULT GetAlgName( [in] LONG algID, [out, retval] BSTR * pbstr ); [propput] HRESULT ReuseHardwareKeyIfUnableToGenNew( [in] BOOL fReuseHardwareKeyIfUnableToGenNew ); [propget] HRESULT ReuseHardwareKeyIfUnableToGenNew( [out, retval] BOOL * fReuseHardwareKeyIfUnableToGenNew ); [propput] HRESULT HashAlgID( [in] LONG hashAlgID ); [propget] HRESULT HashAlgID( [out, retval] LONG * hashAlgID ); [propput] HRESULT LimitExchangeKeyToEncipherment( [in] BOOL fLimitExchangeKeyToEncipherment ); [propget] HRESULT LimitExchangeKeyToEncipherment( [out, retval] BOOL * fLimitExchangeKeyToEncipherment ); [propput] HRESULT EnableSMIMECapabilities( [in] BOOL fEnableSMIMECapabilities ); [propget] HRESULT EnableSMIMECapabilities( [out, retval] BOOL * fEnableSMIMECapabilities ); }; //+-------------------------------------------------------------------------- // interface ICEnroll4 [ object, uuid(c1f1188a-2eb5-4a80-841b-7e729a356d90), dual, helpstring("ICEnroll4 Interface"), pointer_default(unique) ] interface ICEnroll4 : ICEnroll3 { [propput] HRESULT PrivateKeyArchiveCertificate( [in] BSTR bstrCert ); [propget] HRESULT PrivateKeyArchiveCertificate( [out, retval] BSTR *pbstrCert ); [propput] HRESULT ThumbPrint( [in] BSTR bstrThumbPrint ); [propget] HRESULT ThumbPrint( [out, retval] BSTR *pbstrThumbPrint ); HRESULT binaryToString( [in] LONG Flags, [in] BSTR strBinary, [out, retval] BSTR *pstrEncoded ); HRESULT stringToBinary( [in] LONG Flags, [in] BSTR strEncoded, [out, retval] BSTR *pstrBinary ); HRESULT addExtensionToRequest( [in] LONG Flags, [in] BSTR strName, [in] BSTR strValue ); HRESULT addAttributeToRequest( [in] LONG Flags, [in] BSTR strName, [in] BSTR strValue ); HRESULT addNameValuePairToRequest( [in] LONG Flags, [in] BSTR strName, [in] BSTR strValue ); HRESULT resetExtensions( void ); HRESULT resetAttributes( void ); HRESULT createRequest( [in] LONG Flags, [in] BSTR strDNName, [in] BSTR Usage, [out, retval] BSTR *pstrRequest ); HRESULT createFileRequest( [in] LONG Flags , [in] BSTR strDNName, [in] BSTR strUsage, [in] BSTR strRequestFileName ); HRESULT acceptResponse( [in] BSTR strResponse ); HRESULT acceptFileResponse( [in] BSTR strResponseFileName ); HRESULT getCertFromResponse( [in] BSTR strResponse, [out, retval] BSTR *pstrCert ); HRESULT getCertFromFileResponse( [in] BSTR strResponseFileName, [out, retval] BSTR *pstrCert ); HRESULT createPFX( [in] BSTR strPassword, [out, retval] BSTR *pstrPFX ); HRESULT createFilePFX( [in] BSTR strPassword, [in] BSTR strPFXFileName ); HRESULT setPendingRequestInfo( [in] LONG lRequestID, [in] BSTR strCADNS, [in] BSTR strCAName, [in] BSTR strFriendlyName ); HRESULT enumPendingRequest( [in] LONG lIndex, [in] LONG lDesiredProperty, [out, retval] VARIANT *pvarProperty ); HRESULT removePendingRequest( [in] BSTR strThumbprint ); HRESULT GetKeyLenEx( [in] LONG lSizeSpec, [in] LONG lKeySpec, [out, retval] LONG * pdwKeySize ); HRESULT InstallPKCS7Ex( [in] BSTR PKCS7, [out, retval] LONG * plCertInstalled ); HRESULT addCertTypeToRequestEx( [in] LONG lType, [in] BSTR bstrOIDOrName, [in] LONG lMajorVersion, [in] BOOL fMinorVersion, [in] LONG lMinorVersion ); HRESULT getProviderType( [in] BSTR strProvName, [out, retval] LONG *plProvType ); [propput] HRESULT SignerCertificate( [in] BSTR bstrCert ); [propput] HRESULT ClientId( [in] LONG lClientId ); [propget] HRESULT ClientId( [out, retval] LONG *plClientId ); HRESULT addBlobPropertyToCertificate( [in] LONG lPropertyId, [in] LONG lReserved, [in] BSTR bstrProperty ); HRESULT resetBlobProperties( void ); [propput] HRESULT IncludeSubjectKeyID( [in] BOOL fInclude ); [propget] HRESULT IncludeSubjectKeyID( [out, retval] BOOL *pfInclude ); }; //+-------------------------------------------------------------------------- // interface IEnroll [ object, uuid(acaa7838-4585-11d1-ab57-00c04fc295e1), local, helpstring("IEnroll Interface"), pointer_default(unique) ] interface IEnroll : IUnknown { // // Walk the end user through the process of generating a key // pair, which either will or will not be required to use some form // of hardware private key management, per the fRequireHardware // parameter. Return to the caller a PKCS#10 of the resulting // generated key, where in the subject name // HRESULT createFilePKCS10WStr( [in] LPCWSTR DNName, [in] LPCWSTR Usage, [in] LPCWSTR wszPKCS10FileName ); // // Accept delivery of the credentials that correspond to a previous // call to GenerateKeyPair. This method puts the credentials // whereever they are supposed to go for easy subsequent access // by the user. // HRESULT acceptFilePKCS7WStr( [in] LPCWSTR wszPKCS7FileName ); HRESULT createPKCS10WStr( // This is the DN name for the certificate in X500 name syntax. // For example CN=KeithV [in] LPCWSTR DNName, // This is the usage string, it will end up in the certificate // enumerating what the certificate is used for. For example // ClientAuth, Or CodeSigning. It can be any string. [in] LPCWSTR Usage, // The return value is a Base64 encoded // PKCS10 Cert Request [out] PCRYPT_DATA_BLOB pPkcs10Blob ); // // Accept delivery of the credentials that correspond to a previous // call to GenerateKeyPair. This method puts the credentials // whereever they are supposed to go for easy subsequent access // by the user. // HRESULT acceptPKCS7Blob( // // The credentials that are to be stored. Credentials // are a PKCS#7 SignedData that is used simply as a bucket // to convey a bunch of certificates. There must be precisely // one certificate with no child in the bucket. // [in] PCRYPT_DATA_BLOB pBlobPKCS7 ); PCCERT_CONTEXT getCertContextFromPKCS7( [in] PCRYPT_DATA_BLOB pBlobPKCS7 ); HCERTSTORE getMyStore( void ); HCERTSTORE getCAStore( void ); HCERTSTORE getROOTHStore( void ); HRESULT enumProvidersWStr( [in] LONG dwIndex, [in] LONG dwFlags, [out] LPWSTR * pbstrProvName ); HRESULT enumContainersWStr( [in] LONG dwIndex, [out] LPWSTR * pbstr ); // // Session Id's must be appropriately clean up // HRESULT freeRequestInfoBlob( // // The session Id that represents the data // [in] CRYPT_DATA_BLOB pkcs7OrPkcs10 ); [propget] HRESULT MyStoreNameWStr( [out] LPWSTR * szwName ); [propput] HRESULT MyStoreNameWStr( [in] LPWSTR szwName ); [propget] HRESULT MyStoreTypeWStr( [out] LPWSTR * szwType ); [propput] HRESULT MyStoreTypeWStr( [in] LPWSTR szwType ); [propget] HRESULT MyStoreFlags( [out] LONG * pdwFlags ); [propput] HRESULT MyStoreFlags( [in] LONG dwFlags ); [propget] HRESULT CAStoreNameWStr( [out] LPWSTR * szwName ); [propput] HRESULT CAStoreNameWStr( [in] LPWSTR szwName ); [propget] HRESULT CAStoreTypeWStr( [out] LPWSTR * szwType ); [propput] HRESULT CAStoreTypeWStr( [in] LPWSTR szwType ); [propget] HRESULT CAStoreFlags( [out] LONG * pdwFlags ); [propput] HRESULT CAStoreFlags( [in] LONG dwFlags ); [propget] HRESULT RootStoreNameWStr( [out] LPWSTR * szwName ); [propput] HRESULT RootStoreNameWStr( [in] LPWSTR szwName ); [propget] HRESULT RootStoreTypeWStr( [out] LPWSTR * szwType ); [propput] HRESULT RootStoreTypeWStr( [in] LPWSTR szwType ); [propget] HRESULT RootStoreFlags( [out] LONG * pdwFlags ); [propput] HRESULT RootStoreFlags( [in] LONG dwFlags ); [propget] HRESULT RequestStoreNameWStr( [out] LPWSTR * szwName ); [propput] HRESULT RequestStoreNameWStr( [in] LPWSTR szwName ); [propget] HRESULT RequestStoreTypeWStr( [out] LPWSTR * szwType ); [propput] HRESULT RequestStoreTypeWStr( [in] LPWSTR szwType ); [propget] HRESULT RequestStoreFlags( [out] LONG * pdwFlags ); [propput] HRESULT RequestStoreFlags( [in] LONG dwFlags ); [propget] HRESULT ContainerNameWStr( [out] LPWSTR * szwContainer ); [propput] HRESULT ContainerNameWStr( [in] LPWSTR szwContainer ); [propget] HRESULT ProviderNameWStr( [out] LPWSTR * szwProvider ); [propput] HRESULT ProviderNameWStr( [in] LPWSTR szwProvider ); [propget] HRESULT ProviderType( [out] LONG * pdwType ); [propput] HRESULT ProviderType( [in] LONG dwType ); [propget] HRESULT KeySpec( [out] LONG * pdw ); [propput] HRESULT KeySpec( [in] LONG dw ); [propget] HRESULT ProviderFlags( [out] LONG * pdwFlags ); [propput] HRESULT ProviderFlags( [in] LONG dwFlags ); [propget] HRESULT UseExistingKeySet( [out] BOOL * fUseExistingKeys ); [propput] HRESULT UseExistingKeySet( [in] BOOL fUseExistingKeys ); [propget] HRESULT GenKeyFlags( [out] LONG * pdwFlags ); [propput] HRESULT GenKeyFlags( [in] LONG dwFlags ); [propget] HRESULT DeleteRequestCert( [out] BOOL * fDelete ); [propput] HRESULT DeleteRequestCert( [in] BOOL fDelete ); [propget] HRESULT WriteCertToUserDS( [out] BOOL * fBool ); [propput] HRESULT WriteCertToUserDS( [in] BOOL fBool ); [propget] HRESULT EnableT61DNEncoding( [out] BOOL * fBool ); [propput] HRESULT EnableT61DNEncoding( [in] BOOL fBool ); [propget] HRESULT WriteCertToCSP( [out] BOOL * fBool ); [propput] HRESULT WriteCertToCSP( [in] BOOL fBool ); [propget] HRESULT SPCFileNameWStr( [out] LPWSTR * szw ); [propput] HRESULT SPCFileNameWStr( [in] LPWSTR szw ); [propget] HRESULT PVKFileNameWStr( [out] LPWSTR * szw ); [propput] HRESULT PVKFileNameWStr( [in] LPWSTR szw ); [propget] HRESULT HashAlgorithmWStr( [out] LPWSTR * szw ); [propput] HRESULT HashAlgorithmWStr( [in] LPWSTR szw ); [propget] HRESULT RenewalCertificate( [out] PCCERT_CONTEXT * ppCertContext ); [propput] HRESULT RenewalCertificate( [in] PCCERT_CONTEXT pCertContext ); HRESULT AddCertTypeToRequestWStr( [in] LPWSTR szw ); HRESULT AddNameValuePairToSignatureWStr( [in] LPWSTR Name, [in] LPWSTR Value ); HRESULT AddExtensionsToRequest( [in] PCERT_EXTENSIONS pCertExtensions ); HRESULT AddAuthenticatedAttributesToPKCS7Request( [in] PCRYPT_ATTRIBUTES pAttributes ); HRESULT CreatePKCS7RequestFromRequest( [in] PCRYPT_DATA_BLOB pRequest, [in] PCCERT_CONTEXT pSigningCertContext, [out] PCRYPT_DATA_BLOB pPkcs7Blob ); }; //+-------------------------------------------------------------------------- // interface IEnroll2 [ object, uuid(c080e199-b7df-11d2-a421-00c04f79fe8e), local, helpstring("IEnroll2 Interface"), pointer_default(unique) ] interface IEnroll2 : IEnroll { HRESULT InstallPKCS7Blob( [in] PCRYPT_DATA_BLOB pBlobPKCS7 ); HRESULT Reset( void ); HRESULT GetSupportedKeySpec( [out] LONG * pdwKeySpec ); HRESULT GetKeyLen( [in] BOOL fMin, [in] BOOL fExchange, [out] LONG * pdwKeySize ); HRESULT EnumAlgs( [in] LONG dwIndex, [in] LONG algClass, [out] LONG * pdwAlgID ); HRESULT GetAlgNameWStr( [in] LONG algID, [out] LPWSTR * ppwsz ); [propput] HRESULT ReuseHardwareKeyIfUnableToGenNew( [in] BOOL fReuseHardwareKeyIfUnableToGenNew ); [propget] HRESULT ReuseHardwareKeyIfUnableToGenNew( [out] BOOL * fReuseHardwareKeyIfUnableToGenNew ); [propput] HRESULT HashAlgID( [in] LONG hashAlgID ); [propget] HRESULT HashAlgID( [out, retval] LONG * hashAlgID ); HRESULT SetHStoreMy( [in] HCERTSTORE hStore ); HRESULT SetHStoreCA( [in] HCERTSTORE hStore ); HRESULT SetHStoreROOT( [in] HCERTSTORE hStore ); HRESULT SetHStoreRequest( [in] HCERTSTORE hStore ); [propput] HRESULT LimitExchangeKeyToEncipherment( [in] BOOL fLimitExchangeKeyToEncipherment ); [propget] HRESULT LimitExchangeKeyToEncipherment( [out, retval] BOOL * fLimitExchangeKeyToEncipherment ); [propput] HRESULT EnableSMIMECapabilities( [in] BOOL fEnableSMIMECapabilities ); [propget] HRESULT EnableSMIMECapabilities( [out, retval] BOOL * fEnableSMIMECapabilities ); }; //+-------------------------------------------------------------------------- // interface IEnroll4 [ object, uuid(f8053fe5-78f4-448f-a0db-41d61b73446b), local, helpstring("IEnroll4 Interface"), pointer_default(unique) ] interface IEnroll4 : IEnroll2 { [propput] HRESULT ThumbPrintWStr( [in] CRYPT_DATA_BLOB thumbPrintBlob ); [propget] HRESULT ThumbPrintWStr( [out, retval] PCRYPT_DATA_BLOB thumbPrintBlob ); HRESULT SetPrivateKeyArchiveCertificate( [in] PCCERT_CONTEXT pPrivateKeyArchiveCert ); PCCERT_CONTEXT GetPrivateKeyArchiveCertificate( void ); HRESULT binaryBlobToString( [in] LONG Flags, [in] PCRYPT_DATA_BLOB pblobBinary, [out] LPWSTR *ppwszString ); HRESULT stringToBinaryBlob( [in] LONG Flags, [in] LPCWSTR pwszString, [out] PCRYPT_DATA_BLOB pblobBinary, [out] LONG *pdwSkip, [out] LONG *pdwFlags ); HRESULT addExtensionToRequestWStr( [in] LONG Flags, [in] LPCWSTR pwszName, [in] PCRYPT_DATA_BLOB pblobValue ); HRESULT addAttributeToRequestWStr( [in] LONG Flags, [in] LPCWSTR pwszName, [in] PCRYPT_DATA_BLOB pblobValue ); HRESULT addNameValuePairToRequestWStr( [in] LONG Flags, [in] LPCWSTR pwszName, [in] LPCWSTR pwszValue ); HRESULT resetExtensions( void ); HRESULT resetAttributes( void ); HRESULT createRequestWStr( [in] LONG Flags, [in] LPCWSTR pwszDNName, [in] LPCWSTR pwszUsage, [out] PCRYPT_DATA_BLOB pblobRequest ); HRESULT createFileRequestWStr( [in] LONG Flags, [in] LPCWSTR pwszDNName, [in] LPCWSTR pwszUsage, [in] LPCWSTR pwszRequestFileName ); HRESULT acceptResponseBlob( [in] PCRYPT_DATA_BLOB pblobResponse ); HRESULT acceptFileResponseWStr( [in] LPCWSTR pwszResponseFileName ); HRESULT getCertContextFromResponseBlob( [in] PCRYPT_DATA_BLOB pblobResponse, [out] PCCERT_CONTEXT *ppCertContext ); HRESULT getCertContextFromFileResponseWStr( [in] LPCWSTR pwszResponseFileName, [out] PCCERT_CONTEXT *ppCertContext ); HRESULT createPFXWStr( [in] LPCWSTR pwszPassword, [out] PCRYPT_DATA_BLOB pblobPFX ); HRESULT createFilePFXWStr( [in] LPCWSTR pwszPassword, [in] LPCWSTR pwszPFXFileName ); HRESULT setPendingRequestInfoWStr( [in] LONG lRequestID, [in] LPCWSTR pwszCADNS, [in] LPCWSTR pwszCAName, [in] LPCWSTR pwszFriendlyName ); HRESULT enumPendingRequestWStr( [in] LONG lIndex, [in] LONG lDesiredProperty, [out] LPVOID ppProperty ); HRESULT removePendingRequestWStr( [in] CRYPT_DATA_BLOB thumbPrintBlob ); HRESULT GetKeyLenEx( [in] LONG lSizeSpec, [in] LONG lKeySpec, [out, retval] LONG * pdwKeySize ); HRESULT InstallPKCS7BlobEx( [in] PCRYPT_DATA_BLOB pBlobPKCS7, [out, retval] LONG * plCertInstalled ); HRESULT AddCertTypeToRequestWStrEx( [in] LONG lType, [in] LPCWSTR pwszOIDOrName, [in] LONG lMajorVersion, [in] BOOL fMinorVersion, [in] LONG lMinorVersion ); HRESULT getProviderTypeWStr( [in] LPCWSTR pwszProvName, [out, retval] LONG * plProvType ); HRESULT addBlobPropertyToCertificateWStr( [in] LONG lPropertyId, [in] LONG lReserved, [in] PCRYPT_DATA_BLOB pBlobProperty ); HRESULT SetSignerCertificate( [in] PCCERT_CONTEXT pSignerCert ); [propput] HRESULT ClientId( [in] LONG lClientId ); [propget] HRESULT ClientId( [out, retval] LONG *plClientId ); [propput] HRESULT IncludeSubjectKeyID( [in] BOOL fInclude ); [propget] HRESULT IncludeSubjectKeyID( [out, retval] BOOL *pfInclude ); }; //+-------------------------------------------------------------------------- // library XENROLLLib [ uuid(5b9169c0-db65-42aa-a38a-0726846aaeb3), version(1.0), helpstring("xenroll 1.0 Type Library") ] library XENROLLLib { importlib("stdole32.tlb"); importlib("stdole2.tlb"); [ uuid(127698e4-e730-4e5c-a2b1-21490a70c8a1), helpstring("CEnroll Class") ] coclass CEnroll2 { [default] interface ICEnroll4; }; [ uuid(43F8F289-7A20-11D0-8F06-00C04FC295E1), helpstring("CEnroll Class") ] coclass CEnroll { [default] interface ICEnroll4; }; }; cpp_quote("extern \"C\" IEnroll * WINAPI PIEnrollGetNoCOM(void);") cpp_quote("extern \"C\" IEnroll2 * WINAPI PIEnroll2GetNoCOM(void);") cpp_quote("extern \"C\" IEnroll4 * WINAPI PIEnroll4GetNoCOM(void);") cpp_quote("#define CRYPT_ENUM_ALL_PROVIDERS 0x1") //enumPendingRequestInfo types cpp_quote("#define XEPR_ENUM_FIRST -1") cpp_quote("#define XEPR_CADNS 0x01") cpp_quote("#define XEPR_CANAME 0x02") cpp_quote("#define XEPR_CAFRIENDLYNAME 0x03") cpp_quote("#define XEPR_REQUESTID 0x04") cpp_quote("#define XEPR_DATE 0x05") cpp_quote("#define XEPR_TEMPLATENAME 0x06") cpp_quote("#define XEPR_VERSION 0x07") cpp_quote("#define XEPR_HASH 0x08") cpp_quote("#define XEPR_V1TEMPLATENAME 0x09") cpp_quote("#define XEPR_V2TEMPLATEOID 0x10") //createRequest types cpp_quote("#define XECR_PKCS10_V2_0 0x1") cpp_quote("#define XECR_PKCS7 0x2") cpp_quote("#define XECR_CMC 0x3") cpp_quote("#define XECR_PKCS10_V1_5 0x4") //GetKeyLenEx lSizeSpec types cpp_quote("#define XEKL_KEYSIZE_MIN 0x1") cpp_quote("#define XEKL_KEYSIZE_MAX 0x2") cpp_quote("#define XEKL_KEYSIZE_INC 0x3") cpp_quote("#define XEKL_KEYSIZE_DEFAULT 0x4") //GetKeyLenEx lKeySpec types cpp_quote("#define XEKL_KEYSPEC_KEYX 0x1") cpp_quote("#define XEKL_KEYSPEC_SIG 0x2") //addCertTypeToRequestEx types cpp_quote("#define XECT_EXTENSION_V1 0x1") cpp_quote("#define XECT_EXTENSION_V2 0x2") //addBlobPropertyToCertificate flags cpp_quote("#define XECP_STRING_PROPERTY 0x1") //ClientId property cpp_quote("#define XECI_DISABLE 0x0") cpp_quote("#define XECI_XENROLL 0x1") cpp_quote("#define XECI_AUTOENROLL 0x2") cpp_quote("#define XECI_REQWIZARD 0x3") cpp_quote("#define XECI_CERTREQ 0x4")