Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
Declare Function MoveFileEx Lib "kernel32" Alias "MoveFileExA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal dwFlags As Long) As Long
Declare Function GetWindowPlacement Lib "user32" (ByVal hWnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
Declare Function SetWindowPlacement Lib "user32" (ByVal hWnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
Declare Function IsWindow Lib "user32" (ByVal hWnd As Long) As Long
Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Public GE_interface As Object           'GE interface application object
Public GE_interface_view As Object      'GE interface camera object

Public GE_launch_range As Single        'User supplied GE range at launch
Public GE_range_units As Integer        'User supplied GE range units (0 = ft, 1 = miles, 2 = m, 3 = km)
Public GE_launch_bearing As Integer     'User supplied GE bearing at launch
Public GE_launch_tilt As Integer        'User supplied GE tilt at launch
Public GE_launch_opacity As Integer     'User supplied GE chart opacity at launch
Public GE_latency As Integer            'User supplied GE latency
Public GE_fpt_icon As String            'User supplied GE focal point icon
Public GE_track_color As Long           'User supplied GE track color
Public GE_kml_header1 As String         'User supplied GE kml header line 1
Public GE_kml_header2 As String         'User supplied GE kml header line 2

Public GE_exe As String                 'GE executable name
Public GE_ver_OK As Integer             'Flag to indicate GE version is 4.0.2416 or later (0 = unknown, 1 = OK, 2 = NOK)
Public GE_range As Single               'Current GE range
Public GE_bearing As Integer            'Current GE bearing
Public GE_tilt As Integer               'Current GE tilt
        
Public GE_status_launched As Integer    'Flag to indicate if GE launched or not
Public GE_status_changing As Integer    'Flag to indicate if GE range, bearing or tilt is changing
Public GE_status_networklink As Integer 'Flag to indicate if GE vessels network link has been established
Public GE_status_temp_minimize As Integer   'Flag to indicate GE temporarily minimized
Public GE_status_chart_update As Integer    'Flag to indicate GE chart update state (0 = no update required, 1 = update required, 2 = update in progress)
Public GE_status_vessel_update As Integer 'Flag to indicate GE vessel update state (0 = no update required, 1 = update required, 2 = update in progress)

Public GE_last_chart As String          'Name of last chart overlaid on GE
Public GE_vessel_update_time As Long    'Time at which GE vessels were last updated
Public GE_view_last_lat As Double       'Last latitude to which view was last moved
Public GE_view_last_long As Double      'Last longitude to which view was last moved
Public GE_track_color_hex As String     'Track color hex string
Public GE_main_window_handle As Long    'Handle of main GE window
Public GE_time_change As Long           'Time at which current GE range, bearing or tilt last changed

Public GE_savewindow_flags As Long      'Saved GE window - flags
Public GE_savewindow_showCmd As Long    'Saved GE window - showCmd
Public GE_savewindow_ptMinPositionX As Long 'Saved GE window - ptMinPosition.X
Public GE_savewindow_ptMinPositionY As Long 'Saved GE window - ptMinPosition.Y
Public GE_savewindow_ptMaxPositionX As Long 'Saved GE window - ptMaxPosition.X
Public GE_savewindow_ptMaxPositionY As Long 'Saved GE window - ptMaxPosition.Y
Public GE_savewindow_rcNormalPosition_Left As Long  'Saved GE window - rcNormalPosition.Left
Public GE_savewindow_rcNormalPosition_Top As Long   'Saved GE window - rcNormalPosition.Top
Public GE_savewindow_rcNormalPosition_Bottom As Long    'Saved GE window - rcNormalPosition.Bottom
Public GE_savewindow_rcNormalPosition_Right As Long 'Saved GE window - rcNormalPosition.Right

Public Type WINDOWPLACEMENT                 'Window placement data structure
        Length As Long
        flags As Long
        showCmd As Long
        ptMinPosition As POINTAPI
        ptMaxPosition As POINTAPI
        rcNormalPosition As RECT
End Type