Int 2Ah - KiGetTickCount

用户模式下调用本机API         关于本机API的讨论网上已经比较多了。本机API是除了Win32 API,NT平台开放了另一个接口。本机API它运行在Ring0层,拥有没有限制操作权限,因此微软出于安全考虑并没有发布支持这种应用的开发方法。而在开发驱动文档上有介绍。但一定要写驱动才能使用这些功能强大的本机API吗?实际上并不一定需要写驱动去访问这个接口,普通的Win32程序可以在任何时候向下调用本机API。    阅读详情
Int 2Ah - KiGetTickCount
ReWolf^HTB
http://www.rewolf.prv.pl



Date: 16.III.2007


I. BACKGROUND

Everybody knows that GetTickCount is often used as anti-debug trick,
also everybody has patched that function. There is ring0 equivalent
called KiGetTickCount... but we can call it from user mode.


II. DESCRIPTION

KiGetTickCount is not exported by ntoskrnl.exe, it is part of
_BBT_Exclude_Trap_Code_Begin. However it is interrupt 2Ah handler, which
we can call from usermode.


    kd> !idt 2a
    Dumping IDT:
    2a:    804deb92 nt!KiGetTickCount


    nt!KiGetTickCount:
    804deb92  cmp    dword ptr [esp+4],1Bh
    804deb97  jne    nt!KiGetTickCount+0x19 (804debab)
    804deb99  mov    eax,dword ptr cs:[nt!KeTickCount (80551280)]
    804deb9f  mul    eax,dword ptr cs:[nt!ExpTickCountMultiplier (805617bc)]
    804deba6  shrd   eax,edx,18h
    804debaa  iretd

Body of KiGetTickCount is almost identical to GetTickCount. Now if you
want to measure code execution time use int 2Ah instead of GetTickCount.

Int 2Ah returns "the number of milliseconds that have elapsed since
the system was started" in eax register, it also modifies edx register.

tested on Windows XP Pro sp2


III. END

comments, suggestions, job opportunities: rewolf@poczta.onet.pl
 
电机传动机构的转矩与惯量折算 参考《工业运动控制》 阅读详情

相关推荐

YOLOv5s模型训练全流程解析:从数据准备到实战检测

本文详细解析了YOLOv5s模型训练的全流程,涵盖从环境搭建、数据准备与格式转换,到模型训练、参数调优及实战检测的完整步骤。文章提供了具体的代码示例和常见问题解决方案,旨在帮助开发者,特别是新手,高效掌握YOLOv5s模型训练的核心技术,并成功应用于实际检测任务中。

weixin_29041767的博客 335

DOS 下多任务系统的设计与实现 (1995-7)

DOS 下多任务系统的设计与实现 (1995-7)作者:wxzself一、引言:  将DOS扩展为多任务系统,在理论和实践中都有很重要的意义。但由于DOS系统单用户,单任务的设计局限,在实现中有不少难点。 本文提出一种实现方法及其具体设计。  现有的多任务DOS系统,可以分为两类。 一类是在其它多任务系统(如OS/2、UNIX、WINDOWS NT等)的支持下的DOS多任务。在这类系统中,有着严格

Tunix126的专栏 3457

关于Vscode配置Unity环境时的一些报错问题(持续更新)

3.找到设置文件,添加如下代码,用于告诉VSCode)在处理 C# 项目时优先使用 C# 扩展来加载和管理项目,而不是使用 C# Dev Kit 或其他扩展。1.很可能是unity的插件版本问题,打开window > package manager将。2.很可能是项目文件的问题,建议unity打开edit > perfercenes。3.手动重装其他版本的.Net框架(去官网找,多下几个无所谓的)解决:(由于造成问题不一样,所以建议都尝试一次)下载net请求超时(一般都会超时很正常的)

bug制造机 1890

GetTickCount函數

【函数名】GetTickCount【库名】kernel32【适用范围】95/98/ME/NT/2000/XP【VB声明】Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount" () As Long【说明】  用于获取自windows启动以来经历的时间长度(毫秒)【返回值】  Long,以毫秒为单位的wi

winstonbonaparte的专栏 1049

