亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? nt-service.shtml.htm

?? mfc資料集合5
?? HTM
字號:
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="Author" CONTENT="Zafir Anjum">
   <TITLE>A Class For Building An NT Service</TITLE>
</HEAD>
<body background="../fancyhome/back.gif" tppabs="http://www.codeguru.com/fancyhome/back.gif" bgcolor="#FFFFFF" link="#B50029" vlink="#8E2323" alink="#FF0000" bgproperties="fixed">
<table WIDTH="100%">
<tr WIDTH="100%">
<td><td>
</tr>
</table>


<CENTER><H3><FONT COLOR="#AOAO99">A Class For Building An NT Service</FONT></H3></CENTER>
<HR>


This article was contributed by <A HREF="mailto:Joerg.Koenig@rhein-neckar.de">Joerg
Koenig</A>.

<P>Ever tried to write an NT service ? :->
<BR>One of my very latest projects was to develop a CORBA server running
as an NT service. Since one of my next projects will be an NT service too,
I let my brain work a little harder to get it ready for as many programs
as needed. The result of this was the CNTService class, that I want to
share with the codegurus :-)
<BR>With this class it is very simple to create an NT service. Just derive
your own class and override the "Run()" and "Stop()" pure virtual members.
All of the hard bits are done by the class.

<P>There are several virtuals to overload (multi-threading, pausable services
and more).

<P>The class accepts a set of command-line parameters. For instance you
can pass the -d switch to let it run as a console process. This makes debugging
much easier.
<BR>Furthermore the class has abilities to (de)install the service. This
is usually a command-line switch too (but one can customize this :-).

<P>CNTService should be able to run as a unicode service too, but this
is still untested (would be nice to hear of your experiences ... :-)

<P><B><FONT SIZE=+1>Building a Service</FONT></B>
<BR>Now lets have a closer look at how you can build your own service.
<BR>Follow these steps (assuming you're using VC++ 5.0):
<OL>
<LI>
create a new project workspace of type "console application"</LI>

<LI>
copy the files of the NTService package into the directory of your new
project</LI>

<LI>
insert "NTService.cpp" and "NTServiceEventLogMsg.mc" into your project</LI>

<LI>
open the <B>Project->Settings ...</B> dialog and fill it out. See the image
below. It says more than I could write :-)</LI>

<LI>
compile the file "NTServiceEventLogMsg.mc". This will produce the files
"NTServiceEventLogMsg.h" and "NTServiceEventLogMsg.rc".</LI>

<LI>
insert the generated RC file into your project.</LI>

<LI>
derive your own class from CNTService and override at least the two methods
"Run()" and "Stop()"</LI>

<LI>
write a simple "main()" to start up your program's functionality :) (You
can use the sample project for a good starting point)</LI>

<LI>
Once your project compiles without errors, you can immediately start it.
To do so, you should open the <B>Project->Settings ...</B> dialog once
again. Select <B>All Configurations</B> and than check the line with the
name of your project. Activate the tab <B>Debug</B> and insert the <B>-d
</B>switch in the field <B>Program arguments:</B></LI>

<BR>Now you should be able to run and debug your service as a console program.
You can use either Ctrl-C or Ctrl-Break to stop the service (that would
simulate a <I>Stop</I> request from the service control manager)</OL>
<IMG SRC="ntservice_settings.gif" tppabs="http://www.codeguru.com/misc/ntservice_settings.gif" HEIGHT=372 WIDTH=577>
<BR><FONT SIZE=-1>How to fill out the settings of the file NTServiceEventLogMsg.mc</FONT>

<P>Now lets try to start the service as a real NT service (assuming you
use the sample project):
<OL>
<LI>
Log on as an administrator, if your account isn't in the administrators
group (this will make life somewhat easier)</LI>

<LI>
Start the program with the switch <B>-i</B>. This will install your service.</LI>

<LI>
If the last step completes successfully, you can open the control panel
and start the <B>Services</B> applet. Search for the display name of your
service and select it (<I>Very Simple Service</I> if you try the sample).</LI>

