简体   繁体   English

如何在用C ++编写的Visual Studio 2010中调试dll winamp插件?

[英]how to debug a dll winamp plugin in Visual Studio 2010 written in C++?

I'm developing a Winamp plugin. 我正在开发Winamp插件。 I have a project that builds a .dll file. 我有一个生成.dll文件的项目。 This file is actually the plugin. 该文件实际上是插件。 I want to debug that plugin. 我想调试该插件。 I need some recipe Step by step. 我需要一些食谱。 I have already set the Configuration Properties - > Debug ging -> Command to "C:\\Program Files (x86)\\Winamp\\winamp.exe" . 我已经将Configuration Properties - > Debug ging -> Command"C:\\Program Files (x86)\\Winamp\\winamp.exe" So, when I hit debug winamp actually starts the plugin but then some C++ runtime fatal error occure. 因此,当我点击调试时,winamp实际上启动了插件,但是随后发生了一些C ++运行时致命错误。


EDIT: 编辑:

The question is how to prepare for the debugging? 问题是如何为调试做准备? How to tell winamp.exe that gen_my_file.dll is a plug-in? 如何告诉winamp.exe gen_my_file.dll是插件? (Winamp scans the C:/Program Files/Winamp/Plugins/ directory for plugins. To start the plugin It must be there, but how to tell visual studio export the .dll there and link it somehow?) (Winamp在C:/Program Files/Winamp/Plugins/目录中扫描插件。要启动该插件,必须在其中,但是如何告诉Visual Studio在那里将.dll导出并以某种方式链接?)

Here is what is happening: 1) I hit F5 这是怎么回事:1)我击中F5

在此处输入图片说明

Then I hit YES. 然后我点击是。

2) Second message appears 2)出现第二条消息

在此处输入图片说明

3) Voila the plugin is started! 3)Voila插件已启动!

在此处输入图片说明

4) ... and when I hit OK ... 4)...当我点击确定时...

在此处输入图片说明

I have tested this with empty project so, there is no way to breaks because of bug in the plug-in 我已经用空项目进行了测试,因此,由于插件中的错误,无法中断

Ok, after a few days of research, finally I found a solution! 好吧,经过几天的研究,终于找到了解决方案! The problem with the errors was resolved, they was my problem. 错误的问题已解决,这是我的问题。 The most important part is that I had to set post-build event that copies the dll to the appropiate directory (../Winamp/Plugins). 最重要的部分是我必须设置将dll复制到适当目录(../Winamp/Plugins)的构建后事件。 After this intervention the debuging was working like a charm :) Here is an example with Paint.NET - it work at the same principle. 经过这种干预之后,调试就像一个魅力一样:)这是Paint.NET的一个示例-它以相同的原理工作。 http://forums.getpaint.net/index.php?/topic/4209-how-to-debug-your-plugin/ http://forums.getpaint.net/index.php?/topic/4209-how-to-debug-your-plugin/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM