I can't post in the Code Library

Merrion

Junior Contributor
Joined
Sep 29, 2001
Messages
265
Location
Dublin, Ireland
which is probably a good thing as I'm not very experienced in this .Net stuff yet

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

Visual Basic:
#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