<LI>
Press the <B>Startup ...</B> button. Have a look at the <B>Log On As:</B>
box. For now you can let the check at <B>System Account</B>. If you try
the sample, make sure you check the <B>Interact With The Desktop</B> box.
This is necessary, since the sample uses the MessageBox() function (which
interacts with the desktop). If you don't check this box, the sample will
not run properly and will hang up itself; thus you're unable to stop the
service again ! With a little bit of experience one can enhance the sample,
so that it will install the service with this box already checked, but
I wanted to keep the sample as simple as possible, so I leave it to you
to implement that. :-)</LI>
</OL>
The sample project implements a very simple service. The derived class
(declaration and implementation) and the main() function are all in the
same file (main.cpp). This file is less than 100 lines long (strip off
all the comments and it will fit on one page of printing !)
<BR>The service only pops up a message-box every 10 seconds.

<P>For more information have a look at CNTService.h and - of course - the
sample. I think it is well commented (let <A HREF="mailto:Joerg.Koenig@rhein-neckar.de">me</A>
know, if you don't think so)

<P>CNTService consists of three files:
<BR>NTService.h
<BR>NTService.cpp
<BR>NTServiceEventLogMsg.mc
<BR><A HREF="ntservice_source.zip" tppabs="http://www.codeguru.com/misc/ntservice_source.zip">Download Source</A> 11KB
<BR><A HREF="ntservice_sample_project.zip" tppabs="http://www.codeguru.com/misc/ntservice_sample_project.zip">Download Sample Project</A> 15KB

<P>Note that the file NTServiceEventLogMsg.mc&nbsp; is copyrighted by Telic
Software International B.V. Many thanks to Telic for providing it in the
public domain !





<P>
<HR>
<TABLE BORDER=0 WIDTH="100%" >
<TR>
<TD WIDTH="33%"><FONT SIZE=-1><A HREF="../index.htm" tppabs="http://www.codeguru.com/">Goto HomePage</A></FONT></TD>

<TD WIDTH="33%">
<CENTER><FONT SIZE=-2>&copy; 1997 Zafir Anjum</FONT>&nbsp;</CENTER>
</TD>

<TD WIDTH="34%">
<DIV ALIGN=right><FONT SIZE=-1>Contact me: <A HREF="mailto:zafir@home.com">zafir@home.com</A>&nbsp;</FONT></DIV>
</TD>
</TR>
</TABLE>
<CENTER><IMG SRC="../cgi/Count.cgi-ft=2&dd=E-df=misc_no_window_list.cnt" tppabs="http://www.codeguru.com/cgi/Count.cgi?ft=2&dd=E%7cdf=misc_no_window_list.cnt" ALIGN="BOTTOM" BORDER="0"></CENTER>
</BODY>
</HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产激情精品久久久第一区二区| **欧美大码日韩| 热久久国产精品| 3751色影院一区二区三区| 天天亚洲美女在线视频| 欧美日韩高清一区| 免费观看在线色综合| 欧美成人一区二区| 国产精品一区免费视频| 欧美国产精品中文字幕| av在线一区二区三区| 亚洲久草在线视频| 欧美放荡的少妇| 国产精品自在欧美一区| 亚洲三级在线看| 欧美区一区二区三区| 久久国产综合精品| 国产精品久久夜| 欧美中文字幕一区| 久久99国产精品久久99 | 国产成人在线视频网址| 国产色产综合产在线视频| 色成人在线视频| 蜜臀国产一区二区三区在线播放| 欧美激情一区二区三区全黄| 色欧美乱欧美15图片| 另类小说一区二区三区| 国产精品久线观看视频| 欧美视频精品在线观看| 玖玖九九国产精品| 国产精品久久久久9999吃药| 在线国产亚洲欧美| 麻豆精品国产91久久久久久| 国产欧美日韩另类一区| 色偷偷久久人人79超碰人人澡| 亚洲国产人成综合网站| 久久在线观看免费| 美脚の诱脚舐め脚责91| 久久亚洲私人国产精品va媚药| 国产一区二区三区免费| 久久久久国产一区二区三区四区| 91丨porny丨国产| 日本va欧美va欧美va精品| 国产色产综合色产在线视频| 欧美探花视频资源| 精品亚洲成a人| 一区二区三区免费看视频| 在线观看91av| 波多野结衣亚洲一区| 视频一区免费在线观看| 国产精品久久夜| 91精品午夜视频| 99久久精品情趣| 精品一区二区日韩| 亚洲一区成人在线| 日韩欧美不卡一区| 成年人网站91| 国产成人av电影在线观看| 亚洲成人动漫精品| 国产精品乱码久久久久久| 91精品国产综合久久久蜜臀图片| www.亚洲国产| 国模娜娜一区二区三区| 午夜国产精品一区| 亚洲精品日产精品乱码不卡| 久久蜜桃香蕉精品一区二区三区| 在线观看成人小视频| 成人午夜免费av| 黄页网站大全一区二区| 亚洲丰满少妇videoshd| 亚洲男人天堂av| 欧美精品一区二区久久久| 欧美另类高清zo欧美| 成人成人成人在线视频| 国产一区二区三区黄视频| 性做久久久久久| 亚洲乱码中文字幕| 中文字幕亚洲在| 国产欧美日韩另类一区| 久久精品综合网| 2020国产精品| 精品国产一区二区在线观看| 555www色欧美视频| 高清不卡一二三区| 精品一区二区三区视频在线观看| 麻豆高清免费国产一区| 日本中文字幕不卡| 亚洲大型综合色站| 亚洲精品成人a在线观看| 亚洲伦理在线免费看| 亚洲免费在线视频一区 二区| 国产精品欧美精品| 国产精品素人视频| 国产精品久久久久久久久晋中| 国产日产亚洲精品系列| 久久久久久久免费视频了| 久久久久久夜精品精品免费| 久久亚洲欧美国产精品乐播| 久久综合五月天婷婷伊人| 久久无码av三级| 欧美一区二区三区四区高清| 精品久久五月天| 久久嫩草精品久久久精品| 欧美激情一区二区三区| 国产精品久久看| 亚洲精品一二三| 国产精品超碰97尤物18| 亚洲精品乱码久久久久久日本蜜臀| 亚洲精品高清在线观看| 日韩成人一级片| 久久国产精品72免费观看| 日韩av网站在线观看| 久久99国产精品久久99果冻传媒| 国产精品一品二品| 色婷婷久久综合| 91精品免费观看| 久久精品一区二区三区四区| 国产精品久久久久久久久图文区| 一区二区三区 在线观看视频| 五月天一区二区| 精品在线播放午夜| 99视频一区二区三区| 色综合视频在线观看| 欧美一区二区三区四区久久| 国产日韩欧美激情| 亚洲一线二线三线视频| 久久超碰97中文字幕| www.日韩av| 日韩三级在线免费观看| 国产精品护士白丝一区av| 1区2区3区欧美| 亚洲欧洲av一区二区三区久久| 欧美aaa在线| av电影一区二区| 3d成人h动漫网站入口| 国产精品视频免费看| 天堂av在线一区| 成人综合婷婷国产精品久久蜜臀 | 久久一区二区三区国产精品| 国产精品美女久久久久高潮| 亚洲va在线va天堂| 成人综合婷婷国产精品久久蜜臀 | 日本大胆欧美人术艺术动态| 粉嫩av一区二区三区| 欧美日韩情趣电影| 精品欧美一区二区久久| 亚洲免费毛片网站| 国内精品自线一区二区三区视频| 成人亚洲一区二区一| 欧美自拍丝袜亚洲| 中文天堂在线一区| 日韩专区一卡二卡| 99精品视频在线播放观看| 欧美成人vr18sexvr| 亚洲一二三专区| 国产精品一二三| 精品日韩一区二区| 天天操天天综合网| 一本大道久久a久久精二百| 久久久精品2019中文字幕之3| 亚洲国产日韩a在线播放 | 蜜乳av一区二区| 日本黄色一区二区| 国产精品日韩成人| 国产专区欧美精品| 欧美大肚乱孕交hd孕妇| 免费av网站大全久久| 国产99久久久国产精品潘金| 日韩久久久久久| 天天av天天翘天天综合网| k8久久久一区二区三区| 久久久久久久久99精品| 国产一区二区福利视频| 欧美综合亚洲图片综合区| 亚洲欧美在线aaa| 337p粉嫩大胆色噜噜噜噜亚洲 | 亚洲视频在线观看三级| 欧美精品一区在线观看| 狠狠狠色丁香婷婷综合激情| 在线不卡a资源高清| 亚洲天堂久久久久久久| 色婷婷综合视频在线观看| 中文字幕在线视频一区| 成人黄色免费短视频| 国产精品国产三级国产普通话蜜臀 | 日韩欧美一二三四区| 日韩高清国产一区在线| 在线播放/欧美激情| 免费不卡在线观看| 欧美精品精品一区| 国内精品伊人久久久久av影院| 久久影院视频免费| 成人在线综合网站| 最新热久久免费视频| 91浏览器打开| 亚洲成人综合网站| 日韩亚洲欧美高清| 国产麻豆精品一区二区| 51精品秘密在线观看| 国产精品一区二区三区网站|