服务管理器 小结

关闭Windows自动更新:解放你的电脑自由身 Windows自动更新,有时候就像是一位过于热情的访客,总是在你专心工作或者畅玩游戏的时候跳出来“打扰”你。这让许多用户感到困扰,因为不时的更新可能会导致电脑变得缓慢,甚至在关键时刻出现自动重启。在这篇博客中,我们将为你详细介绍六种关闭Windows自动更新的方法,让你的电脑自由自在,不再受到更新的干扰。 阅读详情

写了两天 终于把这个服务管理工具给写好了,这也算是我的一个VC程序了。

现在发现其实一般的用VC没什么难的,只不过这个适应的过程有点长,比用.NET长好多啊,之前已经包装过一个视频卡的程序了。

呵呵,看来是适应了,不过要深入,还是有一段很长的路的要走,比如要适应多线程,还有能够很流畅的写网络程序,这些东西,都还只是一点皮毛而已,而且我对Windows的理解也是不够的,慢慢来吧。

 

刚刚 看了全运会的110栏,刘翔冠军,这个冠军的背后的汗水和痛苦也只有他自己知道,我们看到只有鲜花和掌声。

 

 

总结一下,这个程序。

这个程序主要是疯狂的使用几个API,

1,在任何对服务的操作之前都要首先 打开服务管理器 OpenSCManager

SC_HANDLE OpenSCManager(LPCTSTR lpMachineName,LPCTSTR lpDatabaseName,DWORD dwDesiredAccess );

 

The OpenSCManager function establishes a connection to the service control manager on the specified computer and opens the specified service control manager database.

 

2,然后打开某个服务在对其进行操作 OpenService

SC_HANDLE OpenService(SC_HANDLE hSCManager,LPCTSTR lpServiceName,DWORD dwDesiredAccess);

The OpenService function opens an existing service.

 

3,关闭服务

CloseServiceHandle

 

4,获取服务信息

BOOL EnumServicesStatus(
  SC_HANDLE hSCManager,
  DWORD dwServiceType,
  DWORD dwServiceState,
  LPENUM_SERVICE_STATUS lpServices,
  DWORD cbBufSize,
  LPDWORD pcbBytesNeeded,
  LPDWORD lpServicesReturned,
  LPDWORD lpResumeHandle
);

The EnumServicesStatus function enumerates services in the specified service control manager database. The name and status of each service are provided.

This function has been superseded by the EnumServicesStatusEx function. It returns the same information EnumServicesStatus returns, plus the process identifier and additional information for the service. In addition, EnumServicesStatusEx enables you to enumerate services that belong to a specified group.

 

5,查询指定的服务的信息

BOOL QueryServiceConfig(
  SC_HANDLE hService,
  LPQUERY_SERVICE_CONFIG lpServiceConfig,
  DWORD cbBufSize,
  LPDWORD pcbBytesNeeded
);

The QueryServiceConfig function retrieves the configuration parameters of the specified service. Optional configuration parameters are available using the QueryServiceConfig2 function.

服务的附加信息由QueryServiceConfig2 获取,比如服务的描述信息

 

6,开启服务

BOOL StartService(
  SC_HANDLE hService,
  DWORD dwNumServiceArgs,
  LPCTSTR* lpServiceArgVectors
);

7,控制服务

这个可以控制服务的当前状态,启动方式等一些信息

BOOL StartService(
  SC_HANDLE hService,
  DWORD dwNumServiceArgs,
  LPCTSTR* lpServiceArgVectors
);

大概就是这个样子了。

剩下的就是一下MFC的东西了

 

 

 

 

 

 

 

TongWeb微服务部署实战:Nacos注册与网关路由的疑难解析 本文分享了将Spring Cloud微服务迁移至TongWeb应用服务器时,解决Nacos服务注册失败与Spring Cloud Gateway路由失效的实战经验。针对Nacos注册问题,通过实现ApplicationRunner接口并利用JMX获取容器端口,实现了手动注册;针对网关路由问题,建议将基于WebFlux的Gateway模块改为JAR包独立部署,以保障其原生运行环境。文章为在TongWeb上进行微服务部署提供了关键的问题排查思路与混合架构部署的最佳实践。 阅读详情

相关推荐

轴承寿命预测实战:手把手教你用IEEE PHM2012数据集训练模型(附Python代码)

本文详细介绍了如何利用IEEE PHM2012数据集构建轴承剩余寿命预测模型,从数据预处理、特征工程到LSTM模型训练与部署,提供了完整的Python代码实现。通过实战案例,帮助读者掌握预测性维护中的关键技术,提升工业设备的运行安全与效率。

weixin_29186249的博客 311

EnumServicesStatus

EnumServicesStatusThe EnumServicesStatus function enumerates services in the specified service control manager database. The name and status of each service are provided.This function has been superse

小发猫 2201

第四届“网鼎杯”网络安全大赛 - 青龙组

