MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / GetWin32ErrorText

Function GetWin32ErrorText

source/util.cpp:1660–1673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1658
1659
1660LPTSTR GetWin32ErrorText(LPTSTR aBuf, DWORD aBufSize, DWORD aError)
1661// aBufSize is an int to preserve any negative values the caller might pass in.
1662{
1663 if (aBufSize < 1)
1664 return aBuf;
1665 if (aBufSize == 1)
1666 {
1667 *aBuf = '\0';
1668 return aBuf;
1669 }
1670 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS // Ignore inserts: https://blogs.msdn.microsoft.com/oldnewthing/20071128-00/?p=24353
1671 , NULL, aError, 0, aBuf, (DWORD)aBufSize - 1, NULL);
1672 return aBuf;
1673}
1674
1675
1676

Callers 1

ActionExecMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected