!
! ********************************************************************
! *                                                                  *
! *  Copyright 2001 Compaq Computer Corporation                      *
! *                                                                  *
! *  COMPAQ Registered in U.S. Patent and Trademark Office.          *
! *                                                                  *
! *  Confidential computer software. Valid license from Compaq or    *
! *  authorized sublicensor required for possession, use or copying. *
! *  Consistent with FAR 12.211 and 12.212, Commercial Computer      *
! *  Software, Computer Software Documentation, and Technical Data   *
! *  for Commercial Items are licensed to the U.S. Government under  *
! *  vendor's standard commercial license.                           *
! *                                                                  *
! ********************************************************************
!
!DEC$ FREEFORM
!DEC$ IF .NOT. DEFINED(__DFMT_INCLUDE)
MODULE DFMT
!DEC$ ENDIF
!* Data Structures for for Thread/Process/Synchronization Win32 APIs
!* Copyright (c) 1995 Microsoft Corporation
!* NOTE: When modifying this file, you must follow the following rules to
!* ensure compatibility with fixed form and free form source:
!*   1) All comments must start with '!'
!*   2) All code must be within columns 7 to 72
!*   3) For continuation, place a '&' in column 73,
!*      and a '&' in column 6 of the continuation line
      interface
!DEC$ IF DEFINED(_X86_)
      logical*4 function CloseHandle (dwhandle)
!DEC$ ATTRIBUTES DEFAULT :: CloseHandle
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_CloseHandle@4' :: CloseHandle
!DEC$ ELSE
      logical*4 function CloseHandle (dwhandle)
!DEC$ ATTRIBUTES DEFAULT :: CloseHandle
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'CloseHandle'   :: CloseHandle
!DEC$ ENDIF
	integer*4 dwhandle
!DEC$ ATTRIBUTES VALUE ::   dwhandle
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function CreateEvent(security, reset, init_state, string)
!DEC$ ATTRIBUTES DEFAULT :: CreateEvent
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_CreateEventA@16' :: CreateEvent
!DEC$ ELSE
      integer*4 function CreateEvent(security, reset, init_state, string)
!DEC$ ATTRIBUTES DEFAULT :: CreateEvent
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'CreateEventA'    :: CreateEvent
!DEC$ ENDIF
	integer*4 security 
!DEC$ ATTRIBUTES VALUE ::   security 
	Logical*4 reset 
!DEC$ ATTRIBUTES VALUE ::   reset 
	Logical*4 init_state 
!DEC$ ATTRIBUTES VALUE ::   init_state 
	integer*4 string 
!DEC$ ATTRIBUTES VALUE ::   string 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function CreateMutex(security, owner, string)
!DEC$ ATTRIBUTES DEFAULT :: CreateMutex
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_CreateMutexA@12' :: CreateMutex
!DEC$ ELSE
      integer*4 function CreateMutex(security, owner, string)
!DEC$ ATTRIBUTES DEFAULT :: CreateMutex
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'CreateMutexA'    :: CreateMutex
!DEC$ ENDIF
	integer*4 security 
!DEC$ ATTRIBUTES VALUE ::   security 
	logical*4 owner 
!DEC$ ATTRIBUTES VALUE ::   owner 
	integer*4 string 
!DEC$ ATTRIBUTES VALUE ::   string 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function CreateProcess                                  &
     &  (lpApplicationName, lpCommandLine, lpProcessAttributes,         &
     &  lpThreadAttributes, bInheritHandles, dwCreationFlags,           &
     &  lpEnvironment, lpCurrentDirectory, lpStartupInfo,               &
     &  lpProcessInformation)
!DEC$ ATTRIBUTES DEFAULT :: CreateProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_CreateProcessA@40' :: CreateProcess
!DEC$ ELSE
      logical*4 function CreateProcess                                  &
     &  (lpApplicationName, lpCommandLine, lpProcessAttributes,         &
     &  lpThreadAttributes, bInheritHandles, dwCreationFlags,           &
     &  lpEnvironment, lpCurrentDirectory, lpStartupInfo,               &
     &  lpProcessInformation)
!DEC$ ATTRIBUTES DEFAULT :: CreateProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'CreateProcessA'    :: CreateProcess
!DEC$ ENDIF
	integer*4 lpApplicationName 
!DEC$ ATTRIBUTES VALUE ::   lpApplicationName 
	integer*4 lpCommandLine 
!DEC$ ATTRIBUTES VALUE ::   lpCommandLine 
	integer*4 lpProcessAttributes 
!DEC$ ATTRIBUTES VALUE ::   lpProcessAttributes 
	integer*4 lpThreadAttributes 
!DEC$ ATTRIBUTES VALUE ::   lpThreadAttributes 
	logical*4 bInheritHandles 
!DEC$ ATTRIBUTES VALUE ::   bInheritHandles 
	integer*4 dwCreationFlags 
!DEC$ ATTRIBUTES VALUE ::   dwCreationFlags 
	integer*4 lpEnvironment 
!DEC$ ATTRIBUTES VALUE ::   lpEnvironment 
	integer*4 lpCurrentDirectory 
!DEC$ ATTRIBUTES VALUE ::   lpCurrentDirectory 
	integer*4 lpStartupInfo 
!DEC$ ATTRIBUTES VALUE ::   lpStartupInfo 
	integer*4 lpProcessInformation 
!DEC$ ATTRIBUTES VALUE ::   lpProcessInformation 
      end
	
!DEC$ IF DEFINED(_X86_)
      integer*4 function CreateSemaphore(security, InitialCount, MaxCount, string)
!DEC$ ATTRIBUTES DEFAULT :: CreateSemaphore
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_CreateSemaphoreA@16' :: CreateSemaphore
!DEC$ ELSE
      integer*4 function CreateSemaphore(security, InitialCount, MaxCount, string)
