CreateDesktop function Null safety user32

int CreateDesktop(
  1. Pointer<Utf16> lpszDesktop,
  2. Pointer<Utf16> lpszDevice,
  3. Pointer<DEVMODE> pDevmode,
  4. int dwFlags,
  5. int dwDesiredAccess,
  6. Pointer<SECURITY_ATTRIBUTES> lpsa

Creates a new desktop, associates it with the current window station of the calling process, and assigns it to the calling thread. The calling process must have an associated window station, either assigned by the system at process creation time or set by the SetProcessWindowStation function.

HDESK CreateDesktopW(
  LPCWSTR               lpszDesktop,
  LPCWSTR               lpszDevice,
  DEVMODEW              *pDevmode,
  DWORD                 dwFlags,
  ACCESS_MASK           dwDesiredAccess,


int CreateDesktop(
        Pointer<Utf16> lpszDesktop,
        Pointer<Utf16> lpszDevice,
        Pointer<DEVMODE> pDevmode,
        int dwFlags,
        int dwDesiredAccess,
        Pointer<SECURITY_ATTRIBUTES> lpsa) =>
        lpszDesktop, lpszDevice, pDevmode, dwFlags, dwDesiredAccess, lpsa);