Go to documentation repository
To send messages to the system core, use the following function:
BOOL SendMsg (LPCTSTR id, LPCTSTR msg)
Parameters of the SendMsg function:
Parameter | Description | Example |
LPCTSTR id | The connection ID passed in the call to the Connect function | CString port = "900"; CString ip = "127.0.0.1"; CString id = "2"; BOOL IsConnect = Connect(ip, port, id, myfunc); if (!IsConnect) { // connection failed AfxMessageBox("Error"); Return; } SendMsg(id,"CAM|1|REC"); // turn on recording for camera 1 Disconnect (id); |
LPCTSTR msg | Message text |
The function returns TRUE if the message was sent, otherwise FALSE