SecMakeSPNEx2 function (ntifs.h)
SecMakeSPNEx2 creates a service provider name string that can be used when it communicates with specific security service providers.
KSECDDDECLSPEC NTSTATUS SecMakeSPNEx2( [in] IN PUNICODE_STRING ServiceClass, [in] IN PUNICODE_STRING ServiceName, IN PUNICODE_STRING InstanceName, IN USHORT InstancePort, IN PUNICODE_STRING Referrer, IN PUNICODE_STRING InTargetInfo, [in, out] IN OUT PUNICODE_STRING Spn, OUT PULONG TotalSize, [in] IN BOOLEAN Allocate, [in] IN BOOLEAN IsTargetInfoMarshaled );
A pointer to a Unicode string that specifies the service class for the security service provider.
A pointer to a Unicode string that specifies the service name for the security service provider.
[in, out] Spn
A pointer to a Unicode string that receives the security service provider name string that is created by this function.
A Boolean variable that indicates if the memory that is used to store the Spn Unicode string should be allocated by this function. If this parameter is TRUE, memory for Spn will be allocated from paged pool.
A Boolean variable that indicates that the caller provided a marshaled InTargetInfo structure. If IsTargetInfoMarshaled is TRUE, InTargetInfo->Buffer points to a string representation of the CREDENTIAL_TARGET_INFORMATION structure as returned by the CredMarshalTargetInfo function.
SecMakeSPNEx2 returns STATUS_SUCCESS on success or one of the following error codes on failure:
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.
||A total length of the Spn parameter exceeds 65535 bytes.|
||The Allocate parameter was set to TRUE, but the memory allocation request failed.|
SecMakeSPNEx2 is an enhanced version of SecMakeSPNEx.
|Minimum supported client||This function is available on Windows Vista, Windows Server 2008, and later versions of the Windows operating systems.|
|Header||ntifs.h (include Ntifs.h, FltKernel.h)|