'---------------------------------------------------------------------------------------- ' ' File: MLDECS16.BAS ' ' Author: Roberto Raso ' Date: 23rd November 1995 ' '---------------------------------------------------------------------------------------- ' ' Purpose: This module should be included if using MASSLYNX.BAS ' and MassLynx v2.1 16-bit ' '---------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------- ' ' Constant/Global declarations. ' '---------------------------------------------------------------------------------------- Option Explicit Global Const MASSLYNX_VERSION = 2.1 Const MODULE_NAME = "MLDECS16.BAS" Const NUM_APPLICATIONS = 25 '---------------------------------------------------------------------------------------- ' ' Data type declarations. ' '---------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------- ' ' Function declarations. ' '---------------------------------------------------------------------------------------- Declare Function AIFileName Lib "aihost.dll" () As String Declare Function AISampleNumber Lib "aihost.dll" () As Integer Declare Function AIScanStatus Lib "aihost.dll" () As Integer Declare Function AIScanNumber Lib "aihost.dll" () As Integer Declare Function BroFileOpen Lib "util.dll" (ByVal hWnd As Integer, lpsInfo As VGRAWFILE, dwFlags As Long, ByVal szTitle As String) As Integer Declare Sub DmRawClose Lib "util.dll" () Declare Function DmRawReadHeaderVB Lib "util.dll" (LPVGRAWFILE As VGRAWFILE, lpDMRawHeader As DMRAWHEADER) As Integer Declare Function DmRawReadScanStatsVB Lib "util.dll" (LPVGRAWFILE As VGRAWFILE, ByVal dwScanNumber As Long, ByVal wCalibrate As Integer, lpDmRawStats As DMRAWSTATS) As Integer Declare Function DmRawReadSpectrumVB Lib "util.dll" (LPVGRAWFILE As VGRAWFILE, ByVal dwScanNumber As Long, ByVal wCalibrate As Integer, ByVal dwStartPeak As Long, ByVal dwNumPeaks As Long, lpMass As Single, lpIntensity As Single) As Long Declare Function DmRawScansInFunction Lib "util.dll" (lpRawFile As VGRAWFILE) As Long Declare Function DmRawScanToTime Lib "util.dll" (lpRawFile As VGRAWFILE, ByVal dwScan As Long) As Single Declare Function DmRawTimeToScan Lib "util.dll" (lpRawFile As VGRAWFILE, ByVal fRetTime As Single) As Long Declare Function DmRawIsDADFunction Lib "util.dll" (sVGRawFile As VGRAWFILE, ByVal nFunc As Integer) As Integer Declare Function GetGlobalString Lib "util.dll" (ByVal szParagraph As String, ByVal szKey As String, ByVal szDefault As String, ByVal szResult As String, ByVal nMaxSize As Integer) As Integer Declare Function GetGlobalLong Lib "util.dll" (ByVal szParagraph As String, ByVal szKey As String, ByVal lDefault As Long, lResult As Long) As Integer Declare Function GetGlobalDouble Lib "util.dll" (ByVal szParagraph As String, ByVal szKey As String, lfDefault As Double, lfResult As Double) As Integer Declare Function GetGlobalFile Lib "util.dll" (ByVal szParagraph As String, ByVal szKey As String, sDefault As VGFILE, szResult As VGFILE) As Integer Declare Sub GetMassLynxWorkingDir Lib "util.dll" (ByVal lpString As String) Declare Function GetApplicationInfo Lib "util.dll" (sAppInfo As APPTYPE) As Integer Declare Function GetGlobalDialogWnd Lib "util.dll" (ByVal wDialogCode As Integer) As Integer Declare Function IsMassLynxEnabled Lib "util.dll" () As Integer Declare Function SetGlobalFile Lib "util.dll" (ByVal szParagraph As String, ByVal szKey As String, sNew As VGFILE, ByVal wAppend As Integer) As Integer '---------------------------------------------------------------------------------------- ' ' Process: MLAppActivate ' ' Author: Roberto Raso ' Date: 23rd November 1995 ' ' Purpose: Gets the window handle of a MassLynx application. ' ' Parameters: nMLApp is the ID of the MassLynx application. ' ' Return: The window handle of the MassLynx application, if running. ' '---------------------------------------------------------------------------------------- Function MLAppActive (nMLApp As Integer) As Integer Dim sMLApp() As APPTYPE MLAppActive = 0 ReDim sMLApp(NUM_APPLICATIONS - 1) If GetApplicationInfo(sMLApp(0)) <> 0 Then If sMLApp(nMLApp).lRunning <> 0 Then MLAppActive = sMLApp(nMLApp).hWindowHandle End If End If End Function