第四届“网鼎杯”网络安全大赛 - 青龙组

lpppp小公主的博客 1313

高并发架构系列:Spring Cloud的核心成员、以及架构实现详细介绍

什么是微服务 微服务的概念源于Martin Fowler所写的一篇文章“Microservices”。 微服务架构是一种架构模式,它提倡将单一应用程序划分成一组小的服务,服务之间互相协调、互相配合,为用户提供最终价值。每个服务运行在其独立的进程中,服务与服务间采用轻量级的通信机制互相沟通(通常是基于HTTP的RESTful API)。每个服务都围绕着具体业务进行构建,并且能够被独立地部署到生产...

火烧云 904

Vue2项目实战:vue2-org-tree实现动态组织架构图

本文详细介绍了如何在Vue2项目中使用vue2-org-tree组件实现动态、可交互的组织架构图。内容涵盖从快速安装、基础渲染到核心功能实战,包括水平布局、节点展开折叠、响应式数据绑定、深度自定义节点内容以及事件处理。同时提供了性能优化、样式覆盖等避坑指南,并通过一个完整的企业级Demo展示了如何打造功能丰富的架构图,助力高效开发后台管理系统。

weixin_28040125的博客 522

告别有线:用PVE直通无线网卡,打造一台真正的‘无线’Win10软路由/测试机

本文详细介绍了如何通过PVE直通无线网卡技术,构建全无线Win10软路由或测试机。从硬件选型、PVE环境配置到PCIe和USB双模直通技术,逐步指导实现Wi-Fi AP和蓝牙连接功能,为家庭实验室和小型办公环境提供灵活高效的网络解决方案。

weixin_28683689的博客 586

SQL语句小结1

MySQL 服务 1.右键计算机-管理- 服务中找到MySQL 2.net start mysql(服务名)启动服务 net stop mysql(服务名)停止服务 MySQL常见的数据类型 int(n):表示整数,长度为n float(m,n):表示小数,m总长度,n小数位个数 datetime:YYYY-MM-DD HH:MM:SS date:YYYY-MM-DD char(m):固定长度字符...

qq_37855039的博客 256

磁悬浮轴承控制策略设计及性能对比

摘要:针对高速磁悬浮转子控制问题,本文提出多方案对比分析。建立含陀螺效应的5自由度动力学模型,分析陀螺耦合、质量不平衡等关键挑战。对比四种控制策略:基础PID解耦、交叉反馈+自适应陷波、H∞鲁棒+前馈补偿、滑模控制+观测器,从实时性、鲁棒性等维度评估优劣。推荐采用交叉反馈+H∞+自适应陷波的混合方案,通过内环电流环与外环位置环协同,实现陀螺效应动态解耦和扰动抑制。实施步骤包括系统辨识、控制器设计、硬件部署等,需配合实验验证与参数整定。该方案综合性能最优,适用于高转速、强扰动场景。

技术工作者 1773

Android之binder驱动个人学习小结

转载:http://blog.youkuaiyun.com/gzzaigcn/article/details/7859740 主要描述的底层驱动部分代码。 本文均属自己阅读源码的点滴总结,转账请注明出处谢谢。 欢迎和大家交流。qq:1037701636 email: gzzaigcn2009@163.com,gzzaigcn2012@gmail.com   前言: Re

╰☆╮EvilCode的专栏╭☆╯ 6192

泛微E10 eBuilder低代码平台避坑指南:新手最容易犯的5个错误及解决方案

本文针对泛微E10 eBuilder低代码平台的新手开发者,总结了5个最常见错误及解决方案,包括表单联动配置、流程设计权限、动作流时序、数据加工类型转换和权限管理过度配置等问题。通过实战经验和代码示例,帮助开发者避开常见陷阱,提升开发效率。

weixin_30919429的博客 538

【AI面试】 Python 的装饰器

Python装饰器是一种高阶函数,用于在不修改原函数代码的情况下增强其功能。它通过@语法糖接收目标函数作为参数,并返回一个包含额外逻辑(如日志、缓存、权限验证等)的新函数。装饰器的核心价值在于代码复用和解耦,符合开闭原则,典型应用包括性能分析、权限控制等场景。例如,@timer_decorator可自动为函数添加耗时统计功能。本质上,@decorator等价于func = decorator(func),实际调用的是装饰器返回的包装函数。进阶技巧包括使用@functools.wraps保留原函数元信息。装饰

钱多多先森 183

ES进程除了kill之外,有什么优雅关闭的方式吗?

这个在ES 8实测结果:无法使用!

2401_85125308的博客 734

简单VASP计算INCAR设置(结构优化OPT、静态自洽SCF、能带BAND、态密度DOS)

