<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="Adobe RoboHelp 2019" />
<title>LoggerSetNotifyEvent</title>
<link rel="StyleSheet" href="../../../../ms_help.css" type="text/css" />
 <script type="text/javascript" language="JavaScript">
//<![CDATA[
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//]]>
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute;
left:0px;
top:0px;
z-index:4;
visibility:hidden; }
p.WebHelpNavBar { text-align:right; }
-->
</style>

<script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/common.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/constants.js"></script>
<script type="text/javascript" src="../../../../template/scripts/utils.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhutils.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhlang.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhver.js"></script>
<script type="text/javascript" src="../../../../template/scripts/settings.js"></script>
<script type="text/javascript" src="../../../../template/scripts/XmlJsReader.js"></script>
<script type="text/javascript" src="../../../../template/scripts/loadparentdata.js"></script>
<script type="text/javascript" src="../../../../template/scripts/loadscreen.js"></script>
<script type="text/javascript" src="../../../../template/scripts/loadprojdata.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhtopic.js"></script>
 <link rel="stylesheet" type="text/css" href="../../../../template/styles/widgets.min.css">
 <link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css">
<script type="text/javascript" >
gRootRelPath = "../../../..";
gCommonRootRelPath = "../../../..";
gTopicId = "6.1.3.2.0_19";
</script>
 <meta name="brsprev" value="sdk/windows_api/function_reference/acquisition_settings/logger_get_memory_option.htm">
 <meta name="brsnext" value="sdk/windows_api/function_reference/acquisition_settings/logger_get_notify_event.htm">
 <meta name="topic-breadcrumbs" content="C-LOGGER SDK > Windows API > Function Reference > Acquisition Setting" />
</head>

<body>
<script type="text/javascript" src="../../../../ehlpdhtm.js"></script>

<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P45RPFN" style="width: 0px; 
		 height: 0px; display: none; visibility: hidden;">
 <p>&#160;</p>
</iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->


<div><script type="text/javascript" language="javascript">//<![CDATA[
document.write("<p  style=\"text-align:left;\" class=\"breadcrumbs\">");
AddMasterBreadcrumbs("../../../../c_logger.htm", "breadcrumbs", " &gt; ", "Home", "../../../../welcome/c_logger.htm");
document.write("<a class=\"breadcrumbs\" href=\"../../../welcome/c_logger_sdk.htm\">C-LOGGER SDK<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../../windows_api.htm\">Windows API<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../function_list.htm\">Function Reference<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"logger_set_channel_setting.htm\">Acquisition Setting<\/a>  &gt;  LoggerSetNotifyEvent<\/p>");
//]]></script>
</div>

<h1>LoggerSetNotifyEvent</h1>
<hr align="center" />
<h2>Function</h2>
<p style="margin-left: 24px;">Set the callback function to be called when 
 the event occurs.</p>
<h2>Format</h2>
<p class="code" style="margin-left: 24px;">Ret = <span style="font-weight: bold;">LoggerSetNotifyEvent</span> 
 ( AppId , pProc , Event , Param )</p>
