Return Value

Availability

The KseUnregisterShim function is exported by name
from the kernel in version 6.2 and higher.

Documentation Status

The KseUnregisterShim function is not documented.
Nor is it declared in any header from any known Windows Driver Kit (WDK).

Behaviour

The function must be given a shim to unregister else it has nothing to do: if
instead Shim is NULL,
the function returns STATUS_INVALID_PARAMETER.

If some problem occurred while initialising the Kernel Shim Engine (KSE) such
that it is not operational, there is no point trying to proceed, and the function
returns STATUS_UNSUCCESSFUL.

A shim can be unregisered only if it’s registered but not in use. If no shim
with the same GUID is currently registered, the function returns
STATUS_OBJECT_NAME_NOT_FOUND. If the registered shim
with the same GUID has a non-zero reference count, indicating that it is currently
applied to a loaded driver, the function fails, returning
STATUS_ACCESS_DENIED. Ordinarily, however, the structure that represents
the registered shim is removed from the KSE’s list of such structures, and the shim
thus becomes unregistered.

This page was created on 9th
August 2016 and was last
modified on 7th September 2016.