!DEC$ ATTRIBUTES DEFAULT :: CreateSemaphore
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'CreateSemaphoreA'    :: CreateSemaphore
!DEC$ ENDIF
	integer*4 security 
!DEC$ ATTRIBUTES VALUE ::   security 
	integer*4 InitialCount 
!DEC$ ATTRIBUTES VALUE ::   InitialCount 
	integer*4 MaxCount 
!DEC$ ATTRIBUTES VALUE ::   MaxCount 
	integer*4 string 
!DEC$ ATTRIBUTES VALUE ::   string 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function CreateThread(security, stack, thread_func, argument, flags, thread_id)
!DEC$ ATTRIBUTES DEFAULT :: CreateThread
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_CreateThread@24' :: CreateThread
!DEC$ ELSE
      integer*4 function CreateThread(security, stack, thread_func, argument, flags, thread_id)
!DEC$ ATTRIBUTES DEFAULT :: CreateThread
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'CreateThread'    :: CreateThread
!DEC$ ENDIF
	 integer*4 security 
!DEC$ ATTRIBUTES VALUE ::   security 
	 integer*4 stack 
!DEC$ ATTRIBUTES VALUE ::   stack 
	 external thread_func
	 integer*4 argument 
!DEC$ ATTRIBUTES VALUE ::   argument 
	 integer*4 flags 
!DEC$ ATTRIBUTES VALUE ::   flags 
	 integer*4 thread_id 
!DEC$ ATTRIBUTES REFERENCE ::   thread_id 
      end

FUNCTION GetThreadTimes( &
	hThread, &
	lpCreationTime, &
	lpExitTime, &
	lpKernelTime, &
	lpUserTime)
    integer :: GetThreadTimes ! BOOL
    !DEC$ ATTRIBUTES DEFAULT :: GetThreadTimes
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_GetThreadTimes@20' :: GetThreadTimes
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'GetThreadTimes' :: GetThreadTimes
    !DEC$ ENDIF
 integer hThread ! HANDLE hThread
 integer lpCreationTime ! LPFILETIME lpCreationTime
 integer lpExitTime ! LPFILETIME lpExitTime
 integer lpKernelTime ! LPFILETIME lpKernelTime
 integer lpUserTime ! LPFILETIME lpUserTime
 END FUNCTION

FUNCTION SignalObjectAndWait( &
	hObjectToSignal, &
	hObjectToWaitOn, &
	dwMilliseconds, &
	bAlertable)
    integer :: SignalObjectAndWait ! DWORD
    !DEC$ ATTRIBUTES DEFAULT :: SignalObjectAndWait
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_SignalObjectAndWait@16' :: SignalObjectAndWait
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'SignalObjectAndWait' :: SignalObjectAndWait
    !DEC$ ENDIF
  integer hObjectToSignal ! HANDLE hObjectToSignal
  integer hObjectToWaitOn ! HANDLE hObjectToWaitOn
  integer dwMilliseconds ! DWORD dwMilliseconds
  integer bAlertable ! BOOL bAlertable
 END FUNCTION

FUNCTION TryEnterCriticalSection( &
	lpCriticalSection)
    integer :: TryEnterCriticalSection ! BOOL
    !DEC$ ATTRIBUTES DEFAULT :: TryEnterCriticalSection
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_TryEnterCriticalSection@4' :: TryEnterCriticalSection
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'TryEnterCriticalSection' :: TryEnterCriticalSection
    !DEC$ ENDIF
 integer lpCriticalSection ! LPCRITICAL_SECTION lpCriticalSection
 END FUNCTION

!DEC$ IF DEFINED(_X86_)
      subroutine DeleteCriticalSection (object)
!DEC$ ATTRIBUTES DEFAULT :: DeleteCriticalSection
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_DeleteCriticalSection@4' ::  DeleteCriticalSection
!DEC$ ELSE
      subroutine DeleteCriticalSection (object)
!DEC$ ATTRIBUTES DEFAULT :: DeleteCriticalSection
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'DeleteCriticalSection'   ::  DeleteCriticalSection
!DEC$ ENDIF
	integer*4 object 
!DEC$ ATTRIBUTES VALUE ::   object 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function DuplicateHandle                                &
     &  (hSourceProcessHandle, hSourceHandle,                           &
     &  hTargetProcessHandle, lpTargetHandle,                           &
     &  dwDesiredAccess, bInheritHandle, dwOptions)
!DEC$ ATTRIBUTES DEFAULT :: DuplicateHandle
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_DuplicateHandle@28' :: DuplicateHandle
!DEC$ ELSE
      logical*4 function DuplicateHandle                                &
     &  (hSourceProcessHandle, hSourceHandle,                           &
     &  hTargetProcessHandle, lpTargetHandle,                           &
     &  dwDesiredAccess, bInheritHandle, dwOptions)
!DEC$ ATTRIBUTES DEFAULT :: DuplicateHandle
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'DuplicateHandle'    :: DuplicateHandle
!DEC$ ENDIF
	integer*4 hSourceProcessHandle 
!DEC$ ATTRIBUTES VALUE ::   hSourceProcessHandle 
	integer*4 hSourceHandle 
!DEC$ ATTRIBUTES VALUE ::   hSourceHandle 
	integer*4 hTargetProcessHandle 
!DEC$ ATTRIBUTES VALUE ::   hTargetProcessHandle 
	integer*4 lpTargetHandle 
!DEC$ ATTRIBUTES REFERENCE ::   lpTargetHandle 
	integer*4 dwDesiredAccess 
!DEC$ ATTRIBUTES VALUE ::   dwDesiredAccess 
	logical*4 bInheritHandle 
!DEC$ ATTRIBUTES VALUE ::   bInheritHandle 
	integer*4 dwOptions 
