<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="Adobe RoboHelp 2019" />
<title>Init and Exit Processing</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 = "5.1.1.2.1";
</script>
 <meta name="brsprev" value="sdk/windows_api/tutorial/create/Python.htm">
 <meta name="brsnext" value="sdk/windows_api/tutorial/init_exit/visual_basic_net.htm">
 <meta name="topic-breadcrumbs" content="C-WaveformGenerator SDK > Windows API > Tutorial > Common Processing" />
</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_waveformgenerator.htm", "breadcrumbs", " &gt; ", "Home", "../../../../welcome/c_waveformgenerator.htm");
document.write("<a class=\"breadcrumbs\" href=\"../../../welcome/CWaveformGeneratorSDK.htm\">C-WaveformGenerator SDK<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../../windows_api.htm\">Windows API<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../tutorial.htm\">Tutorial<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"init_exit.htm\">Common Processing<\/a>  &gt;  Init and Exit Processing<\/p>");
//]]></script>
</div>

<h1>Init and Exit Processing</h1>
<hr align="center" />
<p>Init and exit processing are common processing that are necessary for 
 all programming.<br />
Init processing is performed by function GenOpenApplication.<br />
This function starts the application and allows access.</p>
<p>There are 3 parameters in function GenOpenApplication.</p>
<p>The first parameter is the device name.<br />
The device name is a string such as &quot;AIO000&quot; registered in the 
 device manager or utility.</p>
<p>The second parameter is the device ID.<br />
The device ID comes from C-WaveformGenerator and you must call all functions 
 of C-WaveformGenerator SDK with this device ID.</p>
<p>The third parameter is the screen status.<br />
Screen status include Minimize, Normal size for each application, and Maximize. 
 For normal size, pass 1 as the parameter.<br />
<br />
If the function completes normally, the return value (Ret) is 0.<br />
If the function fails to execute, a value other than 0 is returned.</p>
<p>Exit processing is performed by function GenCloseApplication.<br />
This function closes the application and disables access.<br />
Please make sure to execute this function before terminating your application.<br />
Otherwise, the resources used by the device driver may remain unreleased.</p>
<p>&#160;</p>
<h2>Programming Example for each language</h2>
<p style="margin-left: 40px;"><a href="visual_basic_net.htm">Visual Basic 
 .NET</a> &#160;<br />
<a href="visual_cs.htm">Visual C#</a><br />
<a href="visual_cpp_mfc.htm">Visual C++ (MFC)</a><br />
<a href="python.htm">Python</a></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>