基于深度视觉实现机械臂对目标的识别与定位

Marker ID 和 Marker size 自选,在 launch 文件中做相应的修改(本教程演示使用 Marker ID:582,Marker size:30mm)根据相机和机械臂的安装方式不同,手眼标定分为眼在手上和眼在手外两种方式,双臂机器人的相机和机械臂基座的相对位置固定,所以应该采用眼在手外的手眼标定方式。后续的视觉引导机械臂抓取测试实验基于本实验实现,通过视觉引导右臂完成抓取目标物,所以默认已使用机械臂右臂和相机完成了手眼标定。文件,根据打印的marker 标签,需要配置。

realman_Rop的博客 3768

HAL库硬件SPI驱动ST7735 TFT屏幕:从零实现高效刷屏与图形绘制

本文详细介绍了如何使用STM32的HAL库硬件SPI驱动ST7735 TFT屏幕,从硬件连接到SPI配置优化,再到图形绘制与文本显示的实现。重点分享了DMA传输、局部刷新等高级优化技巧,显著提升刷屏效率,帮助开发者快速掌握屏幕驱动技术并应用于实际项目。

pink的博客 741

GetTickCount函数

3. 在多核处理器上,GetTickCount()计算的是所有核心的总运行时间,而不是当前线程的运行时间。而在Windows XP和Windows 7系统中,GetTickCount的精度略有不同,其中Windows XP中的精度是10毫秒,而Windows 7中的精度是1毫秒。因此,对于实时控制等要求较高精度的应用,可能需要使用QueryPerformanceFrequency和QueryPerformanceCounter这两个函数,它们可以提供更高的精度,但要求计算机从硬件上支持高精度计时器。

kupePoem的专栏 2032

【DaVinci Developer专题】-23-IDT高阶应用:结构体类型的数组

共8页 目录 1 创建一个Record IDT 2 创建一个Array IDT 3 创建一个S/R Port Interface 4 创建一个Constant 5 导入CFG生成代码的总结 6 结尾 <--返回「实战篇」博文-总目录--> <--返回「Autosar从入门到精通-实战篇」专栏主页--> 关键字: 缩略语/术语 含义 DEV DaVinci Developer .

「汽车电子助手」的博客 1670

将(*)的ASCII码2AH送入内存段1000H开始的100个单元中

汇编习题-个人笔记

IT1995的博客 1万+

Python 爬虫实战:爬取 BOSS 直聘职位,实现岗位要求关键词提取

摘要:本文基于BOSS直聘数据分析师岗位信息,采用Python爬虫技术获取职位数据,通过文本分析和可视化方法研究岗位技能需求特征。研究首先设计爬虫程序获取职位基本信息和岗位要求文本,经数据清洗后运用jieba分词和词频统计提取关键词。结果显示SQL、Python为最核心技能,不同级别岗位需求差异明显:初级重基础数据处理,高级需建模和管理能力;行业间亦存在差异,互联网关注用户增长,金融侧重风控。研究为求职者技能提升提供了数据支持,同时展示了从非结构化文本中挖掘有价值信息的完整流程。

2503_91057718的博客 1767

OpenClaw更新后变傻了?一分钟教你快速恢复(OpenClaw更新版本后降智、缺少权限问题的解决方案)

OpenClaw 版本更新后出现降智问题,AI不再执行具体任务。本文详细分析问题原因,提供最简便的解决方案✅

XiaoqiangClub的博客 3887

GetTickCount的实现

GetTickCount的实现Kernel32.dll的GetTickCount返回机器启动后的毫秒数。一直不知原理,今天看了资料才知道。写下来。反汇编GetTickCount函数:kernel32!GetTickCount:7c80932e ba0000fe7f      mov     edx,offset SharedUserData (7ffe0000)7c80

misterliwei的专栏 7029

R语言数据可视化:绘制世界地图的两种方案

