📄 tsinst.cpp
字号:
//======================================================================
// TSInst.cpp : Defines the entry point for the application.
//
// Written for the book Programming Windows CE
// Copyright (C) 2003 Douglas Boling
//======================================================================
#include "stdafx.h"
//#include "service.h" // Service includes
#include <d:\wince420\public\common\oak\inc\pservice.h>
#include <d:\wince420\public\common\sdk\inc\service.h>
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow) {
HANDLE hDrv = RegisterService (TEXT("TCK"), 0,
TEXT("TickSrv.dll"), 0);
if (hDrv) {
printf ("Service loaded. %x\r\n", hDrv);
DWORD dwBytes;
ServiceIoControl (hDrv, IOCTL_SERVICE_INSTALL, 0, 0, 0, 0,
&dwBytes, NULL);
printf ("Install complete\r\n");
DeregisterService (hDrv);
} else
printf ("Service failed to load. rc %d\r\n", GetLastError());
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -