GetSystemDefaultLocaleName function Null safety kernel32

int GetSystemDefaultLocaleName(
  1. Pointer<Utf16> lpLocaleName,
  2. int cchLocaleName
)

Retrieves the system default locale name.

int GetSystemDefaultLocaleName(
  LPWSTR lpLocaleName,
  int    cchLocaleName
);

Implementation

int GetSystemDefaultLocaleName(Pointer<Utf16> lpLocaleName, int cchLocaleName) {
  final _GetSystemDefaultLocaleName = _kernel32.lookupFunction<
      Int32 Function(Pointer<Utf16> lpLocaleName, Int32 cchLocaleName),
      int Function(Pointer<Utf16> lpLocaleName,
          int cchLocaleName)>('GetSystemDefaultLocaleName');
  return _GetSystemDefaultLocaleName(lpLocaleName, cchLocaleName);
}