InitializeProcThreadAttributeList function Null safety kernel32

int InitializeProcThreadAttributeList (
  1. Pointer<NativeType> lpAttributeList,
  2. int dwAttributeCount,
  3. int dwFlags,
  4. Pointer<IntPtr> lpSize
)

Initializes the specified list of attributes for process and thread creation.

BOOL InitializeProcThreadAttributeList(
  LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
  DWORD                        dwAttributeCount,
  DWORD                        dwFlags,
  PSIZE_T                      lpSize
);

Implementation

int InitializeProcThreadAttributeList(Pointer lpAttributeList,
    int dwAttributeCount, int dwFlags, Pointer<IntPtr> lpSize) {
  final _InitializeProcThreadAttributeList = _kernel32.lookupFunction<
      Int32 Function(Pointer lpAttributeList, Uint32 dwAttributeCount,
          Uint32 dwFlags, Pointer<IntPtr> lpSize),
      int Function(Pointer lpAttributeList, int dwAttributeCount, int dwFlags,
          Pointer<IntPtr> lpSize)>('InitializeProcThreadAttributeList');
  return _InitializeProcThreadAttributeList(
      lpAttributeList, dwAttributeCount, dwFlags, lpSize);
}