DLL的调试

VS调试dll详细过程记录 VS调试dll详细过程记录 qianghaohao(孤狼) 前言: 在我们写的程序中有时候调用dll,并且需要跟踪dll中的函数,此时直接调试调用dll的工程是无法 阅读详情

假设:
    要调试hook.dll hook.h hook.lib

1。建立一个新工程Test,将hook整个工程目录拷贝到Test目录下

2。在Test工程中需要用到hook.dll的源文件中(或stdafx.h中)加入
     #include "./hook/hook.h"
   这样在该源文件中使用"::"就可以索引到hook.h中所有的导出函数、
   变量以及类
  
3。在Test的工程设置->Link->Object/library modules中加入
     ./hook/debug/hook.lib

4。编译连接好Test之后,发现未找到hook.dll. 这需要设置path.
   可以在工程设置->Debug->Working directory中加入
     e:/Test/hook/debug/
   也可以在autoexe.bat中设置路径

5。通过工程->Insert Project into Workspace将hook.dsp工程加入 
   Test项目中。

6。设置hook工程为活动工程,在工程>Debug>Executable for 
   Debug session中加入: 
     e:/test/debug/test.exe

7。现在设置断点,按F5可以正常调试了

注意:当调试的DLL被映射到其他的应用程序(非TEST)进程空间并运行时,在该DLL中设置的断点无效,当然可以通过MessageBox来查看变量,若该DLL是MFC扩展DLL,则还可以用TRACE或afxDump来查看变量。

 
VS调试dll VS调试dll详细过程记录 前言: 在我们写的程序中有时候调用dll,并且需要跟踪dll中的函数,此时直接调试调用dll的工程是无法跳进dll的函数的,此时我们可以启动dll工程 来跟踪程序的走向。注意:要有dll的工程,也就是由其源代码,因为我们要在源代码里面打断点。具体步骤如下: 在这里有两个工程:一个是产生dll的工程:FastStrDLL ---------... 阅读详情

相关推荐

避开内存陷阱:手把手教你用RKNN零拷贝接口正确管理输入输出Tensor

本文深入解析RKNN零拷贝接口在边缘计算中的高效内存管理策略,通过YOLOX实例演示如何避免内存对齐错误和数据错位。详细介绍了`rknn_tensor_mem`系列API的正确使用方法,包括内存创建、绑定、释放全流程,以及性能优化技巧如内存池技术和多核NPU负载均衡,帮助开发者提升推理效率并避开常见陷阱。

weixin_33686714的博客 160

【Dll调试】DLL调试方法

dll本身是没法运行的,必须在其它工程调用dll时候才会运行。 所以,调试dll首先要将调用dll的工程和dll工程联系起来。 解决方案中添加dll工程: 现在dll 和 应用程序两个工程就都在一个解决方案里了: 这时要对dll工程作些设置。 配置属性-常规-输出目录设置为 应用程序的生成目录 (调用dll的应用程序的目录?) 这样一来编译的dll、pbd文件就直接输出到...

我的笔记本 1万+

学习笔记9--智能驾驶的功能安全设计之功能安全设计

本系列博客包括6个专栏,分别为:《自动驾驶技术概览》、《自动驾驶汽车平台技术基础》、《自动驾驶汽车定位技术》、《自动驾驶汽车环境感知》、《自动驾驶汽车决策与控制》、《自动驾驶系统设计及应用》。此专栏是关于《自动驾驶系统设计及应用》书籍的笔记.

FUXI_Willard 1797

dll调试方法

1.在同一个解决方案下新建exe项目来调试dll项目 2.dll项目如果是Release要关掉优化才方便调试,Debug无影响 3.exe调用的dll要和exe同一目录。 为了不影响dll的项目,所以我们把生成的exe放进dll的Release目录下。 4.调试项目JadetigerLIBTest的输出文件在dll项目JadetigerLIB的Release目录下。 5.同时也要把调试命令设为这个 接下来打断点,开始调试即可。 ...

weixin_42213176的博客 2128

Android以太网开关流程分析

Android以太网开关流程分析 一、引言   在Android 以太网服务启动流程中我们启动了EthernetService(ES),NetworkManagementService(NMS)等服务,其中ES作为Binder的服务端,向客户端EthernetManger提供了调用接口的引用。因此,应用可以通过EthernetManger来访问以太网的相关接口。本篇文章将从APP调用以太网的使能和关闭的接口流程作为切入点来分析,以太网框架中,上层app是如何将指令传递到底层。图1-1所示为以太网使能和关闭