!DEC$ ATTRIBUTES VALUE ::   dwOptions 
      end
!DEC$ IF DEFINED(_X86_)
      subroutine EnterCriticalSection (object)
!DEC$ ATTRIBUTES DEFAULT :: EnterCriticalSection
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_EnterCriticalSection@4' ::  EnterCriticalSection
!DEC$ ELSE
      subroutine EnterCriticalSection (object)
!DEC$ ATTRIBUTES DEFAULT :: EnterCriticalSection
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'EnterCriticalSection'   ::  EnterCriticalSection
!DEC$ ENDIF
      integer*4 object 
!DEC$ ATTRIBUTES VALUE ::   object 
      end
!DEC$ IF DEFINED(_X86_)
      subroutine ExitProcess (ExitCode)
!DEC$ ATTRIBUTES DEFAULT :: ExitProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_ExitProcess@4' ::  ExitProcess
!DEC$ ELSE
      subroutine ExitProcess (ExitCode)
!DEC$ ATTRIBUTES DEFAULT :: ExitProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'ExitProcess'   ::  ExitProcess
!DEC$ ENDIF
      integer*4 ExitCode 
!DEC$ ATTRIBUTES VALUE ::   ExitCode 
      end
!DEC$ IF DEFINED(_X86_)
      subroutine ExitThread (ExitCode)
!DEC$ ATTRIBUTES DEFAULT :: ExitThread
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_ExitThread@4' ::  ExitThread
!DEC$ ELSE
      subroutine ExitThread (ExitCode)
!DEC$ ATTRIBUTES DEFAULT :: ExitThread
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'ExitThread'   ::  ExitThread
!DEC$ ENDIF
      integer*4 ExitCode 
!DEC$ ATTRIBUTES VALUE ::   ExitCode 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function GetCurrentProcess ()
!DEC$ ATTRIBUTES DEFAULT :: GetCurrentProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_GetCurrentProcess@0' :: GetCurrentProcess
!DEC$ ELSE
      integer*4 function GetCurrentProcess ()
!DEC$ ATTRIBUTES DEFAULT :: GetCurrentProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'GetCurrentProcess'   :: GetCurrentProcess
!DEC$ ENDIF
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function GetCurrentProcessId ()
!DEC$ ATTRIBUTES DEFAULT :: GetCurrentProcessId
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_GetCurrentProcessId@0' :: GetCurrentProcessId
!DEC$ ELSE
      integer*4 function GetCurrentProcessId ()
!DEC$ ATTRIBUTES DEFAULT :: GetCurrentProcessId
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'GetCurrentProcessId'   :: GetCurrentProcessId
!DEC$ ENDIF
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function GetCurrentThread ()
!DEC$ ATTRIBUTES DEFAULT :: GetCurrentThread
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_GetCurrentThread@0' :: GetCurrentThread
!DEC$ ELSE
      integer*4 function GetCurrentThread ()
!DEC$ ATTRIBUTES DEFAULT :: GetCurrentThread
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'GetCurrentThread'   :: GetCurrentThread
!DEC$ ENDIF
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function GetCurrentThreadId ()
!DEC$ ATTRIBUTES DEFAULT :: GetCurrentThreadId
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_GetCurrentThreadId@0' :: GetCurrentThreadId
!DEC$ ELSE
      integer*4 function GetCurrentThreadId ()
!DEC$ ATTRIBUTES DEFAULT :: GetCurrentThreadId
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'GetCurrentThreadId'   :: GetCurrentThreadId
!DEC$ ENDIF
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function GetExitCodeProcess(hProcess, lpExitCode)
!DEC$ ATTRIBUTES DEFAULT :: GetExitCodeProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_GetExitCodeProcess@8' :: GetExitCodeProcess
!DEC$ ELSE
      logical*4 function GetExitCodeProcess(hProcess, lpExitCode)
!DEC$ ATTRIBUTES DEFAULT :: GetExitCodeProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS: 'GetExitCodeProcess' :: GetExitCodeProcess
!DEC$ ENDIF
	integer*4 hProcess 
!DEC$ ATTRIBUTES VALUE ::   hProcess 
	integer*4 lpExitCode 
!DEC$ ATTRIBUTES REFERENCE ::   lpExitCode 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function GetExitCodeThread(hThread, lpExitCode)
!DEC$ ATTRIBUTES DEFAULT :: GetExitCodeThread
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_GetExitCodeThread@8' :: GetExitCodeThread
!DEC$ ELSE
      logical*4 function GetExitCodeThread(hThread, lpExitCode)
!DEC$ ATTRIBUTES DEFAULT :: GetExitCodeThread
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'GetExitCodeThread'   :: GetExitCodeThread
!DEC$ ENDIF
	integer*4 hThread 
!DEC$ ATTRIBUTES VALUE ::   hThread 
	integer*4 lpExitCode 
!DEC$ ATTRIBUTES REFERENCE ::   lpExitCode 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function GetLastError ()
!DEC$ ATTRIBUTES DEFAULT :: GetLastError
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_GetLastError@0' :: GetLastError
!DEC$ ELSE
      integer*4 function GetLastError ()
!DEC$ ATTRIBUTES DEFAULT :: GetLastError
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'GetLastError'   :: GetLastError
!DEC$ ENDIF
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function GetPriorityClass (hProcess)
!DEC$ ATTRIBUTES DEFAULT :: GetPriorityClass
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_GetPriorityClass@4' :: GetPriorityClass
!DEC$ ELSE
      integer*4 function GetPriorityClass (hProcess)
!DEC$ ATTRIBUTES DEFAULT :: GetPriorityClass
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'GetPriorityClass'   :: GetPriorityClass
!DEC$ ENDIF
	integer*4 hProcess 
