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

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

?? ntserv.h

?? 關于聯通的一個統一定制程序
?? H
字號:
/////////////////////////////////////////////////////////////////////////////
// Copyright (C) 1997 by Joerg Koenig
// All rights reserved
//
// Distribute freely, except: don't remove my name from the source or
// documentation (don't take credit for my work), mark your changes (don't
// get me blamed for your possible bugs), don't alter or remove this
// notice.
// No warrantee of any kind, express or implied, is included with this
// software; use at your own risk, responsibility for damages (if any) to
// anyone resulting from the use of this software rests entirely with the
// user.
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date.  I can be reached as follows:
//    J.Koenig@adg.de                 (company site)
//    Joerg.Koenig@rhein-neckar.de    (private site)
/////////////////////////////////////////////////////////////////////////////
//
// MODIFIED BY TODD C. WILSON FOR THE ROAD RUNNER NT LOGIN SERVICE.
// HOWEVER, THESE MODIFICATIONS ARE BROADER IN SCOPE AND USAGE AND CAN BE USED
// IN OTHER PROJECTS WITH NO CHANGES.
// MODIFIED LINES FLAGGED/BRACKETED BY "//!! TCW MOD"
//
/////////////////////////////////////////////////////////////////////////////


// last revised: $Date: 5.05.98 21:22 $, $Revision: 2 $


#ifndef NTService_h
#define NTService_h
class CNTService {
	static BOOL				m_bInstance;			// only one CNTService object per application
	
	protected:	// data members
		LPCTSTR					m_lpServiceName;
		LPCTSTR					m_lpDisplayName;
		DWORD					m_dwCheckPoint;
		DWORD					m_dwErr;
		BOOL					m_bDebug;			// TRUE if -d was passed to the program
		SERVICE_STATUS			m_ssStatus;			// current status of the service
		SERVICE_STATUS_HANDLE	m_sshStatusHandle;
		DWORD					m_dwControlsAccepted;	// bit-field of what control requests the
														// service will accept
														// (dflt: SERVICE_ACCEPT_STOP)
		PSID					m_pUserSID;			// the current user's security identifier
		BOOL					m_bWinNT;			// TRUE, if this is running on WinNT FALSE on Win95
		BOOL					m_fConsoleReady;

		// parameters to the "CreateService()" function:
		DWORD			m_dwDesiredAccess;		// default: SERVICE_ALL_ACCESS
		DWORD			m_dwServiceType;		// default: SERVICE_WIN32_OWN_PROCESS
		DWORD			m_dwStartType;			// default: SERVICE_AUTO_START
		DWORD			m_dwErrorControl;		// default: SERVICE_ERROR_NORMAL
		LPCTSTR			m_pszLoadOrderGroup;	// default: NULL
		DWORD			m_dwTagID;				// retrieves the tag identifier
		LPCTSTR			m_pszDependencies;		// default: NULL
		LPCTSTR			m_pszStartName;			// default: NULL
		LPCTSTR			m_pszPassword;			// default: NULL


	public:		// construction/destruction
			// If <DisplayName> is not set, then it defaults to <ServiceName>.
		CNTService(LPCTSTR ServiceName, LPCTSTR DisplayName = 0);
		~CNTService();

	private:	// forbidden functions
		CNTService( const CNTService & );
		CNTService & operator=( const CNTService & );

