CoInitializeSecurity function Null safety ole32

int CoInitializeSecurity (
  1. Pointer<SECURITY_DESCRIPTOR> pSecDesc,
  2. int cAuthSvc,
  3. Pointer<SOLE_AUTHENTICATION_SERVICE> asAuthSvc,
  4. Pointer<NativeType> pReserved1,
  5. int dwAuthnLevel,
  6. int dwImpLevel,
  7. Pointer<NativeType> pAuthList,
  8. int dwCapabilities,
  9. Pointer<NativeType> pReserved3
)

Registers security and sets the default security values for the process.

HRESULT CoInitializeSecurity(
  PSECURITY_DESCRIPTOR        pSecDesc,
  LONG                        cAuthSvc,
  SOLE_AUTHENTICATION_SERVICE *asAuthSvc,
  void                        *pReserved1,
  DWORD                       dwAuthnLevel,
  DWORD                       dwImpLevel,
  void                        *pAuthList,
  DWORD                       dwCapabilities,
  void                        *pReserved3
);

Implementation

int CoInitializeSecurity(
    Pointer<SECURITY_DESCRIPTOR> pSecDesc,
    int cAuthSvc,
    Pointer<SOLE_AUTHENTICATION_SERVICE> asAuthSvc,
    Pointer pReserved1,
    int dwAuthnLevel,
    int dwImpLevel,
    Pointer pAuthList,
    int dwCapabilities,
    Pointer pReserved3) {
  final _CoInitializeSecurity = _ole32.lookupFunction<
      Int32 Function(
          Pointer<SECURITY_DESCRIPTOR> pSecDesc,
          Int32 cAuthSvc,
          Pointer<SOLE_AUTHENTICATION_SERVICE> asAuthSvc,
          Pointer pReserved1,
          Uint32 dwAuthnLevel,
          Uint32 dwImpLevel,
          Pointer pAuthList,
          Uint32 dwCapabilities,
          Pointer pReserved3),
      int Function(
          Pointer<SECURITY_DESCRIPTOR> pSecDesc,
          int cAuthSvc,
          Pointer<SOLE_AUTHENTICATION_SERVICE> asAuthSvc,
          Pointer pReserved1,
          int dwAuthnLevel,
          int dwImpLevel,
          Pointer pAuthList,
          int dwCapabilities,
          Pointer pReserved3)>('CoInitializeSecurity');
  return _CoInitializeSecurity(pSecDesc, cAuthSvc, asAuthSvc, pReserved1,
      dwAuthnLevel, dwImpLevel, pAuthList, dwCapabilities, pReserved3);
}