!DEC$ ATTRIBUTES VALUE ::   hProcess 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function GetThreadPriority (hThread)
!DEC$ ATTRIBUTES DEFAULT :: GetThreadPriority
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_GetThreadPriority@4' :: GetThreadPriority
!DEC$ ELSE
      integer*4 function GetThreadPriority (hThread)
!DEC$ ATTRIBUTES DEFAULT :: GetThreadPriority
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'GetThreadPriority'   :: GetThreadPriority
!DEC$ ENDIF
	integer*4 hThread 
!DEC$ ATTRIBUTES VALUE ::   hThread 
      end
!DEC$ IF DEFINED(_X86_)
      subroutine InitializeCriticalSection (object)
!DEC$ ATTRIBUTES DEFAULT :: InitializeCriticalSection
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_InitializeCriticalSection@4' ::  InitializeCriticalSection
!DEC$ ELSE
      subroutine InitializeCriticalSection (object)
!DEC$ ATTRIBUTES DEFAULT :: InitializeCriticalSection
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'InitializeCriticalSection'   ::  InitializeCriticalSection
!DEC$ ENDIF
      integer*4 object 
!DEC$ ATTRIBUTES VALUE ::   object 
      end
!DEC$ IF DEFINED(_X86_)
      subroutine LeaveCriticalSection (object)
!DEC$ ATTRIBUTES DEFAULT :: LeaveCriticalSection
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_LeaveCriticalSection@4' ::  LeaveCriticalSection
!DEC$ ELSE
      subroutine LeaveCriticalSection (object)
!DEC$ ATTRIBUTES DEFAULT :: LeaveCriticalSection
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'LeaveCriticalSection'   ::  LeaveCriticalSection
!DEC$ ENDIF
      integer*4 object 
!DEC$ ATTRIBUTES VALUE ::   object 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function OpenEvent(dwDesiredAccess, bInheritHandle, lpName)
!DEC$ ATTRIBUTES DEFAULT :: OpenEvent
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_OpenEventA@12' :: OpenEvent
!DEC$ ELSE
      integer*4 function OpenEvent(dwDesiredAccess, bInheritHandle, lpName)
!DEC$ ATTRIBUTES DEFAULT :: OpenEvent
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'OpenEventA'    :: OpenEvent
!DEC$ ENDIF
      integer*4 dwDesiredAccess 
!DEC$ ATTRIBUTES VALUE ::   dwDesiredAccess 
      logical*4 bInheritHandle 
!DEC$ ATTRIBUTES VALUE ::   bInheritHandle 
      integer*4 lpName 
!DEC$ ATTRIBUTES VALUE ::   lpName 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function OpenMutex(dwDesiredAccess, bInheritHandle, lpName)
!DEC$ ATTRIBUTES DEFAULT :: OpenMutex
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_OpenMutexA@12' :: OpenMutex
!DEC$ ELSE
      integer*4 function OpenMutex(dwDesiredAccess, bInheritHandle, lpName)
!DEC$ ATTRIBUTES DEFAULT :: OpenMutex
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'OpenMutexA'    :: OpenMutex
!DEC$ ENDIF
      integer*4 dwDesiredAccess 
!DEC$ ATTRIBUTES VALUE ::   dwDesiredAccess 
      logical*4 bInheritHandle 
!DEC$ ATTRIBUTES VALUE ::   bInheritHandle 
      integer*4 lpName 
!DEC$ ATTRIBUTES VALUE ::   lpName 
      end
      
!DEC$ IF DEFINED(_X86_)
      integer*4 function OpenProcess(dwDesiredAccess, bInheritHandle, IdProcess)
!DEC$ ATTRIBUTES DEFAULT :: OpenProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_OpenProcess@12' :: OpenProcess
!DEC$ ELSE
      integer*4 function OpenProcess(dwDesiredAccess, bInheritHandle, IdProcess)
!DEC$ ATTRIBUTES DEFAULT :: OpenProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'OpenProcess'    :: OpenProcess
!DEC$ ENDIF
      integer*4 dwDesiredAccess 
!DEC$ ATTRIBUTES VALUE ::   dwDesiredAccess 
      logical*4 bInheritHandle 
!DEC$ ATTRIBUTES VALUE ::   bInheritHandle 
      integer*4 IdProcess 
!DEC$ ATTRIBUTES VALUE ::   IdProcess 
      end
      
!DEC$ IF DEFINED(_X86_)
      integer*4 function OpenSemaphore(dwDesiredAccess, bInheritHandle, lpName)
!DEC$ ATTRIBUTES DEFAULT :: OpenSemaphore
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_OpenSemaphoreA@12' :: OpenSemaphore
!DEC$ ELSE
      integer*4 function OpenSemaphore(dwDesiredAccess, bInheritHandle, lpName)
!DEC$ ATTRIBUTES DEFAULT :: OpenSemaphore
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'OpenSemaphoreA'    :: OpenSemaphore
!DEC$ ENDIF
      integer*4 dwDesiredAccess 
!DEC$ ATTRIBUTES VALUE ::   dwDesiredAccess 
      logical*4 bInheritHandle 
!DEC$ ATTRIBUTES VALUE ::   bInheritHandle 
      integer*4 lpName 
!DEC$ ATTRIBUTES VALUE ::   lpName 
      end
      
!DEC$ IF DEFINED(_X86_)
      logical*4 function PulseEvent (hEvent)
!DEC$ ATTRIBUTES DEFAULT :: PulseEvent
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_PulseEvent@4' :: PulseEvent
!DEC$ ELSE
      logical*4 function PulseEvent (hEvent)
!DEC$ ATTRIBUTES DEFAULT :: PulseEvent
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'PulseEvent'   :: PulseEvent
!DEC$ ENDIF
	integer*4 hEvent 