	public:		// overridables
			// You have to override the following two functions.
			// "Run()" will be called to start the real
			// service's activity. You must call
			//		ReportStatus(SERVICE_RUNNING);
			// before you enter your main-loop !
			// "Stop()" will be called to stop the work of
			// the service. You should break out of the mainloop
			// and return control to the CNTService class.
			//
			// In most cases these functions look like these:
			//
			//		void CMyService :: Run(DWORD argc, LPTSTR * argv) {
			//			ReportStatus(SERVICE_START_PENDING);
			//			// do some parameter processing ...
			//			ReportStatus(SERVICE_START_PENDING);
			//			// do first part of initialisation ...
			//			ReportStatus(SERVICE_START_PENDING);
			//			// do next part of initialisation
			//			// ...
			//			m_hStop = CreateEvent(0, TRUE, FALSE, 0);
			//			ReportStatus(SERVICE_RUNNING);
			//			while( WaitForSingleObject(m_hStop, 10) != WAIT_OBJECT_0 ) {
			//				// do something
			//			}
			//			if( m_hStop )
			//				CloseHandle(m_hStop);
			//		}
			//
			//		void CMyService :: Stop() {
			//			if( m_hStop )
			//				SetEvent(m_hStop);
			//			ReportStatus(SERVICE_STOP_PENDING);
			//		}
		virtual void	Run(DWORD argc, LPTSTR * argv) = 0;
		virtual void	Stop() = 0;

			// Pause() and Continue() do nothing by default.
			// You can override them to handle a control request.
			// Pause() should report the status SERVICE_PAUSED
			// and Continue() should report the status SERVICE_RUNNING
			// (see ReportStatus() below).
			// Note that normally these functions will never be called. If
			// you want a service, that accepts PAUSE and CONTINUE control
			// requests, you have to to add SERVICE_ACCEPT_PAUSE_CONTINUE
			// to the m_dwControlsAccepted data member.
		virtual void	Pause();
		virtual void	Continue();

			// Shutdown() will be called, if the service manager
			// requests for the SERVICE_CONTROL_SHUTDOWN control.
			// This control type occurs, when the system shuts down.
			// If you want to process this notification, you have to
			// add SERVICE_ACCEPT_SHUTDOWN to the m_dwControlsAccepted
			// data member (and to override this function). The default
			// implementation of Shutdown() does nothing.
		virtual void	Shutdown();

			// Call "RegisterService()" after you have constructed
			// a CNTService object:
			// A typical "main()" function of a service looks like this:
			//
			//		int main( int argc, char ** argv ) {
			//			CMyService serv;
			//			exit(serv.RegisterService(argc, argv));
			//		}
			//
			// Where "CMyService" is a CNTService derived class.
			// RegisterService() checks the parameterlist. The
			// following parameters will be detected:
			//		-i			install the service (calls
			//					"InstallService()" - see below)
			//
			//			-l <account>
			//					<account> is the name of a user,
			//					under which the service shall run.
			//					This option is useful with -i only.
			//					<account> needs to have the advanced
			//					user-right "Log on as a service"
			//					(see User-Manager)
			//					<account> should have the following
			//					format: "<Domain>\<user>"
			//					"EuroS2Team\jko" for instance.
			//					The domain "." is predefined as the
			//					local machine. So one might use
			//					".\jko" too.
			//
			//			-p <password>
			//					The password of the user, under which
			//					the service shall run. Only useful
			//					with -i and -l together.
			//
			//		-u			uninstall the service (calls
			//					"RemoveService()" - see below)
			//
			//		-d			debug the service (run as console
			//					process; calls "DebugService()"
			//					see below)
			//
			//		-e			end the service (if it is running)
			//
			//		-s			start the service (if it is not running)
			//					(Note that *you* normally cannot start
			//					an NT-service from the command-line.
			//					The SCM can.)
			//
			// Do not use -l and -p, if your service is of type
			// SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER.
			// Furthermore you canot use -i and -s together. Instead
			// you have to start the command twice, first you install
			// the service, then you start it.
			// If none of the flags -i, -u, -e, -s and -d is set, then the
			// program starts as an NT service (only the SCM can start it
			// this way!).
			// NOTE: If UNICODE is #define'd, then <argc> and <argv>
			//		will be ignored and the original commandline
			//		of the program will be used to parse the
			//		arguments !
		virtual BOOL	RegisterService(int argc, char ** argv);
		