<h2>Parameters</h2>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">AppId</span> 
 [ VB.NET: Short ] [ C++: short ] [ C#: short ]&#160;</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">Specify 
 Application ID retrieved by LoggerOpenApplication.</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">pProc 
 </span>[ VB.NET: IntPtr ] [ C++: long * ] [ C#: IntPtr ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">Specify 
 the address of the callback function.</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">Event 
 </span>[ VB.NET: UInteger ]&#160;[ C++: unsigned long ]&#160;[ C#: uint 
 ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">Specify 
 the event factor for which the callback function will be invoked.</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">These 
 bits have the following meanings, and can be specified in combination.</p>
<table style=" margin-top:14px; margin-left:24px; width:100%; max-width:600px;">
	<col style="width: 10%;" />
	<col style="width: 20%;" />
	<col />
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#808080"><p 
			 style="margin-top: 0px; margin-bottom: 0px;"><font color="#FFFFFF"><span 
		 style="color: #ffffff;">Value</span><br />
		[Hex]</font></p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#808080"><p 
			 style="margin-top: 0px; margin-bottom: 0px;"><font color="#FFFFFF">Macro</font></p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#808080"><p 
			 style="margin-top: 0px; margin-bottom: 0px;"><span style="color: #ffffff;">Description</span></p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">0000H</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>LOGGER_PARAM_EVENT_NONE</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>None</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">0001H</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>LOGGER_PARAM_EVENT_START</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>Start 
		 condition satisfied event</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">0010H</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>LOGGER_PARAM_EVENT_RPTEND</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>Repeat 
		 end event</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">0020H</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>LOGGER_PARAM_EVENT_END</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>Device 
		 operation end event</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">0080H</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>LOGGER_PARAM_EVENT_DATANUM</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>Specified 
		 sampling count stored event</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">1000H</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>LOGGER_PARAM_EVENT_OFERR</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>Overflow 
		 event</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">2000H</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>LOGGER_PARAM_EVENT_SCERR</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>Sampling 
		 clock cycle error event</p></td>
	</tr>
</table>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">Param 
 </span>[ VB.NET: IntPtr ] [ C, C++: void * ] [ C#: void * ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">Specify 
 the address of the parameter to be passed to the callback.</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">Specify 
 NULL when you do not use the parameter.</p>
<h2>Return Value</h2>
<p style="margin-bottom: 0; margin-left: 24px;"><span style="font-weight: bold;">Ret</span>&#160;[ 
 VB.NET: Integer ]&#160;[ C++: long ]&#160;[ C#: int ]</p>
<table style="margin-top: 14px; margin-left: 24px;" width="95%">
	<col style="width: 30%;" />
	<col style="width: 10%;" />
	<col style="width: 60%;" />
	<tr>
		<td style="vertical-align: TOP; width: 15%;" bgcolor="#808080"><p 
			 style="color: #ffffff; font-weight: bold; text-align: center;">Definition</p></td>
		<td style="vertical-align: TOP; width: 15%;" bgcolor="#808080"><p 
			 style="font-weight: bold; color: #ffffff; text-align: center; 
			 margin-top: 0pt; margin-bottom: 0pt;">Return code</p>
		<p style="font-weight: bold; color: #ffffff; text-align: center; 
			 margin-top: 0pt; margin-bottom: 0pt;">[Dec]</p></td>
		<td style="vertical-align: TOP; width: 80%;" bgcolor="#808080"><p 
			 style="text-align: center; color: #ffffff; font-weight: bold;">Description</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; width: 15%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;" 
			 bgcolor="#E6E6E6"><p>LOGGER_ERR_SUCCESS</p></td>
		<td style="vertical-align: TOP; width: 15%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;" 
			 bgcolor="#E6E6E6"><p style="text-align: center;">0</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>Normal 
		 completed</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; width: 15%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;" 
			 bgcolor="#E6E6E6"><p>LOGGER_ERR_STARTED</p></td>
		<td style="vertical-align: TOP; width: 15%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;" 
			 bgcolor="#E6E6E6"><p style="text-align: center;">10006</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>Cannot 
		 execute because the device is in operation.</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; width: 15%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;" 
			 bgcolor="#E6E6E6"><p>LOGGER_ERR_INVALID_ID</p></td>
		<td style="vertical-align: TOP; width: 15%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;" 
			 bgcolor="#E6E6E6"><p style="text-align: center;">10010</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>Invalid 
		 AppId was specified.</p></td>
	</tr>
</table>
<p style="margin-bottom: 0; margin-left: 24px;">The others (See also: <a 
	 href="../error_code.htm">Error Code List</a>)</p>
<h2>Initial Value</h2>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;">Nothing 
 in particular.</p>
<h2>Remarks</h2>
<p style="margin-left: 40px; margin-bottom: 0pt;">Register a callback function 
 to be called when an event occurs.</p>
<p style="margin-left: 40px; margin-bottom: 0pt;">The registered callback 
 function is called when the event specified by C-LOGGER occurs.</p>
<p style="margin-left: 40px; margin-bottom: 0pt;">This function cannot 
 be executed if the device is running.</p>
<h2>Example</h2>
<p style="margin-left: 40px;">Registers a callback function for the device 
 operation end, specified number of stored events.</p>
<table style="margin-top: 14pt; margin-left: 24px;" cellspacing="0" width="90%">
	<tr>
		<td style="vertical-align: TOP; width: 10%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">VB.NET</p></td>
		<td style="vertical-align: TOP; width: 89%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">Please refer <a href="../../tutorial/common/notes/note_visual_basic.htm">Note 
		 of Using Visual Basic .NET</a></p>
		<p class="code">&#160;</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; width: 10%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">C++</p></td>
		<td style="vertical-align: TOP; width: 89%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">long Ret;</p>
		<p class="code">Ret = LoggerSetNotifyEvent(AppId, CallBackProc, 
		 LOGGER_PARAM_EVENT_END | LOGGER_PARAM_EVENT_DATANUM, NULL);</p>
		<p class="code">&#160;</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; width: 10%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">C#</p></td>
		<td style="vertical-align: TOP; width: 89%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">Please refer <a href="../../tutorial/common/notes/note_visual_cs.htm">Note 
		 of Using Visual C#</a></p>
		<p class="code">&#160;</p></td>
	</tr>
</table>
<h2>See Also</h2>
<p style="margin-left: 40px;"><a href="logger_get_notify_event.htm">LoggerGetNotifyEvent</a></p>
<p>&#160;</p>
<hr align="center" />
<h1>Callback function</h1>
<h2>Format</h2>
<p class="code" style="margin-left: 24px;">void <span style="font-weight: bold;">CallBackProc</span> 
 ( Id , Event , wParam , lParam , Param )</p>
<h2>Parameters</h2>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">Id</span> 
 [ VB.NET: Short ] [ C++: short ] [ C#: short ]&#160;</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">The 
 application ID obtained by LoggerOpenApplication is passed.</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">Event 
 </span>[ VB.NET: UInteger ]&#160;[ C++: unsigned long ]&#160;[ C#: uint 
 ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">The 
 event cause (Event) specified by the LoggerSetNotifyEvent function is 
 passed.</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">wParam 
 </span>[ VB.NET: Integer ] [ C, C++: WPARAM ] [ C#: int ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">(Reserved)</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">lParam 
 </span>[ VB.NET: Integer ] [ C, C++: LPARAM ] [ C#: int ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">(Reserved)</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">Param 
 </span>[ VB.NET: IntPtr ] [ C, C++: void * ] [ C#: void * ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">The 
 parameter(param) specified in the LoggerSetNotifyEvent function is passed.</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">It contains 
 NULL, when you set the param=NULL on calling LoggerSetNotifyEvent function. 
 </p>
<h2>Return Value</h2>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">None</p>
<p>&#160;</p>
<p>&#160;</p>
<div style="width: 100%; position: relative;" id="footer">
	<hr style="float: aligncenter; " />
	<p>This website uses cookies. By continuing to browse our site you 
	 agree to our <a href="https://www.contec.com/privacy#anc-01">use of 
	 cookies</a>.</p>
</div>
</body>
</html>