franc521的博客 6115

vcpkg管理OpenCASCADE的5个高效技巧:从多版本共存到离线部署

本文详细介绍了使用vcpkg高效管理OpenCASCADE的5个实用技巧,包括多版本共存、性能优化、团队共享、CI/CD集成和离线部署。通过自动配置和版本控制,vcpkg显著简化了OpenCASCADE的开发环境管理,特别适合工业级CAD开发场景。

rain6的博客 191

机器视觉系列2:VS动态链接库DLL调试

系列文章目录 第一章:Visual Studio 2019 动态链接库DLL建立 第二章:VS动态链接库DLL调试 文章目录 系列文章目录 前言 一、pandas是什么? 二、使用步骤 1.引入库 2.读入数据 总结 前言 <font face="微软雅黑">上章完成了DLL的建立,但DLL只有在被调用时才会执行,本章记录在同一解决方案中用C++项目调式DLL的过程。</font> 一、新建C++项目? <font face="微软

axe的博客 4037

Python 爬虫实战:爬取股票数据做 K 线图可视化

摘要:本文介绍基于Python的股票数据爬取与K线图可视化全流程技术方案。通过Requests库抓取东方财富网股票数据,使用Pandas进行清洗处理,并利用mplfinance库实现专业K线图绘制。文章详细讲解了数据爬取接口分析、反爬策略配置、K线图绘制方法(包含基础K线图和带均线的进阶版本),以及核心统计指标计算。该方案可应用于股票价格趋势分析,为投资决策提供数据支持,同时强调了数据使用的合规性和技术优化方向。

2503_91057718的博客 2050

DLL调试

一、基础知识――DLL 的调试 方法①: 对DLL的工程DEBUG, 在DLL工程的Project Setting->Debug->Executable for debug session中加入你的.exe的路径和名字。可以在dll中设置断点,.exe程序必须要调用dll中函数。 方法②: 对调用程序DEBUG:在settings/debug中category选additional

幸福轩 887

VS2022编译xlnt库

xlnt是一个用于读写Excel文件的C++库,本文介绍如何用源代码编译静态或动态xlnt库

QQVQQ的博客 7288

老 Intel Mac mini 装 OpenClaw:低成本常年在线方案

老款Intel Mac mini部署OpenClaw方案摘要 本文详细介绍了如何利用老款Intel Mac mini低成本部署OpenClaw系统。方案推荐2011-2018款Mac mini,建议升级至16GB内存和SSD存储以提升性能。部署步骤包括:1)安装Ubuntu系统;2)配置Docker环境;3)通过docker-compose部署OpenClaw及其依赖组件(PostgreSQL和Redis);4)进行系统级和Docker层面的性能优化;5)设置开机自启动服务。该方案充分利用老款设备剩余价值,

一键难忘的博客 2478

vc下dll调试

       http://blog.youkuaiyun.com/coding_hello/archive/2008/11/24/3364111.aspx         很多初学DLL和COM编程的人都为DLL的调试方法发愁。我结合自己学习COM的体验,总结DLL程序的调试如下。  DLL是一个不可运行的程序,它必须有其它程序的加载才可运行。故要调试DLL程序,需要一个测试程序。根据测试程序的不同

zhoubl668的专栏:远帆,梦之帆! 1万+

损失函数大汇总(六十一)(Signed Distance Map Loss附公式推导与代码)

摘要 本文介绍了Signed Distance Map (SDM) Loss,一种将形状先验直接融入分割任务的方法。SDM将每个像素表示为到目标边界的带符号距离(内部为负,外部为正),相比二值mask能更连续地表达形状几何信息。SDM Loss的核心思想是让网络学习这个隐式形状场,通过可微的Heaviside函数近似将SDM转换为分割结果。文中重点分析了一种product-based regression loss,它能同时关注距离数值和内外符号的正确性,对边界区域尤为敏感。SDM Loss通常与传统的分割

悦学共鸣,温柔以待,汇聚光芒,共同成长 189

dll调试技巧

1:普通dll 首先写一个exe加载要调试的dll,下好断点后再按f5,会弹出一个框,让你输入调用该dll的程序,我们只要填入加载该dll的exe的路径即可。 或者在project->setting->debug里填入调用该dll的路径也是一样的。 2:com,activex控件。 和上述基本一致。如果是IE插件,那么就填入IE的路径。 3:shell扩展 这个需要注意一些

