<Microsoft.VisualBasic.ComClass()> <System.Serializable()> Public Class Win32API
    '------------------------------------
    '
    '------------------------------------
    Public Structure POINTAPI
        Dim x As Long
        Dim y As Long
    End Structure

    '------------------------------------
    'Define Win32 API
    '------------------------------------
    Public Declare Function SendMessage Lib "user32" Alias _
                                            "SendMessageA" ( _
                                            ByVal hWnd As Long, _
                                            ByVal wMsg As Long, _
                                            ByVal wParam As Long, _
                                            ByVal lParam As Long) As Long

    Public Declare Function WindowFromPoint Lib "user32" ( _
                                            ByVal xPoint As Long, _
                                            ByVal yPoint As Long) As Long

    Public Declare Function ChildWindowFromPoint Lib "user32" ( _
                                            ByVal hWnd As Long, _
                                            ByVal xPoint As Long, _
                                            ByVal yPoint As Long) As Long

    Public Declare Function GetCursorPos Lib "user32" (ByVal lpPoint As POINTAPI) As Long

    Public Declare Function GetPrivateProfileString Lib "kernel32" Alias _
                                            "GetPrivateProfileStringA" ( _
                                            ByVal lpApplicationName As String, _
                                            ByVal lpKeyName As String, _
                                            ByVal lpDefault As String, _
                                            ByVal lpReturnedString As String, _
                                            ByVal nSize As Integer, _
                                            ByVal lpFileName As String) As Long

    Public Declare Function GetPrivateProfileStringKey Lib "kernel32" Alias _
                                            "GetPrivateProfileStringA" ( _
                                            ByVal lpApplicationName As String, _
                                            ByVal lpKeyName As String, _
                                            ByVal lpDefault As String, _
                                            ByVal lpReturnedString As String, _
                                            ByVal nSize As Integer, _
                                            ByVal lpFileName As String) As Integer

    Public Declare Function WritePrivateProfileString Lib "kernel32" Alias _
                                            "WritePrivateProfileStringA" ( _
                                            ByVal lpApplicationName As String, _
                                            ByVal lpKeyName As String, _
                                            ByVal lpString As String, _
                                            ByVal lpFileName As String) As Long
    Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    Public Declare Function SleepEx Lib "kernel32" (ByVal dwMilliseconds As Long, ByVal bAlertable As Long) As Long
    Public Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long
End Class
