You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The <b>InitializeEncode</b> method initializes the attribute from information about the user, client computer, and application that submitted the <ahref="/windows/desktop/SecGloss/c-gly">certificate request</a>.
52
+
The **InitializeEncode** method initializes the attribute from information about the user, client computer, and application that submitted the [certificate request](/windows/win32/SecGloss/c-gly).
54
53
55
54
## -parameters
56
55
57
56
### -param ClientId [in]
58
57
59
-
A <ahref="/windows/desktop/api/certenroll/ne-certenroll-requestclientinfoclientid">RequestClientInfoClientId</a> enumeration value that identifies the type of application that created the request. Examples include autoenrollment services, command-line request tools, and custom request applications.
58
+
A [RequestClientInfoClientId](/windows/win32/api/certenroll/ne-certenroll-requestclientinfoclientid) enumeration value that identifies the type of application that created the request. Examples include auto-enrollment services, command-line request tools, and custom request applications.
60
59
61
60
### -param strMachineDnsName [in, optional]
62
61
63
-
A <b>BSTR</b> variable that contains the Domain Name System (DNS) name of the computer on which the request was created, for example <i>ComputerName.contoso.com</i>. If you do not supply a name, the method calls the <ahref="/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getcomputernameexa">GetComputerNameEx</a> function. If a name cannot be found, the method fails.
62
+
A **BSTR** variable that contains the Domain Name System (DNS) name of the computer on which the request was created, for example `ComputerName.contoso.com`. If you do not supply a name, the method calls the [GetComputerNameEx](/windows/win32/api/sysinfoapi/nf-sysinfoapi-getcomputernameexa) function. If a name cannot be found, the method fails.
64
63
65
64
### -param strUserSamName [in, optional]
66
65
67
-
A <b>BSTR</b> variable that contains the <ahref="/windows/desktop/SecGloss/s-gly">Security Accounts Manager</a> (SAM) name for the user in the form <i>DomainName\UserName</i>. If you do not supply a name, the method calls the <ahref="/windows/desktop/api/secext/nf-secext-getusernameexa">GetUserNameEx</a> function. If a name cannot be found, the method fails.
66
+
A **BSTR** variable that contains the [Security Accounts Manager](/windows/win32/SecGloss/s-gly)(SAM) name for the user in the form *DomainName\UserName*. If you do not supply a name, the method calls the [GetUserNameEx](/windows/win32/api/secext/nf-secext-getusernameexa) function. If a name cannot be found, the method fails.
68
67
69
68
### -param strProcessName [in, optional]
70
69
71
-
A <b>BSTR</b> variable that contains the name of the application that created the certificate request. If you do not supply a name, the method calls the <ahref="/windows/desktop/api/processenv/nf-processenv-getcommandlinea">GetCommandLine()</a> function and parses the command line. If a name cannot be found, the method fails.
70
+
A **BSTR** variable that contains the name of the application that created the certificate request. If you do not supply a name, the method calls the [GetCommandLine](/windows/desktop/api/processenv/nf-processenv-getcommandlinea) function and parses the command line. If a name cannot be found, the method fails.
72
71
73
72
## -returns
74
73
75
-
If the function succeeds, the function returns <b>S_OK</b>.
74
+
If the function succeeds, the function returns **S_OK**.
76
75
77
-
If the function fails, it returns an <b>HRESULT</b> value that indicates the error. For a list of common error codes, see <ahref="/windows/desktop/SecCrypto/common-hresult-values">Common HRESULT Values</a>.
76
+
If the function fails, it returns an **HRESULT** value that indicates the error. For a list of common error codes, see [Common HRESULT Values](/windows/win32/SecCrypto/common-hresult-values).
78
77
79
78
## -remarks
80
79
81
-
The <ahref="/windows/desktop/SecGloss/o-gly">object identifier</a> (OID) for this attribute is <b>XCN_OID_REQUEST_CLIENT_INFO</b> (1.3.6.1.4.1.311.21.20). For more information, see <ahref="/windows/desktop/api/certenroll/ne-certenroll-certenroll_objectid">CERTENROLL_OBJECTID</a>. The attribute is created as an <ahref="/windows/desktop/SecGloss/a-gly">Abstract Syntax Notation One</a> (ASN.1) structure that is encoded by using <ahref="/windows/desktop/SecGloss/d-gly">Distinguished Encoding Rules</a> (DER).
82
-
83
-
You must call either <b>InitializeEncode</b> or <ahref="/windows/desktop/api/certenroll/nf-certenroll-ix509attributeclientid-initializedecode">InitializeDecode</a> before you can use an <ahref="/windows/desktop/api/certenroll/nn-certenroll-ix509attributeclientid">IX509AttributeClientId</a> object. The two methods complement each other. The <b>InitializeEncode</b> method enables you to construct an encoded ASN.1 structure from raw data, and the <b>InitializeDecode</b> method enables you to initialize raw data from an encoded ASN.1 structure. You can call the following properties to retrieve the raw data:<ul>
The [object identifier](/windows/win32/SecGloss/o-gly) (OID) for this attribute is **XCN_OID_REQUEST_CLIENT_INFO** (1.3.6.1.4.1.311.21.20). For more information, see [CERTENROLL_OBJECTID](/windows/win32/api/certenroll/ne-certenroll-certenroll_objectid). The attribute is created as an [Abstract Syntax Notation One](/windows/win32/SecGloss/a-gly) (ASN.1) structure that is encoded by using [Distinguished Encoding Rules](/windows/win32/SecGloss/d-gly) (DER).
81
+
82
+
You must call either **InitializeEncode** or [InitializeDecode](nf-certenroll-ix509attributeclientid-initializedecode.md) before you can use an [IX509AttributeClientId](nn-certenroll-ix509attributeclientid.md) object. The two methods complement each other. The **InitializeEncode** method enables you to construct an encoded ASN.1 structure from raw data, and the **InitializeDecode** method enables you to initialize raw data from an encoded ASN.1 structure. You can call the following properties to retrieve the raw data:
0 commit comments