			// "StartDispatcher()" registers one service-procedure
			// to the service control dispatcher (using the predefined
			// "ServiceMain()" function below).
			// Override this funtion, if you want to develop a
			// multithreaded NT-Service.
		virtual BOOL	StartDispatcher();

			// Override "InstallService()" to manipulate the
			// installation behavior.
			// This function will only be called, if the
			// "-i" flag was passed to "RegisterService()"
			// (see above)
			// After "InstallService()" has completed, you
			// should be able to see the service in the
			// "services" control-panel-applet.
		virtual BOOL	InstallService();
		
			// RemoveService() removes a service from the system's
			// service-table.
			// It first tries to stop the service.
			// This function will be called only if the -u
			// flag was passed to the program. (see "RegisterService()"
			// above)
			// After removal of the service, it should no longer
			// appear in the "services" control-panel-applet.
		virtual BOOL	RemoveService();
		

			// EndService() stops a running service (if the service
			// is running as a service! Does not end a service
			// running as a console program (see DebugService()
			// below))
		virtual BOOL	EndService();

			// Start the service. Does the same as if the
			// SCM launches the program. Note that this method
			// will create a new instance of the program.
		virtual BOOL	StartupService();
		
			// Run a service as a console application. This makes it
			// easier to debug the service.
			// This function will be called only if the -d flag
			// was passed to the program(see "RegisterService()" above).
			// It transparently calls "Run()". You can simulate a
			// stop-request by pressing either Ctrl-C or Ctrl-Break (that
			// will call the "Stop()" method).
		virtual BOOL	DebugService(int argc, char **argv,BOOL faceless=FALSE);	//!! TCW MOD - added FACELESS parm to allow Win95 usage.

	protected:	// implementation
			// Override "RegisterApplicationLog()", if you want to register
			// a different message file and/or differend supported types
			// than the default.
			// The proposed message file is the application itself.
			// The proposed types are:
			// EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | EVENTLOG_INFORMATION_TYPE
			// This method will be called from inside "InstallService()" (see above)
			// Thus if you support errors only (for instance):
			//		void CMyService :: RegisterApplicationLog(LPCTSTR filename, DWORD ) {
			//			CNTService::RegisterApplicationLog(filename, EVENTLOG_ERROR_TYPE);
			//		}
			// This method will never be called on Win95.
		virtual void	RegisterApplicationLog(
							LPCTSTR lpszProposedMessageFile,
							DWORD dwProposedTypes
						);

			// "DeregisterApplicationLog()" is called from inside "RemoveService()"
			// (see above) to clear the registry-entries made by
			// "RegisterApplicationLog()"
		virtual void	DeregisterApplicationLog();

	public:	// helpers
			// Retrieve a human-readable error message. The message
			// will be stored in <Buf> which is of size <Size>.
			// Returns a pointer to <Buf>.
		LPTSTR			GetLastErrorText(LPTSTR Buf, DWORD Size);

			// report status to the service-control-manager.
			// <CurState> can be one of:
			//		SERVICE_START_PENDING		-	the service is starting
			//		SERVICE_RUNNING				-	the service is running
			//		SERVICE_STOP_PENDING		-	the service is stopping
			//		SERVICE_STOPPED				-	the service is not running
			//		SERVICE_PAUSE_PENDING		-	the service pause is pending
			//		SERVICE_PAUSE				-	the service is paused
			//		SERVICE_CONTINUE_PENDING	-	the service is about to continue
		BOOL			ReportStatus(
							DWORD CurState,				// service's state
							DWORD WaitHint = 3000,		// expected time of operation in milliseconds
							DWORD ErrExit = 0			//!! TCW MOD - set to nonzero to flag *FATAL* error
						);

