Function
Sets Extended events.
Format
Ret = SmcWIrqEvent( Id , AxisNo , hWnd , EventMode , EventType )
Parameters
Id
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
SSpecify the Deice ID retrieved by SmcWInit
function.
AxisNo
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Specify axis number.
hWnd
[ VB.NET: IntPtr ] [ C, C++: HWND ] [ C#: IntPtr ] [ Python: ctypes.wintypes.HANDLE
]
Specify the window handle who activates the event.
EventMode
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Set the event to valid/invalid.
0 |
Invalidates the event |
1 |
Validates the event |
EventType
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Sets the extension events raise an event.
0 |
When an event occurs by latching the count input LTC (input events LTC) |
Return Value
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Remarks
Events occur in the event of specified factors EventType.
If the event generation function is executed once, the event is generated every time the factor is generated afterwards.It is not necessary to execute it two or more times excluding the purpose to stop the event.
The message number is fixation.
The message of message number "8704H" is done in the specified
window handle when the LTC
input event is generated and PostMessage is done.
The following information enters wParam and
lParam that is the parameter of the message respectively.
LOWORD(wParam)=ID acquired in SmcWInit function.
LOWORD(lParam)=Axis number.
- HIWORD and LOWORD show high word and low word respectively.
Example
Input LTC event is set to axis number 1.
VB.NET
Dim Ret As Integer
Ret = SmcWIrqEvent( Id , 1 , Handle , 1 , 0)
C, C++
long Ret;
Ret = SmcWIrqEvent( Id , 1 , hWnd , 1 , 0);
C#
int Ret;
Ret = Smc.WIrqEvent( Id , 1 , hWnd , 1 , 0);
Python
Ret = ctypes.c_long()
Ret.value = csmc.SmcWIrqEvent( Id , 1 , hWnd , 1 , 0)