!DEC$ ATTRIBUTES VALUE ::   hEvent 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function ReleaseMutex (dwhandle)
!DEC$ ATTRIBUTES DEFAULT :: ReleaseMutex
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_ReleaseMutex@4' :: ReleaseMutex
!DEC$ ELSE
      logical*4 function ReleaseMutex (dwhandle)
!DEC$ ATTRIBUTES DEFAULT :: ReleaseMutex
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'ReleaseMutex'   :: ReleaseMutex
!DEC$ ENDIF
	integer*4 dwhandle 
!DEC$ ATTRIBUTES VALUE ::   dwhandle 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function ReleaseSemaphore(dwhandle, ReleaseCount, LpPreviousCount)
!DEC$ ATTRIBUTES DEFAULT :: ReleaseSemaphore
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_ReleaseSemaphore@12' :: ReleaseSemaphore
!DEC$ ELSE
      logical*4 function ReleaseSemaphore(dwhandle, ReleaseCount, LpPreviousCount)
!DEC$ ATTRIBUTES DEFAULT :: ReleaseSemaphore
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'ReleaseSemaphore'    :: ReleaseSemaphore
!DEC$ ENDIF
	integer*4 dwhandle 
!DEC$ ATTRIBUTES VALUE ::   dwhandle 
	integer*4 ReleaseCount 
!DEC$ ATTRIBUTES VALUE ::   ReleaseCount 
	integer*4 LpPreviousCount 
!DEC$ ATTRIBUTES REFERENCE ::   LpPreviousCount 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function ResetEvent (hEvent)
!DEC$ ATTRIBUTES DEFAULT :: ResetEvent
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_ResetEvent@4' :: ResetEvent
!DEC$ ELSE
      logical*4 function ResetEvent (hEvent)
!DEC$ ATTRIBUTES DEFAULT :: ResetEvent
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'ResetEvent'   :: ResetEvent
!DEC$ ENDIF
       integer*4 hEvent  
!DEC$ ATTRIBUTES VALUE ::   hEvent 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function ResumeThread (hThread)
!DEC$ ATTRIBUTES DEFAULT :: ResumeThread
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_ResumeThread@4' :: ResumeThread
!DEC$ ELSE
      integer*4 function ResumeThread (hThread)
!DEC$ ATTRIBUTES DEFAULT :: ResumeThread
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'ResumeThread'   :: ResumeThread
!DEC$ ENDIF
	integer*4 hThread 
!DEC$ ATTRIBUTES VALUE ::   hThread 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function SetEvent (dwhandle)
!DEC$ ATTRIBUTES DEFAULT :: SetEvent
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_SetEvent@4' :: SetEvent
!DEC$ ELSE
      logical*4 function SetEvent (dwhandle)
!DEC$ ATTRIBUTES DEFAULT :: SetEvent
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'SetEvent'   :: SetEvent
!DEC$ ENDIF
	integer*4 dwhandle 
!DEC$ ATTRIBUTES VALUE ::   dwhandle 
      end
!DEC$ IF DEFINED(_X86_)
      subroutine SetLastError (dwErrorCode)
!DEC$ ATTRIBUTES DEFAULT :: SetLastError
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_SetLastError@4' ::  SetLastError
!DEC$ ELSE
      subroutine SetLastError (dwErrorCode)
!DEC$ ATTRIBUTES DEFAULT :: SetLastError
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'SetLastError'   ::  SetLastError
!DEC$ ENDIF
      integer*4 dwErrorCode 
!DEC$ ATTRIBUTES VALUE ::   dwErrorCode 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function SetPriorityClass(hProcess,dwPriority)
!DEC$ ATTRIBUTES DEFAULT :: SetPriorityClass
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_SetPriorityClass@8' :: SetPriorityClass
!DEC$ ELSE
      logical*4 function SetPriorityClass(hProcess,dwPriority)
!DEC$ ATTRIBUTES DEFAULT :: SetPriorityClass
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'SetPriorityClass'   :: SetPriorityClass
!DEC$ ENDIF
	integer*4 hProcess 
!DEC$ ATTRIBUTES VALUE ::   hProcess 
	integer*4 dwPriority 
!DEC$ ATTRIBUTES VALUE ::   dwPriority 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function SetThreadPriority(hThread, nPriority)
!DEC$ ATTRIBUTES DEFAULT :: SetThreadPriority
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_SetThreadPriority@8' :: SetThreadPriority
!DEC$ ELSE
      logical*4 function SetThreadPriority(hThread, nPriority)
!DEC$ ATTRIBUTES DEFAULT :: SetThreadPriority
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'SetThreadPriority'   :: SetThreadPriority
!DEC$ ENDIF
	integer*4 hThread 
!DEC$ ATTRIBUTES VALUE ::   hThread 
	integer*4 nPriority 
!DEC$ ATTRIBUTES VALUE ::   nPriority 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function SuspendThread (hThread)
!DEC$ ATTRIBUTES DEFAULT :: SuspendThread
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_SuspendThread@4' :: SuspendThread
!DEC$ ELSE
      integer*4 function SuspendThread (hThread)
!DEC$ ATTRIBUTES DEFAULT :: SuspendThread
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'SuspendThread'   :: SuspendThread
!DEC$ ENDIF
	integer*4 hThread 
!DEC$ ATTRIBUTES VALUE ::   hThread 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function TerminateProcess(hProcess, uExitCode)
!DEC$ ATTRIBUTES DEFAULT :: TerminateProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_TerminateProcess@8' :: TerminateProcess
!DEC$ ELSE
      logical*4 function TerminateProcess(hProcess, uExitCode)
!DEC$ ATTRIBUTES DEFAULT :: TerminateProcess
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'TerminateProcess'   :: TerminateProcess
!DEC$ ENDIF
	integer*4 hProcess 
