Milguide Command
Milguide Command
This section provides an overview of each MIL module and a brief description of each MIL command. For a complete description
of the syntax and use of each command, refer to the MIL Command Reference manual.
Command parameters
Description
McodeAlloc()
McodeControl()
McodeFree()
CodeId
McodeGetResult()
McodeInquire()
McodeRead()
McodeRestore()
McodeSave()
McodeStream()
MemPtrOrFileName, SystemId
Operation, StreamType, Version
ControlFlag, CodeIdPtr, SizeByteVarPtr
McodeVerify()
McodeWrite()
Encoding Type
Error Correction
BC412
No error correction
Codabar
No error correction
Code39
Code93
ASCII encoding
Code128 (UCC/EAN128)
ASCII encoding
Continued...
Encoding Type
Error Correction
DataMatrix
10, 40, 50, 60, 70, 80,90, 100, 110, 120, 130,
AlphaNumericPunc encoding,
AlphaNumeric encoding,
ASCII encoding, IS08 encoding
EAN8
Numeric encoding
EAN13
Numeric encoding
Interleaved 2/5
Numeric encoding
Maxicode
Encoding mode 2, 3, 4, 5, 6
MicroPDF417
PDF417
Pharma
Numeric encoding
No error correction
Planet
Numeric encoding
Postnet
Numeric encoding
QR
RSS
UPC-A
Numeric encoding
UPC-E
Numeric encoding
Command parameters
Description
MappAlloc()
InitFlag, ApplicationIdPtr
MappAllocDefault()
MappControl()
ControlType, ControlFlag
MappFree()
ApplicationId
MappFreeDefault()
MappGetError()
ErrorType, ErrorPtr
MappGetHookInfo()
MappHookFunction()
HookType, HookHandlerPtr,
ExpansionFlag
MappInquire()
InquireType, UserVarPtr
MappTimer()
ControlValue, TimePtr
MsysAlloc()
MsysControl()
MsysFree()
SystemId
Free a system.
MsysHookFuntion()
MsysInquire()
Command parameters
Description
MblobAllocFeatureList()
SystemId, FeatureListIdPtr
MblobAllocResult()
SystemId, BlobResIdPtr
MblobCalculate()
BlobIdentImageId, GrayImageId,
FeatureListId, BlobResId
MblobControl()
MblobDraw()
MblobFill()
MblobFree()
BlobId
MblobGetLabel()
MblobGetNumber()
BlobResId, CountVarPtr
MblobGetResult()
MblobGetResultSingle()
MblobGetRuns()
MblobInquire()
MblobLabel()
MblobReconstruct()
SrcImageBufId, SeedImageBufId,
DestImageBufId, Operation, ProcMode
MblobSelect()
MblobSelectFeature()
FeatureListId, Feature
MblobSelectFeret()
FeatureListId, Angle
MblobSelectMoment()
10
Blob features
For the MblobSelectFeature() command, the feature(s) that can be calculated include(s):
M_AREA, the number of foreground pixels in a blob.
M_BOX_X_MIN, M_BOX_Y_MIN, M_BOX_X_MAX, M_BOX_Y_MAX, the coordinates of the extreme left, top, right and bottom pixels, respectively, of a blob.
M_BREADTH, a measure of the true breadth of an object.
M_CHAIN_INDEX, this is the index which differentiates chains in a blob.
M_CHAIN_Y, M_CHAIN_X, these are the x and y coordinates of each chained pixel.
M_COMPACTNESS, a minimum for a circle (1.0) and is derived from the perimeter and area.
M_CONVEX_PERIMETER, an approximation of the perimeter of the convex hull of a blob.
M_ELONGATION, equal to M_LENGTH over M_BREADTH.
M_EULER_NUMBER, the number of blobs minus the number of holes.
M_FERET_X, M_FERET_Y, the dimensions of the minimum bounding box of a blob in the horizontal and vertical directions (respectively).
M_FERET_MIN_DIAMETER, the smallest Feret diameter found after checking a certain number of angles.
M_FERET_MIN_ANGLE, the angle at which the minimum Feret diameter is found.
M_FERET_MAX_DIAMETER, the largest Feret diameter found after checking a certain number of angles.
M_FERET_MAX_ANGLE, the angle at which the maximum Feret diameter is found.
M_FERET_MEAN_DIAMETER, the average Feret diameter at all the angles checked.
M_FERET_ELONGATION, a measure of the shape of a blob.
M_FIRST_POINT_X, M_FIRST_POINT_Y, a unique point for each object, which is always on the perimeter of the object.
M_INTERCEPT _0, _45, _90, _135, the number of times that a transition from background to foreground occurs at the given
angle for the entire blob.
M_LABEL_VALUE, the label value for each blob in an image.
M_LENGTH, a measure of the true length of an object.
M_NUMBER_OF_CHAINED_PIXELS, this is the number of chained pixels for all blobs or a specified blob.
M_NUMBER_OF_HOLES, the number of holes in a blob.
M_NUMBER_OF_RUNS, the total number of horizontal strings of consecutive foreground pixels in a blob.
M_PERIMETER, the total length of edges in a blob (including the edges of any holes).
M_ROUGHNESS, a measure of how rough a blob is.
M_X_MIN_AT_Y_MIN, M_X_MAX_AT_Y_MAX, M_Y_MIN_AT_X_MAX, M_Y_MAX_AT_X_MIN, these values, together with the four
box coordinates, give four contact points on the convex perimeter of the object.
For a grayscale image:
M_MEAN_PIXEL, the mean pixel value in a blob.
M_MIN_PIXEL, the minimum pixel value found in a blob.
M_MAX_PIXEL, the maximum pixel value found in a blob.
M_SIGMA_PIXEL, the standard deviation of pixel values in a blob.
M_SUM_PIXEL, the sum of all pixel values in a blob.
M_SUM_PIXEL_SQUARED, the sum of the squares of each pixel value in a blob.
The following features have two different definitions: a binary one, where all pixels are considered equal; and a grayscale one,
where pixels are weighted by their value in the gray scale image.
M_CENTER_OF_GRAVITY_X, the x position of the center of gravity of a blob.
M_CENTER_OF_GRAVITY_Y, the y position of the center of gravity of a blob.
M_MOMENT_Xn_Ym and M_MOMENT_CENTRAL_Xn_Ym for central moments; coordinates are relative to each blobs center of
gravity; ordinary moments use coordinates relative to the image origin.
M_AXIS_PRINCIPAL_ANGLE, the angle at which a blob has the least moment of inertia.
M_AXIS_SECONDARY_ANGLE, the angle perpendicular to M_AXIS_PRINCIPAL_ANGLE.
The following predefined values let the user select groups of features in a single call:
M_BOX, adds all 4 box features plus x and y Ferets.
M_CONTACT_POINTS, adds first point and other contact features.
M_CENTER_OF_GRAVITY, adds both x and y coordinates of the center of gravity.
M_ALL_FEATURES, adds all features (except general Feret and general moment).
M_NO_FEATURES, removes all features (except label value).
M_CHAINS, adds all 4 chain features.
You can add the following sorting options to a feature to specify it as a sorting key during result retrieval:
M_SORTn_DOWN, specifies the feature as the nth sorting key (in a descending order) where n is an integer between 1 and 3.
M_SORTn_UP, specifies the feature as the nth sorting key (in an ascending order) where n is an integer between 1 and 3.
M_NO_SORT, removes the specified sorting key.
11
Command parameters
Description
MbufAlloc1d()
MbufAlloc2d()
MbufAllocColor()
MbufBayer()
SrcImageBufId, DestImageBufId,
Decode the color information of a single-band,
WhiteBalanceCoefficientsID, ControlFlag Bayer color-encoded image.
MbufChild1d()
MbufChild2d()
MbufChildColor()
MbufChildColor2d()
MbufChildMove()
MbufClear()
DestImageBufId, Color
MbufControl()
MbufControlNeighborhood()
MbufControlRegion()
MbufCopy()
SrcBufId, DestBufId
MbufCopyClip()
MbufCopyColor()
MbufCopyColor2d()
MbufCopyCond()
MbufCopyMask()
MbufCreateColor()
MbufCreate2d()
MbufDiskInquire()
MbufExport()
MbufExportSequence()
MbufFree()
BufId
MbufGet1d()
12
Command parameters
Description
MbufGet2d()
MbufGet()
SrcBufId, UserArrayPtr
MbufGetArc()
MbufGetColor()
MbufGetColor2d()
MbufGetHookInfo()
MbufHookFunction()
MbufGetLine()
MbufImport()
MbufImportSequence()
MbufInquire()
MbufLoad()
FileName, BufId
MbufPut()
DestBufId, UserArrayPtr
MbufPutColor()
MbufPutColor2d()
MbufPutLine()
MbufPut1d()
MbufPut2d()
MbufRestore()
MbufSave()
FileName, BufId
MbufTransfer()
MgenLutFunction()
MgenLutRamp()
MgenWrapParameters()
InWarpParameter, OutXLutOrCoef,
OutYLut, OperationMode, Transform,
Val1, Val2
13
Calibration module
Used to convert coordinates or measurements from pixel to real-world units, as well as to correct distortions in an image.
Commands
Command parameters
Description
McalAlloc()
McalAssociate()
to/from
CalibrationId, ImageOrDigitizerId,
McalControl()
CalibrationId, ControlType,
ControlValue
McalFree()
CalibrationId
McalGrid()
CalibrationId, SrcImageBufId,
GridOffsetX, GridOffsetY,
GridOffsetZ, RowNumber,
ColumnNumber, RowSpacing,
ColumnSpacing, Mode, ModeFlag
McalInquire()
CalibrationOrMilId, InquireType,
UserVarPtr
McalList()
CalibrationId, XPixArray,
YPixArray, XWorldArray,
YWorldArray, ZWorld, NumPoint,
Mode, ModeFlag
McalRelativeOrigin()
McalRestore()
FileName, ControlFlag,
CalibrationIdPtr
McalSave()
FileName, CalibrationId,
ControlFlag
McalStream()
MemPtrOrFileName, SystemId,
Operation, StreamType, Version,
ControlFlag, CalibrationIdPtr
SizeByteVarPtr
McalTransformCoordinate()
CalibrationOrMilId, TransformType, X,
Y, ResXPtr, ResYPtr
McalTransformCoordinateList()
CalibrationOrMilId, TransfromType,
NumPoints, SrcXPtr, SrcYPtr,
ResXPtr, ResYPtr
McalTransformImage()
SrcImageBufId, DestImageBufId,
CalibrationId, InterpolationMode,
OperationType, ControlFlag
McalTransformResult()
CalibrationOrMilId, TransformType,
ResultType, Result, ResResult
14
Digitizer module
Used to initialize and control a digitizer (image capture device). This module includes control of capture mode (trigger,
frame/field, blocking/non-blocking), image scaling and cropping, input channel, input LUT, analog settings (references, hue,
saturation, and brightness) as well as events for callback functions.
Commands
Command parameters
Description
MdigAlloc()
Allocate a digitizer.
MdigChannel()
DigId, Channel
MdigControl()
MdigFocus()
DigId, DestImageBufId,
Adjust a cameras lens motor to a position which
FocusImageRegionBufId, FocusHookPtr, provides optimum focus.
UserDataPtr, MinPosition, StartPosition,
MaxPosition, MaxPositionVariation,
ProcMode, ResultPtr
MdigFree()
DigId
Free a digitizer.
MdigGrab()
ScrDigId, DestImageBufId
MdigGrabContinuous()
DigId, DestImageBufId
MdigGrabWait()
DigId, Flag
MdigHalt()
DigId
MdigHookFunction()
MdigInquire()
MdigLut()
DigId, LutBufId
MdigProcess()
MdigReference()
Display module
Used to initialize and control an image display. This module includes control of image display windows, graphics overlay, output
LUT, image pan, scroll, and zoom.
Commands
Command parameters
Description
MdispAlloc()
Allocate a display.
MdispControl()
MdispFree()
DisplayId
Free a display.
MdispHookFunction()
MdispInquire()
MdispLut()
DisplayId, LutBufId
MdispPan()
MdispSelect()
DisplayId, ImageBufId
MdispSelectWindow()
DisplayId, ImageBufId,
ClientWindowHandle
MdispZoom()
Zoom a display.
15
Command parameters
Description
MedgeAlloc()
MedgeAllocResult()
MedgeCalculate()
ContextId, SourceImageId,
Perform edge extraction and feature
SourceDeriv1Id, SourceDeriv2Id,
calculations.
SourceDeriv3Id, EdgeResultId, ControlFlag
MedgeControl()
ContextOrResultId, ControlType,
ControlValue
MedgeDraw()
MedgeFree()
ObjectId
MedgeGetNeighbors()
EdgeResultId, SizeOfArray, SrcArrayXPtr Get edgels from an Edge Finder result buffer
SrcArrayYPtr, SrcArrayAnglePtr,
that are the closest neighbors to a list of
DstArrayXPtr, DstArrayYPtr,
user-specified point coordinates.
DstArrayIndexPtr, DstArrayLabelPtr,
ControlFlag
MedgeGetResult()
EdgeResultId, EdgeIndexOrLabelValue,
ResultType, FirstResultArrayPtr,
SecondResultArrayPtr
MedgeInquire()
ContextOrResultId, InquireType,
UserVarPtr
MedgeMask()
MedgeRestore()
MedgeSave()
FileName, ContextOrResultId,
ControlFlag
MedgeSelect()
MedgeStream()
MemPtrOrFileName, SystemId,
Operation, StreamType, Version,
ControlFlag, ContextOrResultIdPtr,
SizeByteVarPtr
Edge features
For the MedgeGetResults() command, the feature(s) that can be calculated include(s):
M_AVERAGE_STRENGTH, returns the average strength value of each edge.
M_BOX_X_MAX, returns the X-coordinate of each edge's right-most edgel.
M_BOX_X_MIN, returns the X-coordinate of each edge's left-most edgel.
M_BOX_Y_MAX, returns the Y-coordinate of each edge's bottom-most edgel.
M_BOX_Y_MIN, returns the Y-coordinate of each edge's top-most edgel.
M_BULGES, returns the bulge values between vertices.
M_CENTER_OF_GRAVITY, returns the coordinates of each edge's center of gravity.
M_CENTER_OF_GRAVITY_X, returns the X-coordinate of each edge's center of gravity.
M_CENTER_OF_GRAVITY_Y, returns the Y-coordinate of each edge's center of gravity.
M_CIRCLE_FIT_CENTER_X, returns the X-coordinate of the center of the circle that is the best fit for each edge.
M_CIRCLE_FIT_CENTER_Y, returns the Y-coordinate of the center of the circle that is the best fit for each edge.
Continued...
16
17
Command parameters
Description
MfuncAlloc()
FunctionName, ParameterNumber,
SlaveFunctionPtr, Reserved1,
Reserved2, SlaveFunctionOpcode,
InitFlag, FuncIdPtr
MfuncAllocId()
MfuncCall()
FunctionId
MfuncErrorReport()
MfuncFree()
FunctionId
MfuncFreeId()
FunctionId, ObjectId
MfuncInquire()
MfuncParamCheck()
FunctionId
MfuncParamDouble()
MfuncParamId()
MfuncParamIdPointer()
MfuncParamLong()
MfuncParamPointer()
MfuncParamString()
MfuncParamValue()
FunctionId, ParamIndex, ParamValuePtr Read the value of the specified MIL function
parameter.
18
Command parameters
Description
MmodAlloc()
SystemId, ModelFinderType,
ControlFlag, ContextIdPtr
MmodAllocResult()
MmodControl()
MmodDefine()
MmodDefineFromFile()
MmodDraw()
GraphContId, ContextOrResultId,
DestImageId, Operation, Index,
ControlFlag
MmodFind()
ContextId, TargetImageId,
ModResultId
MmodFree()
ObjectId
MmodGetResult()
MmodInquire()
MmodMask()
MmodPreprocess()
ContextId, ControlFlag
MmodRestore()
MmodSave()
MmodStream()
MemPtrOrFileName, SystemId,
Operation, StreamType, Version
ControlFlag, ContextIdPtr,
SizeByteVarPtr
19
Graphics module
Used to create drawings and text annotations in an image. This module provides a set of graphics primitives (arc, circle, line,
and rectangle), control of color (foreground, background, fill), and text (font, color, size).
Commands
Command parameters
Description
MgraAlloc()
SystemId, GraphContIdPtr
MgraArc()
GraphContId, DestImageBufId,
XCenter, YCenter, XRad,
YRad, StartAngle, EndAngle
Draw an arc.
MgraArcFill()
GraphContId, DestImageBufId,
XCenter, YCenter, XRad, YRad,
StartAngle, EndAngle
MgraBackColor()
GraphContId, BackgroundColor
MgraClear()
GraphContId, DestImageBufId
MgraColor()
GraphContId, ForegroundColor
MgraControl()
MgraDot()
Draw a dot.
MgraDots()
GraphContId, DestImageBufId,
NumberOfDots, XPosArray, YPosArray,
ControlFlag
MgraFill()
GraphContId, DestImageBufId,
XStart, YStart
MgraFont()
GraphContId, FontName
MgraFontScale()
MgraFree()
GraphContId
MgraInquire()
GraphContId, InquireType,
UserVarPtr
MgraLine()
Draw a line.
MgraLines()
GraphContId, DestImageBufId,
NumberOfLines, XStartArray,
YStartArray, XEndArray, YEndArray
ControlFlag
MgraRect()
Draw a rectangle.
MgraRectFill()
MgraText()
Write text.
20
Command parameters
Description
MimAllocResult()
MimArith()
Src1ImageBufId, Src2ImageBufId,
DestImageBufId, Operation
MimArithMultiple()
Src1ImageBufId, Src2ImageBufId,
Src3ImageBufId, Src4ImageBufId,
Src5ImageBufId, DestImageBufId,
Operation, OperationFlag
MimBinarize()
SrcImageBufId, DestImageBufId,
Condition, CondLow, CondHigh
MimClip()
SrcImageBufId, DestImageBufId,
Condition, CondLow, CondHigh,
WriteLow, WriteHigh
MimClose()
SrcImageBufId, DestImageBufId,
NbIteration, ProcMode
MimConnectMap()
SrcImageBufId, DestImageBufId,
LutBufld
MimConvert()
SrcImageId, DestImageId,
ConversionType
MimConvolve()
SrcImageBufId, DestImageBufId,
KernelBufId
MimCountDifference()
Src1ImageBufId, Src2ImageBufId,
ImResultId
MimDeinterlace()*
ContextId, SrcImageArrayPtr,
DstImageArrayPtr, SrcImageCount,
DstImageCount, ControlFlag
MimDilate()
SrcImageBufId, DestImageBufId,
NbIteration, ProcMode
MimDistance()
ScrImageBufld, DestImageBufld,
DistanceTransform
MimEdgeDetect()
MimErode()
SrcImageBufId, DestImageBufId,
NbIteration, ProcMode
MimFindExtreme()
SrcImageBufId, ExtremeImResultld,
ExtremeType
MimFlip()
MimFree()
ImResultId
MimGetResult()
MimGetResult1d()
MimHistogram()
SrcImageBufId, HistImResultId
21
Command parameters
Description
MimHistogramEqualize()
SrcImageBufId, DestImageBufId,
Method, Alpha, Min, Max
MimInquire()
MimLabel()
SrcImageBufId, DestImageBufId,
ProcMode
MimLocateEvent()
SrcImageBufId, EventImResultId,
Condition, CondLow, CondHigh
MimLutMap()
SrcImageBufId, DestImageBufId,
LutBufId
MimMorphic()
SrcImageBufId, DestImageBufld,
StructElemBufId, Operation,
NBIteration, ProcMode
MimOpen()
SrcImageBufId, DestImageBufId,
NbIteration, ProcMode
MimPolarTransform()
SrcImageBufId, DestImageBufId,
CenterPosX, CenterPosY, StartRadius,
EndRadius, StartAngle, EndAngle,
OperationMode, InterpolationMode,
DestSizeXPtr, DestSizeYPtr
MimProject()
SrcImageBufId, ProjImResultId,
ProjAngle
MimRank()
SrcImageBufId, DestImageBufId,
StructElemBufId, Rank, ProcMode
MimResize()
SrcImageBufId, DestImageBufId,
ScaleFactorX, ScaleFactorY,
InterpolationMode
Resize an image.
MimRotate()
SrcImageBufId, DestImageBufId,
Angle, SrcCenX, SrcCenY, DstCenX,
DstCenY, InterpolationMode
Rotate an image.
MimShift()
SrcImageBufId, DestImageBufId,
BitsToShift
MimStat()
MimThick()
SrcImageBufId, DestImageBufId
NbIteration, ProcMode
MimThin()
SrcImageBufId, DestImageBufId
NbIteration, ProcMode
MimTransform()
SrcImageRBufId, SrcImageIBufId,
DestImageRBufId, DestImageIBufId
TransformType, ControlFlag
MimTranslate()
SrcImageBufId, DestImageBufId,
XDisplacement, YDisplacement,
InterpolationMode
MimWarp()
SrcImageId, DestImageId,
WarpParam1Id, WarpParam2Id,
OperationMode, InterpolationType
Perform a warping.
MimWatershed
SrcImageId, MarkerImageId,
DestImageId, MinimumVariation,
ControlFlag
MimZoneOfInfluence()
SrcImageBufld, DestImageBufld,
OperationFlag
22
Measurement module
Used to locate and measure edges or stripes within an image. Also used to take measurements between points, edges, or
stripes. This module includes functions to save or restore markers (i.e., points, edges, or stripes).
Commands
Command parameters
Description
MmeasAllocContext()
MmeasAllocMarker()
MmeasAllocResult()
MmeasCalculate()
MmeasControl()
MmeasDraw()
GraphContId, MarkerOrResultId,
DestImageId, Operation, Index,
ControlFlag
MmeasFindMarker()
MmeasFree()
Measld
MmeasGetResult()
MarkerOrMeasResultld, ResultType,
Get the results of measurements taken.
FirstResultArrayPtr, SecondResultArrayPtr
MmeasGetResultSingle()
MarkerOrMeasResultId, ResultType,
FirstResultArrayPtr,
SecondResultArrayPtr, ResultIndex
MmeasInquire()
MmeasRestoreMarker()
MmeasSaveMarker()
MmeasSetMarker()
Markerld, CharacteristicToSet,
FirstValue, SecondValue
23
OCR module
Template-based character recognition module. This module includes control of character font definition, as well as font
archiving and retrieving.
Commands
Command parameters
Description
MocrAllocFont()
MocrAllocResult()
MocrCalibrateFont()
MocrControl()
MocrCopyFont()
MocrFree()
FontldOrResultld
MocrGetResult()
MocrHookFunction()
MocrImportFont()
MocrInquire()
Fontld, InquireItem,UserVarPtr
MocrModifyFont()
MocrPreprocess()
Fontld, ControlFlag
MocrReadString()
MocrRestoreFont()
MocrSaveFont()
MocrSetConstraint()
MocrVerifyString()
24
Command parameters
Description
MpatAllocAutoModel()
MpatAllocModel()
MpatAllocResult()
MpatAllocRotatedModel()
MpatCopy()
MpatDraw()
GraphContId, ModelOrResultId,
DestImageId, Operation, Index,
ControlFlag
MpatFindModel()
MpatFindMultipleModel()
MpatFree()
PatId
MpatGetNumber()
PatResultId, CountPtr
MpatGetResult()
MpatInquire()
MpatPreprocModel()
MpatRead()
MpatRestore()
MpatSave()
FileName, ModelId
MpatSetAcceptance()
ModelId, AcceptanceThreshold
MpatSetAccuracy()
ModelId, Accuracy
MpatSetAngle()
MpatSetCenter()
MpatSetCertainty()
ModelId, CertaintyThreshold
MpatSetDontCare()
MpatSetNumber()
ModelId, NbOccurences
MpatSetPosition()
MpatSetSearchParameter()
MpatSetSpeed()
ModelId, SpeedFactor
MpatWrite()
FileHandle, ModelId
25
Command parameters
Description
MstrAlloc()
MstrAllocResult()
MstrControl()
MstrDraw()
GraphContId, ContextOrResultID,
DestImageId, Operation, Index, CharList
ControlFlag
MstrEditFont()
MstrFree()
ObjectId
MstrGetResult()
MstrInquire()
MstrPreprocess()
ContextId, ControlFlag
MstrRead()
MstrRestore()
MstrSave()
MstrSetConstraint()
MstrStream()
MemPtrOrFileName, SystemId,
Load, restore, or save a String Reader context
Operation, StreamType, Version
from/to a file or a memory.
ControlFlag, ObjectIdPtr, SizeByteVarPtr
26
Thread module
Used for the allocation of MIL thread contexts and synchronization events. This module allows control over the created MIL
thread contexts and events, inquire about various settings, and synchronize execution of multiple threads.
Commands
Command parameters
Description
MthrAlloc()
MthrControl()
ThreadOrEventId, ControlType,
ControlValue
MthrFree()
ThreadOrEventId
MthrInquire()
ThreadOrEventId, InquireType,
InquireValue
MthrWait()
27