			// AddToMessageLog() writes a message to the application event-log.
			// (use EventViewer from the menu "Administrative Tools" to watch the log).
			// The <EventType> parameter can be set to one of the following values:
			//		EVENTLOG_ERROR_TYPE			Error event
			//		EVENTLOG_WARNING_TYPE		Warning event
			//		EVENTLOG_INFORMATION_TYPE	Information event
			//		EVENTLOG_AUDIT_SUCCESS		Success Audit event
			//		EVENTLOG_AUDIT_FAILURE		Failure Audit event
			// See "ReportEvent()" in the help-topics for further information.
		virtual void	AddToMessageLog(
							LPTSTR	Message,
							WORD	EventType = EVENTLOG_ERROR_TYPE,
							DWORD	dwEventID = DWORD(-1)
						);

	public:		// default handlers
			// The following functions will be used by default.
			// You can provide other handlers. If so, you have to
			// overload several of the "virtual"s above.
		static void WINAPI	ServiceCtrl(DWORD CtrlCode);
		static void WINAPI	ServiceMain(DWORD argc, LPTSTR * argv);
		static BOOL WINAPI	ControlHandler(DWORD CtrlType);

	//!! TCW MOD - added console support for Faceless Apps. Needed sometimes when something goes wrong.
	public:
		BOOL OsIsWin95() const { return ! m_bWinNT; }
		void SetupConsole();

};


// Retrieve the one and only CNTService object:
CNTService * AfxGetService();