!DEC$ ATTRIBUTES VALUE ::   hProcess 
	integer*4 uExitCode 
!DEC$ ATTRIBUTES VALUE ::   uExitCode 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function TerminateThread(hThread, dwExitCode)
!DEC$ ATTRIBUTES DEFAULT :: TerminateThread
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_TerminateThread@8' :: TerminateThread
!DEC$ ELSE
      logical*4 function TerminateThread(hThread, dwExitCode)
!DEC$ ATTRIBUTES DEFAULT :: TerminateThread
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'TerminateThread'   :: TerminateThread
!DEC$ ENDIF
	integer*4 hThread 
!DEC$ ATTRIBUTES VALUE ::   hThread 
	integer*4 dwExitCode 
!DEC$ ATTRIBUTES VALUE ::   dwExitCode 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function TlsAlloc ()
!DEC$ ATTRIBUTES DEFAULT :: TlsAlloc
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_TlsAlloc@0' :: TlsAlloc
!DEC$ ELSE
      integer*4 function TlsAlloc ()
!DEC$ ATTRIBUTES DEFAULT :: TlsAlloc
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'TlsAlloc'   :: TlsAlloc
!DEC$ ENDIF
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function TlsFree (dwTlsIndex)
!DEC$ ATTRIBUTES DEFAULT :: TlsFree
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_TlsFree@4' :: TlsFree
!DEC$ ELSE
      logical*4 function TlsFree (dwTlsIndex)
!DEC$ ATTRIBUTES DEFAULT :: TlsFree
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'TlsFree'   :: TlsFree
!DEC$ ENDIF
	integer*4 dwTlsIndex 
!DEC$ ATTRIBUTES VALUE ::   dwTlsIndex 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function TlsGetValue (dwTlsIndex)
!DEC$ ATTRIBUTES DEFAULT :: TlsGetValue
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_TlsGetValue@4' :: TlsGetValue
!DEC$ ELSE
      integer*4 function TlsGetValue (dwTlsIndex)
!DEC$ ATTRIBUTES DEFAULT :: TlsGetValue
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'TlsGetValue'   :: TlsGetValue
!DEC$ ENDIF
      integer*4 dwTlsIndex 
!DEC$ ATTRIBUTES VALUE ::   dwTlsIndex 
      end
!DEC$ IF DEFINED(_X86_)
      logical*4 function TlsSetValue (dwTlsIndex, lpTlsVal)
!DEC$ ATTRIBUTES DEFAULT :: TlsSetValue
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_TlsSetValue@8' :: TlsSetValue
!DEC$ ELSE
      logical*4 function TlsSetValue (dwTlsIndex, lpTlsVal)
!DEC$ ATTRIBUTES DEFAULT :: TlsSetValue
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'TlsSetValue'   :: TlsSetValue
!DEC$ ENDIF
      integer*4 dwTlsIndex 
!DEC$ ATTRIBUTES VALUE ::   dwTlsIndex 
      integer*4 lpTlsVal 
!DEC$ ATTRIBUTES VALUE ::   lpTlsVal 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function WaitForMultipleObjects(Count, LpHandles, WaitAll, Mseconds)
!DEC$ ATTRIBUTES DEFAULT :: WaitForMultipleObjects
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_WaitForMultipleObjects@16' :: WaitForMultipleObjects
!DEC$ ELSE
      integer*4 function WaitForMultipleObjects(Count, LpHandles, WaitAll, Mseconds)
!DEC$ ATTRIBUTES DEFAULT :: WaitForMultipleObjects
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'WaitForMultipleObjects'    :: WaitForMultipleObjects
!DEC$ ENDIF
	integer*4 Count 
!DEC$ ATTRIBUTES VALUE ::   Count 
	integer*4 LpHandles (*)
!DEC$ ATTRIBUTES REFERENCE ::   LpHandles 
	logical*4 WaitAll 
!DEC$ ATTRIBUTES VALUE ::   WaitAll 
	integer*4 Mseconds 
!DEC$ ATTRIBUTES VALUE ::   Mseconds 
      end
!DEC$ IF DEFINED(_X86_)
      integer*4 function WaitForSingleObject(dwhandle, Mseconds)
!DEC$ ATTRIBUTES DEFAULT :: WaitForSingleObject
!DEC$ ATTRIBUTES STDCALL, ALIAS: '_WaitForSingleObject@8' :: WaitForSingleObject
!DEC$ ELSE
      integer*4 function WaitForSingleObject(dwhandle, Mseconds)
!DEC$ ATTRIBUTES DEFAULT :: WaitForSingleObject
!DEC$ ATTRIBUTES STDCALL, ALIAS:  'WaitForSingleObject'   :: WaitForSingleObject
!DEC$ ENDIF
	integer*4 dwhandle 
!DEC$ ATTRIBUTES VALUE ::   dwhandle 
	integer*4 Mseconds 