programmerES 1822

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

Delphi 中如何调试 DLL

网上看到很多人问delphi中如何调试 DLL 的,众大侠回答也基本一致,但是,我使用时却时灵时不灵,今天发现了原因。完整的调试 DLL方法如下:1)新建一个 DLL 工程,名字就叫 MyDll 吧,编译后生成 MyDll.dll,我们要调试的就是它了。2)新建一个用来调试 MyDll 的 Application 工程,名字就叫 MyDllTest 吧,编译后生成的可执行性文件为 My

老牛(niniu)的专栏 1万+

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

VS中调试DLL工程的正确方法

1 将DLL工程设置为启动工程(只有这样调试器才会挂接到DLL工程上) 2 右键单击DLL工程,选择属性(Properties)进入属性设置页面。在左边Congifure Properties下面选择Debugging 3 在右边Debuggers to launch选择Local Windows Debugger 4 在下面“命令”一览中点击右边的箭头,按浏览,之后选择会调用你代码的应用程序。 5 在Debugger Type里面选择Mixed (这是最重要的一步,一般来说默认的Auto。但是是

重庆一小兵--关注教育、机器视觉、商务智能、数据分析 7131

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

VC下dll程序的调试

VC下DLL程序的调试  很多初学DLL和COM编程的人都为DLL的调试方法发愁。我结合自己学习COM的体验,总结DLL程序的调试如下。  DLL是一个不可运行的程序,它必须有其它程序的加载才可运行。故要调试DLL程序,需要一个测试程序。根据测试程序的不同,我将DLL调试分三种请况。1.测试程序有源码。2.测试程序无源码,只有可执行(exe)文件。3.对DLLRegisterS

henrylzh的专栏 1408

VC2005调试: DLL调试, 远程调试;

VC2005 Dll调试:如果EXE文件和DLL一样, 都处于你一个开发的状态, 那么可以放在同一个解决方案中, 直接调试;但是,有时候, 我们开发的DLL, 是给其他人使用的, 或者, 你此时不想调试EXE; 这时候, 可以在DLL工程选项中, 选择"调试"选项卡:     "工作目录"---- 填入EXE文件所在的目录; 比如D:/Test/     "命令"----填入E

山穷水尽疑无路,柳暗花明又一村! 5842

windows调试——DLL

调试dll的方法: 方法一:如果有调用dll工程的代码:从调用dll的那个工程开始调试: 打开Debug-->windows-->modules,查看是如何调用的,然后看一下调用的dll的目录是否为你现在的工程目录!! dll调用是有一个顺序的,如果先调用的是c:/window/ 里面的 ,可以把c:/window/ 路径下的dll删除。此时在dll代码内设置断点然后调试。 ...

sinat_24368229的博客 840

VC 6.0调试 之 DLL调试

你写的DLL或者ActiveX需要调试,因为他们不能直接运行 ,所以不能够直接调试,那么可以试试下面的方法:1. 在Vc 6.0中新建一个Win32 Console Application工程(例如DLLTest),代码中调用需要调试的DLL,编译该工程,生成Debug/DLLTest.exe,关闭该工程。2. 打开VC 6.0,打开需要调试的DLL工程,点击菜单Build->Set Active

FreeWave's space 6357

调试DLL

在DLL中定义接口函数 Prexport int __stdcall sort(int i,int j);   在 .DEF 文件中声明接口函数 LIBRARY "func" EXPORTS sort   1 在Dll中进行调试 设计好DLL ,在DLL中进行调试时   需要在 【项目】->【属性】->【配置属性】->【调试】  在【命令

目前打算换一个工作,有招聘windows c++方向的也欢迎联系,北京、济南 最好 2121

msdn之dll调试

当调试 DLL 时,可以从以下开始调试: 用于创建调用 DLL 的可执行文件的项目。 - 或 - 用于创建 DLL 本身的项目。 如果有用于创建可执行文件的项目,则从该项目开始调试。然后可以打开 DLL 的源文件,并在该文件中设置断点,即使它不是用于创建可执行文件的项目的一部分。有关更多信息,请参见断点。 如果从创建 DLL 的项目开始调试,则

yiranshixin的专栏 615
上一篇: 调试Win32 Service
下一篇: 进程间的通讯实现(IPC)的11种方法
iiprogram
博客等级 码龄25年 1068粉丝 1515原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值