Attribute VB_Name = "MLDECS32" '---------------------------------------------------------------------------------------- ' ' File: MLDECS32.BAS ' ' Author: Roberto Raso ' Date: 23rd November 1995 ' '---------------------------------------------------------------------------------------- ' ' Purpose: This module should be included if using MASSLYNX.BAS ' and MassLynx v2.2 32-bit ' '---------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------- ' ' Constant/Global declarations. ' '---------------------------------------------------------------------------------------- Option Explicit Global Const MASSLYNX_VERSION = 2.2 Const MODULE_NAME = "MLDECS32.BAS" Const NUM_APPLICATIONS = 25 'DmGetHandle function options Global Const DM_DISCARDABLE = 1 Global Const DM_SWAPABLE = 2 Global Const DM_CREATE = 4 Global Const DM_FROZEN = 8 'Data type definitions Global Const DM_RAW_SPEC = 2 Global Const DM_RAW_SPEC_MASS = 0 Global Const DM_RAW_SPEC_INT = 1 'Datafile types for DM Global Const DM_RAW = 0 'DmGetData function options Global Const DM_REFRESH = 1 Global Const DM_NOKEEP = 2 'Status codes Global Const DM_OK = 0 Global Const DM_ERR = -1 '---------------------------------------------------------------------------------------- ' ' Data type declarations. ' '---------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------- ' ' Function declarations. ' '---------------------------------------------------------------------------------------- Declare Function AIFileName Lib "ml_vb32.dll" () As String Declare Function AISampleNumber Lib "ml_vb32.dll" () As Integer Declare Function AIScanStatus Lib "ml_vb32.dll" () As Integer Declare Function AIScanNumber Lib "ml_vb32.dll" () As Integer Declare Function BroFileOpen Lib "dm32.dll" (ByVal hWnd As Long, lpsInfo As VGRAWFILE, dwFlags As Long, ByVal szTitle As String) As Integer Declare Function DmRawIsDADFunction Lib "dm32.dll" Alias "_DmRawIsDadFunction@8" (sVGRawFile As VGRAWFILE, ByVal nFunc As Integer) As Integer Declare Function DmRawIsAnalogTraceDesc Lib "dm32.dll" Alias "_DmRawIsAnalogTraceDesc@4" (ByVal strTrace As String) As Integer Declare Sub DmRawClose Lib "dm32.dll" Alias "_DmRawClose@0" () Declare Function DmRawReadHeaderVB Lib "dm32.dll" Alias "_DmRawReadHeaderVB@8" (LPVGRAWFILE As VGRAWFILE, lpDMRawHeader As DMRAWHEADER) As Integer Declare Function DmRawReadScanStatsVB Lib "dm32.dll" Alias "_DmRawReadScanStatsVB@16" (LPVGRAWFILE As VGRAWFILE, ByVal dwScanNumber As Long, ByVal wCalibrate As Integer, lpDmRawStats As DMRAWSTATS) As Integer Declare Function DmRawReadSpectrumVB Lib "dm32.dll" Alias "_DmRawReadSpectrumVB@28" (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 "dm32.dll" Alias "_DmRawScansInFunction@4" (lpRawFile As VGRAWFILE) As Long Declare Function DmRawScanToTime Lib "dm32.dll" (lpRawFile As VGRAWFILE, ByVal dwScan As Long) As Single Declare Function DmRawTimeToScan Lib "dm32.dll" Alias "_DmRawTimeToScan@8" (lpRawFile As VGRAWFILE, ByVal fRetTime As Single) As Long Declare Function GetGlobalString Lib "ml_vb32.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 "ml_vb32.dll" (ByVal szParagraph As String, ByVal szKey As String, ByVal lDefault As Long, lResult As Long) As Integer Declare Function GetGlobalDouble Lib "ml_vb32.dll" (ByVal szParagraph As String, ByVal szKey As String, lfDefault As Double, lfResult As Double) As Integer Declare Function GetGlobalFile Lib "ml_vb32.dll" (ByVal szParagraph As String, ByVal szKey As String, sDefault As VGFILE, szResult As VGFILE) As Integer Declare Sub GetMassLynxWorkingDir Lib "ml_vb32.dll" (ByVal lpString As String) Declare Function GetApplicationWnd Lib "ml_vb32.dll" (ByVal nAppCode As Integer) As Long Declare Function GetGlobalDialogWnd Lib "genutil.dll" (ByVal wDialogCode As Integer) As Integer Declare Function IsMassLynxEnabled Lib "ml_vb32.dll" () As Integer Declare Function SetGlobalFile Lib "ml_vb32.dll" (ByVal szParagraph As String, ByVal szKey As String, sNew As VGFILE, ByVal wAppend As Integer) As Integer Declare Function GetSampleListFileVB Lib "ml_vb32.dll" Alias "_GetSampleListFileVB@4" (lpsFile As VGRAWFILE) As Long Declare Function Combine Lib "Combin32.dll" Alias "_Combine@24" (ByVal hWnd As Long, ByVal hDm As Long, lpFileA As VGRAWFILE, lpFileBC As Any, lpParam As COMB_PARAM, ByVal wFlags As Integer) As Integer Declare Function MassMeasureSpectrum Lib "Massme32.dll" Alias "_MassMeasureSpectrum@20" (ByVal hWnd As Long, lpRawFile As VGRAWFILE, lpParams As MASS_MEASURE_PARAM, phDm As Any, ByVal bSubtract As Integer) As Integer Declare Function CombineDlgModal Lib "Combin32.dll" Alias "_CombineDlgModal@8" (ByVal hWnd As Long, lpParam As COMB_PARAM) As Integer Declare Function CombineGetIniFile Lib "Combin32.dll" Alias "_CombineGetIniFile@8" (ByVal szPara As String, sCombParam As COMB_PARAM) As Long Declare Function CombineSetIniFile Lib "Combin32.dll" Alias "_CombineSetIniFile@8" (ByVal szPara As String, sCombParam As COMB_PARAM) As Integer Declare Function CombineGetIniRange Lib "Combin32.dll" Alias "_CombineGetIniRange@8" (ByVal szPara As String, sCombParam As COMB_PARAM) As Integer Declare Function CombineSetIniRange Lib "Combin32.dll" Alias "_CombineSetIniRange@8" (ByVal szPara As String, sCombParam As COMB_PARAM) As Integer Declare Function MassMeasureGetIniFile Lib "Massme32.dll" Alias "_MassMeasureGetIniFile@8" (ByVal szPara As String, sMassMeasParams As MASS_MEASURE_PARAM) As Integer Declare Function MassMeasureSetIniFile Lib "Massme32.dll" Alias "_MassMeasureSetIniFile@8" (ByVal szPara As String, sMassMeasParams As MASS_MEASURE_PARAM) As Integer Declare Function MassMeasureEditParam Lib "Massme32.dll" Alias "_MassMeasureEditParam@8" (ByVal hWnd As Long, sMassMeasParams As MASS_MEASURE_PARAM) As Integer Declare Sub DmRawFileToID Lib "dm32.dll" Alias "_DmRawFileToID@8" (lpRawFile As VGRAWFILE, lpRawID As DMRAWIDSPEC) Declare Function DmGetHandle Lib "dm32.dll" Alias "_DmGetHandle@24" (ByVal wTypeID As Integer, ByVal wIDSize As Integer, ByVal szIDInf As String, ByVal wNumData As Integer, ByVal dwEltSize As Long, ByVal wFlags As Integer) As Integer Declare Function DmLockID Lib "dm32.dll" Alias "_DmLockID@4" (ByVal hDm As Long) As Long Declare Function DmUnlockID Lib "dm32.dll" Alias "_DmUnlockID@4" (ByVal hDm As Long) As Integer Declare Function DmReleaseHandle Lib "dm32.dll" Alias "_DmReleaseHandle@8" (ByVal hDm As Long, ByVal wFlags As Integer) As Integer Declare Function DmGetData Lib "dm32.dll" (ByVal hDm As Long, ByVal dwStart As Long, ByVal dwNumber As Long, ByVal wOptions As Integer) As Integer Declare Function DmLockData Lib "dm32.dll" (ByVal hDm As Long, ByVal nID As Long, dwStart As Long, dwNumber As Long) As Long Declare Function DmUnlockData Lib "dm32.dll" (ByVal hDm As Long, ByVal nID As Long) As Integer Declare Function DmRawSaveProcess Lib "dm32.dll" Alias "_DmRawSaveProcess@8" (lpID As DMRAWIDSPEC, ByVal bSave 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 Long MLAppActive = GetApplicationWnd(nMLApp) End Function