SystemErrorDescription – Convert an API error code to a string

SystemErrorDescription – Convert an API error code to a string

Private Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" _    (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, _    ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, _    Arguments As Long) As LongPrivate Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000' Convert an API error number to a descriptive string'' If any error it returns an empty string, in which case' the Err.LastDllError property can be use to retrieve' extended error informationFunction SystemErrorDescription(ByVal ErrCode As Long) As String    Dim buffer As String * 1024    Dim ret As Long    ' return value is the length of the result message    ret = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, ErrCode, 0, buffer, _        Len(buffer), 0)    SystemErrorDescription = Left$(buffer, ret)End Function

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved