CoSetProxyBlanket function Null safety ole32

int CoSetProxyBlanket (
  1. Pointer<NativeType> pProxy,
  2. int dwAuthnSvc,
  3. int dwAuthzSvc,
  4. Pointer<Utf16> pServerPrincName,
  5. int dwAuthnLevel,
  6. int dwImpLevel,
  7. Pointer<NativeType> pAuthInfo,
  8. int dwCapabilities
)

Sets the authentication information that will be used to make calls on the specified proxy. This is a helper function for IClientSecurity::SetBlanket.

HRESULT CoSetProxyBlanket(
  IUnknown                 *pProxy,
  DWORD                    dwAuthnSvc,
  DWORD                    dwAuthzSvc,
  OLECHAR                  *pServerPrincName,
  DWORD                    dwAuthnLevel,
  DWORD                    dwImpLevel,
  RPC_AUTH_IDENTITY_HANDLE pAuthInfo,
  DWORD                    dwCapabilities
);

Implementation

int CoSetProxyBlanket(
    Pointer pProxy,
    int dwAuthnSvc,
    int dwAuthzSvc,
    Pointer<Utf16> pServerPrincName,
    int dwAuthnLevel,
    int dwImpLevel,
    Pointer pAuthInfo,
    int dwCapabilities) {
  final _CoSetProxyBlanket = _ole32.lookupFunction<
      Int32 Function(
          Pointer pProxy,
          Uint32 dwAuthnSvc,
          Uint32 dwAuthzSvc,
          Pointer<Utf16> pServerPrincName,
          Uint32 dwAuthnLevel,
          Uint32 dwImpLevel,
          Pointer pAuthInfo,
          Uint32 dwCapabilities),
      int Function(
          Pointer pProxy,
          int dwAuthnSvc,
          int dwAuthzSvc,
          Pointer<Utf16> pServerPrincName,
          int dwAuthnLevel,
          int dwImpLevel,
          Pointer pAuthInfo,
          int dwCapabilities)>('CoSetProxyBlanket');
  return _CoSetProxyBlanket(pProxy, dwAuthnSvc, dwAuthzSvc, pServerPrincName,
      dwAuthnLevel, dwImpLevel, pAuthInfo, dwCapabilities);
}