#endif	// NTService_h

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩国产欧美在线观看| 99re热这里只有精品视频| 寂寞少妇一区二区三区| 97精品国产露脸对白| 欧美伦理电影网| 国产精品乱码久久久久久| 蜜臀av一区二区在线观看| 99热精品一区二区| 精品少妇一区二区三区免费观看 | 日本91福利区| jizz一区二区| 久久久一区二区| 免费人成精品欧美精品| 在线视频欧美精品| 国产精品免费网站在线观看| 麻豆精品久久久| 91精品国产日韩91久久久久久| 国产精品国产三级国产| 国产精品一区二区三区网站| 欧美一区二区三区四区在线观看 | 日韩精品一区二区三区四区| 一区二区三区欧美亚洲| 99精品视频在线观看免费| 久久九九久精品国产免费直播| 久热成人在线视频| 欧美一区二区三区在线视频| 亚洲国产精品久久久久秋霞影院| 99国产精品久久久| 中文字幕一区二区三区av| 国产成人丝袜美腿| 久久精品无码一区二区三区| 老司机午夜精品| 欧美变态tickle挠乳网站| 视频在线观看91| 欧美精品在线观看一区二区| 亚洲福利视频一区| 欧美日韩日日摸| 麻豆一区二区三区| 精品裸体舞一区二区三区| 麻豆精品国产传媒mv男同| 欧美成人三级在线| 国内精品伊人久久久久影院对白| 精品国一区二区三区| 国产尤物一区二区在线| 久久精品男人天堂av| 成人免费高清在线| 亚洲三级免费观看| 91久久精品一区二区| 日韩成人免费电影| 精品免费视频.| 福利一区在线观看| 国产精品日韩成人| 91蝌蚪porny| 爽爽淫人综合网网站| 555www色欧美视频| 精品中文av资源站在线观看| 国产欧美一区二区精品婷婷| 91视频在线观看| 日韩**一区毛片| 欧美激情中文不卡| 欧美在线视频你懂得| 另类小说色综合网站| 中文一区二区完整视频在线观看| 一本一本大道香蕉久在线精品 | 色综合天天综合| 亚洲电影一区二区三区| 久久亚洲春色中文字幕久久久| 成人手机在线视频| 亚洲福利电影网| 国产欧美视频一区二区三区| 色偷偷久久一区二区三区| 蜜桃免费网站一区二区三区| 国产精品欧美一区二区三区| 欧美日韩精品一区二区| 国产精品资源网站| 亚洲一级二级三级| 国产欧美日韩在线| 欧美精品v国产精品v日韩精品| 国产乱码精品一区二区三区av| 一级中文字幕一区二区| 久久久久久久一区| 欧美日韩国产中文| 成人av中文字幕| 狂野欧美性猛交blacked| 亚洲免费大片在线观看| 欧美v国产在线一区二区三区| 99久久综合狠狠综合久久| 美美哒免费高清在线观看视频一区二区| 中文字幕精品在线不卡| 欧美va亚洲va香蕉在线| 欧美日韩精品一区二区在线播放| 成人午夜精品在线| 国产主播一区二区| 日韩专区在线视频| 亚洲综合激情另类小说区| 中文字幕欧美日韩一区| 2023国产精品视频| 欧美一二三区精品| 欧美日韩视频第一区| 色综合亚洲欧洲| 99re成人精品视频| 风间由美中文字幕在线看视频国产欧美| 日韩精品电影一区亚洲| 亚洲一区二区在线播放相泽| 亚洲欧洲国产专区| 国产女人18毛片水真多成人如厕| 精品久久人人做人人爰| 欧美一级高清大全免费观看| 在线播放中文一区| 51午夜精品国产| 91精品欧美久久久久久动漫| 欧美日韩高清不卡| 欧美日韩国产在线播放网站| 色狠狠色噜噜噜综合网| 一本一道波多野结衣一区二区| 99久久国产综合色|国产精品| www.欧美色图| 91社区在线播放| 色又黄又爽网站www久久| 在线观看亚洲a| 欧美手机在线视频| 91麻豆精品国产91久久久使用方法 | 成人免费在线播放视频| 亚洲国产精品成人久久综合一区| 三级欧美在线一区| 亚洲成人免费看| 日韩影院在线观看| 老司机精品视频在线| 麻豆国产一区二区| 国产一区二区三区在线观看免费| 国产九九视频一区二区三区| 国产成人在线免费| 不卡一区在线观看| 91豆麻精品91久久久久久| 欧美在线制服丝袜| 欧美一级欧美一级在线播放| 精品福利视频一区二区三区| 国产日韩一级二级三级| 中文字幕一区免费在线观看| 一区二区三区日韩精品视频| 亚洲大片精品永久免费| 蜜桃久久精品一区二区| 高清国产一区二区三区| 色乱码一区二区三区88| 337p亚洲精品色噜噜噜| 国产欧美一区二区三区网站| 一区二区在线观看视频| 另类欧美日韩国产在线| 成人激情开心网| 欧美福利电影网| 欧美国产精品v| 视频在线观看一区二区三区| 国产乱码字幕精品高清av| 色老头久久综合| www国产精品av| 亚洲成人自拍偷拍| 国产一区二区三区| 欧美日韩国产在线观看| 国产日本欧美一区二区| 亚洲国产乱码最新视频 | 韩国精品主播一区二区在线观看 | 精品影院一区二区久久久| 99久久夜色精品国产网站| 日韩欧美一二三四区| 中文字幕一区二区5566日韩| 日韩电影在线观看电影| 成人sese在线| 日韩欧美精品三级| 一区二区三区在线视频观看58| 国产综合久久久久影院| 欧美精品一级二级三级| 国产精品久久三区| 韩国一区二区在线观看| 欧美日韩成人综合在线一区二区| 中文字幕精品在线不卡| 久久精品国产秦先生| 91福利精品视频| 亚洲欧洲日韩在线| 国产成a人亚洲精品| 91精品国产色综合久久| 亚洲图片自拍偷拍| 91网页版在线| 国产欧美日韩在线| 国产一区欧美一区| 日韩一二三四区| 日韩av电影天堂| 欧美日韩三级一区| 夜夜精品视频一区二区| www.欧美日韩国产在线| 中文字幕av一区二区三区高| 国产主播一区二区| 精品免费99久久| 精品一二三四在线| 欧美精品一区男女天堂| 极品销魂美女一区二区三区| 日韩精品中文字幕一区二区三区 | 岛国精品在线播放| 中文字幕+乱码+中文字幕一区| 国产精品99久久久久久久女警 | 亚洲免费在线看|