Windows Driver Kit: Installable File System Drivers
SecMakeSPN
SecMakeSPN creates a service provider name string that can be used when communicating with specific security service providers.
KSECDDDECLSPEC
NTSTATUS
NTAPI
SecMakeSPN(
IN PUNICODE_STRING ServiceClass,
IN PUNICODE_STRING ServiceName,
IN PUNICODE_STRING InstanceName OPTIONAL,
IN USHORT InstancePort OPTIONAL,
IN PUNICODE_STRING Referrer OPTIONAL,
IN OUT PUNICODE_STRING Spn,
OUT PULONG Length OPTIONAL,
IN BOOLEAN Allocate
);
Parameters
- ServiceClass
- A pointer to a Unicode string specifying the service class for the security service provider.
- ServiceName
- A pointer to a Unicode string specifying the service name for the security service provider.
- InstanceName
- A pointer to an optional Unicode string specifying the instance name for connecting with the security service provider.
- InstancePort
- An optional variable specifying the instance port for connecting with the security service provider.
- Referrer
- A pointer to an optional Unicode string specifying the referrer name for connecting with the security service provider.
- Spn
- A pointer to a Unicode string for storing the security service provider name string created by this function.
- Length
- A pointer to an optional variable for storing the length of the security service provider name string created by this function.
- Allocate
- 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
SecMakeSPN returns STATUS_SUCCESS on success or one of the following error codes on failure:
- 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.
Comments
Requirements
IRQL: <= APC_LEVEL
Headers: Declared in Ntifs.h. Include Ntifs.h or FltKernel.h.
Library: Contained in Ksecdd.lib.
See Also
SecMakeSPNEx, SecMakeSPNEx2