Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
List of all QB64pe error messages
#4
This program displays all Windows error messages:

Code: (Select All)
Rem search for error messages in windows
Declare Dynamic Library "kernel32"
  Function FormatMessageA& (ByVal f As Long, f$, Byval e As Long, Byval d As Long, g$, Byval s As Long, h$)
  Function GetLastError& ()
End Declare

' count error messages
Dim m As String * 260
For x& = 1 To 15299
  y& = FormatMessageA&(&H1200, "", x&, 0, m$, 260, "")
  If y& Then
      c = c + 1
      x$ = "Error 0x" + Hex$(x&) + " (" + LTrim$(Str$(x&)) + ")"
      y$ = Left$(m$, y& - 2)
      length = length + Len(x$) \ 80 + Len(y$) \ 80 + 2
      If length >= 22 Then
        length = 0
        If p = 0 Then
            Color 15
            Print "-more(y/n/c)-";
            Do
              _Limit 50
              z$ = LCase$(InKey$)
              If z$ = "c" Then p = -1: Print: Exit Do
              If z$ = "y" Then Print: Exit Do
              If z$ = "n" Then Print: Exit For
            Loop
        End If
      End If
      Color 14
      Print x$
      Print y$
  End If
Next
Color 14
Print "There were"; c; "messages found."
Color 7
End


Attached Files
.bas   errmsg9.bas (Size: 1.06 KB / Downloads: 30)
Reply


Messages In This Thread
List of all QB64pe error messages - by TDarcos - 03-25-2024, 06:49 PM
RE: List of all QB64pe error messages - by a740g - 03-25-2024, 06:53 PM
RE: List of all QB64pe error messages - by Pete - 03-26-2024, 01:50 AM
RE: List of all QB64pe error messages - by eoredson - 03-27-2024, 04:02 AM



Users browsing this thread: 1 Guest(s)