!DEC$ ATTRIBUTES VALUE ::   Mseconds 
      end
      end interface
      INTEGER CREATE_NEW_CONSOLE
      INTEGER CREATE_NO_WINDOW
      INTEGER CREATE_NEW_PROCESS_GROUP
      INTEGER CREATE_SUSPENDED
      INTEGER DEBUG_PROCESS
      INTEGER DEBUG_ONLY_THIS_PROCESS
      INTEGER DETACHED_PROCESS
      INTEGER DUPLICATE_CLOSE_SOURCE
      INTEGER DUPLICATE_SAME_ACCESS
      INTEGER ERROR_INVALID_HANDLE
      INTEGER ERROR_ALREADY_EXISTS
      INTEGER EVENT_ALL_ACCESS
      INTEGER EVENT_MODIFY_STATE
      INTEGER FILE_MAP_ALL_ACCESS
      INTEGER FILE_MAP_READ
      INTEGER FILE_MAP_WRITE
      INTEGER GENERIC_READ
      INTEGER GENERIC_WRITE
      INTEGER HIGH_PRIORITY_CLASS
      INTEGER IDLE_PRIORITY_CLASS
      INTEGER INFINITE
      INTEGER MAXCHAR
      INTEGER MAX_COMPUTERNAME_LENGTH
      INTEGER MAXIMUM_SUSPEND_COUNT
      INTEGER MAXIMUM_WAIT_OBJECTS
      INTEGER MAXLONG
      INTEGER MAX_PATH
      INTEGER MUTANT_QUERY_STATE
      INTEGER MUTANT_ALL_ACCESS
      INTEGER MUTEX_ALL_ACCESS
      INTEGER NORMAL_PRIORITY_CLASS
      INTEGER PAGE_READWRITE
      INTEGER PROCESS_ALL_ACCESS
      INTEGER PROCESS_CREATE_PROCESS
      INTEGER PROCESS_CREATE_THREAD
      INTEGER PROCESS_DUP_HANDLE
      INTEGER PROCESS_QUERY_INFORMATION
      INTEGER PROCESS_SET_INFORMATION
      INTEGER PROCESS_TERMINATE
      INTEGER PROCESS_VM_OPERATION
      INTEGER PROCESS_VM_READ
      INTEGER PROCESS_VM_WRITE
      INTEGER REAL_TIME_PRIORITY_CLASS
      INTEGER SECTION_MAP_ALL_ACCESS
      INTEGER SECTION_QUERY
      INTEGER SECTION_EXTEND_SIZE
      INTEGER SECTION_MAP_EXECUTE
      INTEGER SECTION_MAP_READ
      INTEGER SECTION_MAP_WRITE
      INTEGER SEMAPHORE_ALL_ACCESS
      INTEGER SEMAPHORE_MODIFY_STATE
      INTEGER STANDARD_RIGHTS_REQUIRED
      INTEGER STATUS_PENDING
      INTEGER STATUS_TIMEOUT
      INTEGER STD_INPUT_HANDLE
      INTEGER STD_OUTPUT_HANDLE
      INTEGER STILL_ACTIVE
      INTEGER SYNCHRONIZE
      INTEGER THREAD_ALL_ACCESS
      INTEGER THREAD_BASE_PRIORITY_IDLE
      INTEGER THREAD_BASE_PRIORITY_LOWRT
      INTEGER THREAD_BASE_PRIORITY_MAX
      INTEGER THREAD_BASE_PRIORITY_MIN
      INTEGER THREAD_DIRECT_IMPERSONATION
      INTEGER THREAD_GET_CONTEXT
      INTEGER THREAD_IMPERSONATE
      INTEGER THREAD_PRIORITY_ABOVE_NORMAL
      INTEGER THREAD_PRIORITY_BELOW_NORMAL
      INTEGER THREAD_PRIORITY_HIGHEST
      INTEGER THREAD_PRIORITY_IDLE
      INTEGER THREAD_PRIORITY_LOWEST
      INTEGER THREAD_PRIORITY_NORMAL
      INTEGER THREAD_PRIORITY_ERROR_RETURN
      INTEGER THREAD_PRIORITY_TIME_CRITICAL
      INTEGER THREAD_QUERY_INFORMATION
      INTEGER THREAD_SET_CONTEXT
      INTEGER THREAD_SET_INFORMATION
      INTEGER THREAD_SET_THREAD_TOKEN
      INTEGER THREAD_SUSPEND_RESUME
      INTEGER THREAD_TERMINATE
      INTEGER TLS_MINIMUM_AVAILABLE
      INTEGER WAIT_FAILED
      INTEGER WAIT_INFINITE
      INTEGER WAIT_TIMEOUT
      PARAMETER (CREATE_NEW_CONSOLE = #10)
      PARAMETER (CREATE_NO_WINDOW = #8000000)
      PARAMETER (CREATE_NEW_PROCESS_GROUP = #200)
      PARAMETER (CREATE_SUSPENDED = #4)
      PARAMETER (DEBUG_PROCESS = #1)
      PARAMETER (DEBUG_ONLY_THIS_PROCESS = #2)
      PARAMETER (DETACHED_PROCESS = #8)
      PARAMETER (DUPLICATE_CLOSE_SOURCE = #1)
      PARAMETER (DUPLICATE_SAME_ACCESS = #2)
      PARAMETER (ERROR_INVALID_HANDLE = 6)
      PARAMETER (ERROR_ALREADY_EXISTS = 183)
      PARAMETER (EVENT_ALL_ACCESS = #1F0003)
      PARAMETER (EVENT_MODIFY_STATE = #2)
      PARAMETER (FILE_MAP_ALL_ACCESS = #F000F)
      PARAMETER (FILE_MAP_READ = #4)
      PARAMETER (FILE_MAP_WRITE = #2)
      PARAMETER (GENERIC_READ = #80000000)
      PARAMETER (GENERIC_WRITE = #40000000)
      PARAMETER (HIGH_PRIORITY_CLASS = #80)
      PARAMETER (IDLE_PRIORITY_CLASS = #40)
      PARAMETER (INFINITE = #FFFFFFFF)
      PARAMETER (MAXCHAR = #7F)
      PARAMETER (MAX_COMPUTERNAME_LENGTH = 15)
      PARAMETER (MAXIMUM_SUSPEND_COUNT = #7F)
      PARAMETER (MAXIMUM_WAIT_OBJECTS = 64)
      PARAMETER (MAXLONG = #7FFFFFFF)
      PARAMETER (MAX_PATH = 260)
      PARAMETER (MUTANT_QUERY_STATE = #1)
      PARAMETER (MUTANT_ALL_ACCESS = #1F0001)
      PARAMETER (MUTEX_ALL_ACCESS = #1F0001)
      PARAMETER (NORMAL_PRIORITY_CLASS = #20)
      PARAMETER (PAGE_READWRITE = #4)
      PARAMETER (PROCESS_ALL_ACCESS = #1F0FFF)
      PARAMETER (PROCESS_CREATE_PROCESS = #80)
      PARAMETER (PROCESS_CREATE_THREAD = #2)
      PARAMETER (PROCESS_DUP_HANDLE = #40)
      PARAMETER (PROCESS_QUERY_INFORMATION = #400)
      PARAMETER (PROCESS_SET_INFORMATION = #200)
      PARAMETER (PROCESS_TERMINATE = #1)
      PARAMETER (PROCESS_VM_OPERATION = #8)
      PARAMETER (PROCESS_VM_READ = #10)
      PARAMETER (PROCESS_VM_WRITE = #20)
      PARAMETER (REAL_TIME_PRIORITY_CLASS = #100)
      PARAMETER (SECTION_MAP_ALL_ACCESS = #F000F)
      PARAMETER (SECTION_QUERY = #1)
      PARAMETER (SECTION_EXTEND_SIZE = #10)
      PARAMETER (SECTION_MAP_EXECUTE = #8)
      PARAMETER (SECTION_MAP_READ = #4)
      PARAMETER (SECTION_MAP_WRITE = #2)
      PARAMETER (SEMAPHORE_ALL_ACCESS = #1F0003)
      PARAMETER (SEMAPHORE_MODIFY_STATE = #2)
      PARAMETER (STANDARD_RIGHTS_REQUIRED = #F0000)
      PARAMETER (STATUS_PENDING = #103)
      PARAMETER (STATUS_TIMEOUT = #102)
      PARAMETER (STD_INPUT_HANDLE = -10)
      PARAMETER (STD_OUTPUT_HANDLE = -11)
      PARAMETER (STILL_ACTIVE = #103)
      PARAMETER (SYNCHRONIZE = #100000)
      PARAMETER (THREAD_ALL_ACCESS = #1F03FF)
      PARAMETER (THREAD_BASE_PRIORITY_IDLE = -15)
      PARAMETER (THREAD_BASE_PRIORITY_LOWRT = 15)
      PARAMETER (THREAD_BASE_PRIORITY_MAX = 2)
      PARAMETER (THREAD_BASE_PRIORITY_MIN = -2)
      PARAMETER (THREAD_DIRECT_IMPERSONATION = #200)
      PARAMETER (THREAD_GET_CONTEXT = #8)
      PARAMETER (THREAD_IMPERSONATE = #100)
      PARAMETER (THREAD_PRIORITY_ABOVE_NORMAL = 1)
      PARAMETER (THREAD_PRIORITY_BELOW_NORMAL = -1)
      PARAMETER (THREAD_PRIORITY_HIGHEST = 2)
      PARAMETER (THREAD_PRIORITY_IDLE = -15)
      PARAMETER (THREAD_PRIORITY_LOWEST = -2)
      PARAMETER (THREAD_PRIORITY_NORMAL = 0)
      PARAMETER (THREAD_PRIORITY_ERROR_RETURN = #7FFFFFFF)
      PARAMETER (THREAD_PRIORITY_TIME_CRITICAL = 15)
      PARAMETER (THREAD_QUERY_INFORMATION = #40)
      PARAMETER (THREAD_SET_CONTEXT = #10)
      PARAMETER (THREAD_SET_INFORMATION = #20)
      PARAMETER (THREAD_SET_THREAD_TOKEN = #80)
      PARAMETER (THREAD_SUSPEND_RESUME = #2)
      PARAMETER (THREAD_TERMINATE = #1)
      PARAMETER (TLS_MINIMUM_AVAILABLE = 64)
      PARAMETER (WAIT_FAILED = #FFFFFFFF)
      PARAMETER (WAIT_INFINITE = -1)
      PARAMETER (WAIT_TIMEOUT = #102)
      STRUCTURE /PROCESS_INFORMATION/
      integer*4 hProcess 
      integer*4 hThread
      integer*4 dwProcessId
      integer*4 dwThreadId
      END STRUCTURE
      STRUCTURE /RTL_CRITICAL_SECTION_DEBUG/
      integer*4 Type 
      integer*4 CreatorBackTraceIndex
      integer*4 Address
      integer*4 ProcessLocksList
      integer*4 EntryCount
      integer*4 ContentionCount
      integer*4 Depth
      integer*4 OwnerBackTrace(5)
      END STRUCTURE
      STRUCTURE /RTL_CRITICAL_SECTION/
      integer*4 Address 
      integer*4 LockCount
      integer*4 RecursionCount
      integer*4 OwningThread
      integer*4 LockSemaphore
      integer*4 Reserved
      END STRUCTURE
      STRUCTURE /SECURITY_ATTRIBUTES/
      integer*4 nLength 
      integer*4 lpSecurityDescriptor
      logical*4 bInheritHandle
      END STRUCTURE
      STRUCTURE /STARTUPINFO/
      integer*4 cb
      integer*4 lpReserved
      integer*4 lpDesktop
      integer*4 lpTitle
      integer*4 dwX
      integer*4 dwY
      integer*4 dwXSize
      integer*4 dwYSize
      integer*4 dwXCountChars
      integer*4 dwYCountChars
      integer*4 dwFillAttribute
      integer*4 dwFlags
      integer*2 wShowWindow
      integer*2 cbReserved2
      integer*4 lpReserved2
      integer*4 hStdInput
      integer*4 hStdOutput
      integer*4 hStdError
      END STRUCTURE
!DEC$ IF .NOT. DEFINED(__DFMT_INCLUDE)
END MODULE DFMT
!DEC$ ENDIF