本文介绍了两种使用R语言绘制世界地图的方案:包含边界边框和不包含边界边框。无论您选择哪种方案,使用ggplot2包和相关的地理数据包,我们可以轻松地绘制出漂亮的世界地图。R语言提供了丰富的包和函数,使我们能够轻松地绘制世界地图,并根据需求添加边界边框。在本文中,我将介绍两种绘制世界地图的方案:一种包含边界边框,一种不包含边界边框。在上述代码中,我们使用了与方案一相同的数据准备和地图绘制步骤,但省略了添加边界边框的代码。函数的调用,我们可以绘制不包含边界边框的世界地图。方案二:绘制不包含边界边框的世界地图。

CodeMaven的博客 2226

KeQueryTickCount宏的展开

#define KeQueryTickCount(CurrentCount ) { \ volatile PKSYSTEM_TIME _TickCount = *((PKSYSTEM_TIME *)(&KeTickCount)); \ while (TRUE) { ...

weixin_33943836的博客 585

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

WinDbg 使用 !idt 命令

VMware中的是XP SP3, Host也是SP3. 当用WinDbg调试的时候, 总是说Symbols不对. 我想可能是由于虚拟机是单核, 而Host是超线程的原因吧, 导致Ntoskrnl的版本不同的原因吧.  删掉ntoskrnl.pdb文件夹, .reload, 成功了, 终于出现 Windows Internals(4th) 上说的那个结果了, 当然还

tsdn 2587

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

GetTickCount64不可靠

GetTickCount有重置为0的问题,所以用GetTickCount64,在xp下用函数代替GetTickCount64 inline __int64 _GetSysTickCount64() { LARGE_INTEGER TicksPerSecond = { 0 }; LARGE_INTEGER Tick; if (!TicksPerSecond.QuadPart)

珍爱生命 远离C++ 3万+

深度学习工具包 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")

关于GetTickCount函数的用法

#include #include using namespace std; int main() { int a[200][200]; // 数组改大点,不要担心你的宝贝机器会受不了,如果只是区区赋值而已,它眼都不眨一气呵成。 DWORD begin,end,time; begin = GetTickCount(); for(int i =0; i<200; i++) {

foreverhuylee的专栏 6746

关于GetTickCount和QueryPerformanceCounter的精度区别

<br />其实差别不大,写了两个类来测试:<br /><br /> <br />class TimeCounter<br />{<br />private:<br />DWORD start;<br />public:<br />TimeCounter() {Start();}<br />void Start(){start = GetTickCount(); }<br />DWORD Now() <br />{ <br />DWORD end = GetTickCount(); <br />return

David的专栏 4087

《windows内核情景分析》读书笔记(2)---系统调用

1、内核与系统调用基础 对于应用程序进程来说,操作系统内核的作用体现在一组可供调用的函数,称为系统调用(也成"系统服务")。 从程序运行的角度来看,进程是主动、活性的,是发出调用请求的一方;而内核是被动的,只是应进程要求而提供服务。从整个系统运行角度看,内核也有活性的一面,具体体现在进程调度。 系统调用所提供的服务(函数)是运行在内核中的,也就是说,在"系统空间"中。而应用软件则都在...

weixin_34365417的博客 166

DOS功能调用

AH功能调用参数返回参数00程序终止(同INT 20H)CS=程序段前缀 01键盘输入并回显 AL=输入字符02显示输出DL=输出字符 03异步通迅输入 AL=输入数据04异步通迅输出DL=输出数据 05打印机输出DL=输出字符 06直接控制台I/ODL=FF(输入)DL=字符(输出)AL=输入字符07键盘输入(无回显) AL=输入字符08键盘输入(无回显)检测Ctrl-Break AL=输入字符

The simple, The best. 3448

GetTickCount()函数的陷阱!

开发中经经常使用GetTickCount()函数来进行间隔时间的推断。如推断某一段代码运行花了多少时间等,使用比較方便。 可是仅仅针对寻常的一些測试。近期开发一个服务程序时,也在代码中用GetTickCount()来进行推断,大体格式例如以下: DWORD dwBegin = 0; void Thread_Run(void) { while(TRUE) { DWORD dwN...

weixin_34029680的博客 1825
上一篇: Detours within Windows kernel
下一篇: 修改活动进程链来隐藏进程代码
iiprogram
博客等级 码龄25年 1068粉丝 1515原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值