I can't post in the Code Library

Merrion

Well-known member
Joined
Sep 29, 2001
Messages
265
Location
Dublin, Ireland
User Rank
*Experts*
which is probably a good thing as Im not very experienced in this .Net stuff yet

Anyway - the API Exception class is wrong...the API declaration for FormatMessage should be...

Code:
#Region "API Declarations"
    <DllImport("kernel32.dll", EntryPoint:="FormatMessageA", _
 CharSet:=CharSet.Ansi, _
 ExactSpelling:=True, _
 CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function FormatMessage(ByVal dwFlags As Format_Message_Flags, ByVal lpSource As Int32, ByVal dwMessageId As Int32, ByVal dwLanguageId As Int32, ByVal lpBuffer As StringBuilder, ByVal nSize As Int32, ByVal Arguments As Int32) As Int32

    End Function

#End Region
 
Back
Top