改变 K 点、NBANDS、晶胞、ENCUT、POTCAR、自旋或 SOC 后要检查兼容性。该参数不参与物理计算,因此不会改变总能量、受力、应力或最终结构。如果研究的是金属、磁性材料、表面、二维材料、分子、缺陷、DFT+U、杂化泛函或强自旋轨道耦合体系,部分参数必须调整。适合已经用 IBRION = 2 预优化、力较小、自由度较多的结构。在 IBRION = 1、2、3 中,它只是内部缩放因子。“不能修改”不是程序禁止修改,而是修改后会改变理论模型、数值精度或能量参考,使结果不能直接比较。

weixin_51420530的博客 122

猫头虎分享:关闭Windows自动更新的6种方法 ‍

在这篇博客中,我,猫头虎博主,将详细分享如何关闭Windows自动更新的六种方法。本文适合各级用户,无论是电脑新手还是资深专家。通过本文,你将了解到各种关闭Windows自动更新的技巧,包括组策略编辑器、注册表编辑、服务管理、本地组策略、任务计划程序等方法。关键词包括Windows更新、自动更新关闭、电脑技巧、系统管理等,帮助你轻松在百度搜索到本文。方法适用用户优点缺点服务管理器所有用户直接有效功能单一组策略编辑器中高级用户自定义能力强操作复杂注册表编辑高级用户控制精细。

猫头虎技术团队:授渔优于赠鱼,兴趣引领智慧,探索之乐尤显珍贵。商务合作+:Libin9iOak ,万粉变现+:优快云WF,猫头虎承诺每年免费为100名C站创作者做账号流量诊断服务!全网搜:猫头虎技术团队,点击文章底部名片或直接私信我一切皆可谈,快找虎哥! 1146

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Windows 2008R2一点小结

昨天给一台Lenovo的笔记本装Windows2008R2,当时看到需求有点发懵,你要是装服务器得上专业服务器,至少得来个PC机,来个笔记本是哪门子需求呀。但本着用户的需求就是绝对真理的原则(本质是我的好奇与挑战遇),接了。1).用正常方式装,然后就是找不到磁盘驱动,卡在那走不了,失败。2).在PE下用安装器安装,完毕后,重启还是卡在找不到磁盘,来回重启。3).这是八代的架构,2008R2根本就没...

G00dChina的博客 466

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

【systemd定时任务】

systemd定时服务是Linux系统中使用systemd的服务管理器来设置和管理定时任务的方法。这主要通过systemd的定时器单元文件来实现,这些文件通常以.timer后缀结尾,并存储在特定的目录中,如/etc/systemd/system或/usr/lib/systemd/system。定时器单元文件主要由几个部分组成,包括[Unit]和[Timer]等。在[Unit]部分,可以指定定时器的基本配置,如描述和依赖关系。

2201_75298870的博客 696

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

MapGIS IGServer win7 64 安装问题与解决方案

======================================以下是问题经历,纯属流水账,可以略过===========================================================================================       今天参加了MapGis二次开发的培训,之前fp已经把MapGis K9和IGServe

1321

ASP.NET中TreeView控件使用小结

      在上网浏览时有时会看到一些网站在左边采用类似资源管理器的树形结构,在树形结构中单击,在右边显示内容,层次清晰且方便快捷,本文主要介绍ASP.NET服务器控件treeview 的使用方法,treeview控件属于microsoft webcontrols,在下载和使用过程中本人碰到一些问题,通过反复实验,查找资料,找到一些解决办法,现把treeview使用心得写出来,旨在对想在网站中使用

要饭's Blog 2416

XP安装IIS小结

 1、专业版安装:放入xp光盘...在设置---->控制面版---->添加删除程序中...选取windos组件...中选择intenet中添加iis 2、家庭版(home)安装:       无意间发现了一片home版xp下安装iis的文章,想到了很多朋友问过这件事,这里转载一下      iis安装文件下载  首先在“开始”菜单的“运行”中输入“c:/Windows/inf/sy

涂的专栏 709

windows server2012部署Cognos问题小结

一:数据库配置问题     1:.net Framework3.5问题 window Server2012 安装数据库的时候可能会报缺少.net Framework3.5,需要去服务管理器添加.net FM3.5的功能,按照操作即可,如果是VM的话需要2012对应操作系统的iso安装文件哦 2:安装SQLserver 2008 R2 提示不支持语言错误,解决办法如下图 3:检查安装

KING技术专栏 682

mysql 服务意外停止1067错误解决办法小结

今天在配置服务器时安装mysql5.5总是无法安装,查看日志错误提示为1067错误,下面来看我的解决办法 事件类型: 错误事件来源: Service Control Manager事件种类:无事件 ID: 7034日期: 2012-11-1事件: 9:25:52用户: N/A计算机: SVCTAG-HZWGF3X描述:服务 MySQL 意外停止。这发生了 1 次。有关更多信...

weixin_30902675的博客 198

Solaris 10 实用命令小结

Solaris 实用的启动service 的命令。

shenghuiping2001的专栏 2083
上一篇: rundll32 执行DLL中的某个函数
下一篇: CTreeCtr使用
xyjnufop
博客等级 码龄19年 10粉丝 99原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值