Compartir a través de


SecMakeSPNEx function

SecMakeSPNEx creates a service provider name string that can be used when communicating with specific security service providers.

Syntax

NTSTATUS SecMakeSPNEx(
  _In_    PUNICODE_STRING ServiceClass,
  _In_    PUNICODE_STRING ServiceName,
  _In_    PUNICODE_STRING InstanceName,
  _In_    USHORT          InstancePort,
  _In_    PUNICODE_STRING Referrer,
  _In_    PUNICODE_STRING TargetInfo,
  _Inout_ PUNICODE_STRING Spn,
  _Out_   PULONG          Length,
  _In_    BOOLEAN         Allocate
);

Parameters

  • ServiceClass [in]
    A pointer to a Unicode string specifying the service class for the security service provider.

  • ServiceName [in]
    A pointer to a Unicode string specifying the service name for the security service provider.

  • InstanceName [in]
    A pointer to an optional Unicode string specifying the instance name for connecting with the security service provider.

  • InstancePort [in]
    An optional variable specifying the instance port for connecting with the security service provider.

  • Referrer [in]
    A pointer to an optional Unicode string specifying the referrer name for connecting with the security service provider.

  • TargetInfo [in]
    A pointer to an optional Unicode string specifying target information for connecting with the security service provider.

  • Spn [in, out]
    A pointer to a Unicode string for storing the security service provider name string created by this function.

  • Length [out]
    A pointer to an optional variable for storing the length of the security service provider name string created by this function.

  • Allocate [in]
    A Boolean variable indicating if the memory for storing the Spn Unicode string should be allocated by this function. If this parameter is true, memory for Spn will be allocated from paged pool.

Return value

SecMakeSPNEx returns STATUS_SUCCESS on success or one of the following error codes on failure:

Return code Description
STATUS_BUFFER_OVERFLOW

The Allocate parameter was set to false and one of the following conditions occurred:

The Spn parameter was a null pointer.

The maximum length for the Spn Unicode string parameter was too small.

STATUS_INVALID_PARAMETER

A total length of the Spn parameter exceeds 65535 bytes.

STATUS_NO_MEMORY

The Allocate parameter was set to true, but the memory allocation request failed.

 

Remarks

SecMakeSPNEx is an enhanced version of SecMakeSPN.

Requirements

Target platform

Universal

Version

This function is only available on Microsoft Windows XP and later.

Header

Ntifs.h (include Ntifs.h or FltKernel.h)

Library

Ksecdd.lib

IRQL

<= APC_LEVEL

See also

SecMakeSPN

SecMakeSPNEx2

 

 

Send comments about this topic to Microsoft