Function
Sets the notification of sampling stopping.
Format
Ret = CntNotifySamplingStop ( Id , hWnd )
Parameters
Id
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Specify the device ID retrieved from CntInit.
hWnd
[ VB.NET: IntPtr ] [ C, C++: HWND ] [ C#: IntPtr ] [ Python: ctypes.wintypes.HANDLE
]
Specify the window handle that receives the notification of sampling stopping.
The window handle can be retrieved by m_hWnd for VC.
Specify 0 when using callback without using window message.
Return Value
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
Definition |
Value |
Description |
CNT_ERR_SUCCESS |
0 |
Normality completion |
CNT_ERR_SYS_RECOVERED_FROM_STANDBY |
7 |
Execute the function CntResetDevice to return from the standby mode. |
CNT_ERR_DLL_INVALID_ID |
10001 |
Invalid ID was specified. |
CNT_ERR_DLL_CALL_DRIVER |
10002 |
CNT driver can't be called (Failed in the device I/O control). |
CNT_ERR_DLL_CREATE_THREAD |
10005 |
Failed in the creation of the thread (Failed in CreateThread). |
CNT_ERR_DLL_HWND |
10200 |
Window handle is invalid. |
CNT_ERR_SYS_NOT_SUPPORTED |
20001 |
This function can't be used by this device. |
The others: (See also: Details of Error Code)
Remarks
This function should be executed in the setting stage before sampling starts. The following message is posted to the specified window handle when interrupt occurs.
Definition |
Value |
CNTM_SAMPLING_STOP |
1150H |
The following information
are contained in wParam and lParam that is the parameter of the message
respectively.
LOWORD(wParam)=Device ID Retrieved from CntInit
lParam=The parameter is passed by the driver. It doesn't use it now.
* HIWORD and LOWORD show the high-word and low-word.
Refer to the sample program of each language for the describing details
of message processing.
Interrupt is invalid if CntResetDevice is called.
For
Ethernet devices
If communication with the device is lost, the process will
be unregistered and events will no longer be notified.
If you want to perform event notification again, please make
the settings again using this function.
You can check the registration status of the current process
using the CntGetNetCommunicationInfo
function.
Example
Sets the notification of sampling stopping.
VB.NET |
Dim Ret As Integer |
C, C++ |
long Ret; |
C# |
int Ret; |
Python |
Ret = ctypes.c_long() |
See Also
CntSamplingStopCallbackProc CntGetNetCommunicationInfo