FormatMessage function kernel32

int FormatMessage(
  1. int dwFlags,
  2. Pointer<NativeType> lpSource,
  3. int dwMessageId,
  4. int dwLanguageId,
  5. Pointer<Utf16> lpBuffer,
  6. int nSize,
  7. Pointer<Pointer<Int8>> Arguments,
)

Formats a message string. The function requires a message definition as input. The message definition can come from a buffer passed into the function. It can come from a message table resource in an already-loaded module. Or the caller can ask the function to search the system's message table resource(s) for the message definition. The function finds the message definition in a message table resource based on a message identifier and a language identifier. The function copies the formatted message text to an output buffer, processing any embedded insert sequences if requested.

DWORD FormatMessageW(
  DWORD   dwFlags,
  LPCVOID lpSource,
  DWORD   dwMessageId,
  DWORD   dwLanguageId,
  LPWSTR  lpBuffer,
  DWORD   nSize,
  va_list *Arguments
);

Implementation

int FormatMessage(
        int dwFlags,
        Pointer lpSource,
        int dwMessageId,
        int dwLanguageId,
        Pointer<Utf16> lpBuffer,
        int nSize,
        Pointer<Pointer<Int8>> Arguments) =>
    _FormatMessage(dwFlags, lpSource, dwMessageId, dwLanguageId, lpBuffer,
        nSize, Arguments);