Share via


IIsCertMapper.GetMapping (ADSI)

The GetMapping method retrieves an SSL certificate and the mapping data from an existing certificate mapping. Four seek methods are available to search for the mapping: by certificate, by name, by Windows account, and by numeric string index. The retrieved mapping is returned in parameter variables that you provide.

objIIsCertMapper.GetMapping(
  lMethod As LONG,
  vKey As VARIANT,
  pvCert As VARIANT,
  pbstrNtAcct As VARIANT,
  pbstrNtPwd As VARIANT,
  pbstrName As VARIANT
) As VARIANT

Parameters

  • lMethod
    [in] Long integer containing the seek method to use for searching the mappings. Valid seek methods are 1, 2, 3, or 4. Seek method 1 specifies search by certificate, seek method 2 searches by name, method 3 searches by Windows account, and method 4 searches by a 1-based numeric string index (for example, "1," "2," and so on).

  • vKey
    [in] VARIANT containing the key to use in the search specified by lMethod. For seek method 1, vKey specifies a certificate. For seek method 2, vKey specifies a name. For seek method 3, vKey specifies a Windows account. For seek method 4, vKey specifies a numeric string index (for example, "1," "2," and so on).

  • pvCert
    [out] Pointer to a VARIANT containing the returned certificate.

  • pbstrNtAcct
    [out] Pointer to a string containing the NT Windows account name.

  • pbstrNtPwd
    [out] Pointer to a string containing the Windows NT password.

  • pbstrName
    [out] Pointer to a string containing the Windows account friendly name.

  • plEnabled
    [out] Pointer to a long integer containing TRUE for an enabled mapping, or FALSE for a disabled mapping.

Return Values

This method has no return values.

Example Code

<%  
  Dim CertObj, vCert, NtAcct, NtPwd, strName, IEnabled  
  Set CertObj = GetObject("IIS://.. 
path../IIsCertMapper")  
  'Search by Windows account.  
  CertObj.GetMapping 3, "MYACCT", vCert, NtAcct, NtPwd, strName, IEnabled  
%>  

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

See Also

Concepts

IIsCertMapper (ADSI)

Using ADSI to Configure IIS