因改有多种办法
1.
你可以在你的ISAPI中利用IPC进程间通讯
把错误信息和调试信息发送到一个你自己的进程中,并且在这个进程中将信息显示出来,或做别的处理2.利用VC自带的 调试功能
Attath to Process 功能找到相应的调用你ISAPI dll的进程即可进行调试这是我的想法,我没有试过,不过应该可以的
1.
你可以在你的ISAPI中利用IPC进程间通讯
把错误信息和调试信息发送到一个你自己的进程中,并且在这个进程中将信息显示出来,或做别的处理2.利用VC自带的 调试功能
Attath to Process 功能找到相应的调用你ISAPI dll的进程即可进行调试这是我的想法,我没有试过,不过应该可以的
解决方案 »
- 使用WLANAPI:一个 Win32工程,#include <wlanapi.h>后编译出错,请高手指教!
- Motorola手机通过串口线已连接至COM1,用超级终端连接不上,不知该怎么办才好,请经验人士指点
- 在对话框中如何调用文档中所存的数据
- 请教各位图像处理的高手!
- 今天是最后一天上班,心里很高兴,可以回家了,放分200,大家同乐。。。。
- 兄弟正在编写动态链接库(dll),不知如何入手,手边的资料介绍的不是很清楚,请问
- 100分求助 能不能提供一些有关图像分割的算法及代码!谢谢
- 如果我想将一个项目中的Dialog复制到另一个项目中,要怎么做?
- 宏IMPLEMENT_SERIAL中的最后一个参数wShema代表什么意思?
- 请教调试dll的原理
- debug: 怎样查看数组值
- 请教:如何实现自己定制的浏览器和html??给建议者均有分
首先打开VC,然后打开你的那个包含有你ISAPI dll源代码的cpp文件,在你想调试的地方设置断点,调用包含你那个DLL的进程,比如在浏览器中输入 http://localhost//my/a.dll?username=leo 这时在用VC的Attach to process 找到那个进程的名称,
可能是inetinfo.exe 也可能是dllhost.exe你可以一个一个试试,选择一个进程后,你再次刷新你刚才调用isapi的那个网页,幸运的话VC就自动激活了:)至少我用这种方法调试运行在ASP中的COM组件是完全可以的,你可以试试
如何在window2000下调试isapi
我重装过N遍(n>4),都没有成功
The information in this article applies to:Microsoft Internet Information Server 4.0
Microsoft Internet Information Services version 5.0--------------------------------------------------------------------------------
SUMMARY
Debugging of ISAPI Extensions and Filters under Internet Information Server (IIS) 4.0 is fully explained in the Microsoft Developer Network (MSDN) documentation. This documentation can be found in the following location: Platform SDK
Web Services
Internet Information Services SDK
Programmer's Guide
Developing ISAPI Extension and Filters
Debugging ISAPI Extensions and Filters
Please be aware that this documentation is not installed by the default installation option of NTOP or by adding IIS 5.0 to Windows 2000. However, it is available at the following link:
MSDN OnlineMORE INFORMATION
Following are the steps for one method to debug an ISAPI Extension or Filter DLL. (It is assumed that Visual C++ is installed on the IIS computer.) Build a debug version of the ISAPI DLL. By default, the Debug subdirectory of the project will now contain *.dll and two files with *.pdb extension (for example, c:\MyProj\debug directory).
Create a virtual root with execute permissions in the IIS Management Console and set its physical location to the project's debug directory (for example, "/MyProj" virtual root will be mapped to "c:\MyProj\Debug").
Make sure that W3SVC service is running. Start it, if necessary (you can use this command: "net start w3svc").
Start Microsoft Developer Studio. Go to the Build menu, click Start Debug, and click Attach Process. Select the Show System Processes option. In Windows 2000, sometimes no processes will appear in the process list (See Q235434 BUG: "Attach to Process" List Is Empty). You can attach a debugger to a particular process by right-clicking it within the Task Manager processes tab and choosing debug.
In the list of running processes, select INETINFO.
From the Project menu, click Settings. Click the Debug tab. From the Category drop-down box, select Additional DLLs. At this point, you should see the message stating that DLLs symbols were loaded.
Add your ISAPI extension or filter DLL to the list.
From the File menu, click Open and bring up the source file for the DLL. Set a breakpoint in the source code and submit a request to IIS from the browser (for example, http://server/myproj/mydll.dll). If the debugger beeps and refuses to set the break point, the reason for this may be a mismatch between the DLL and PDB files. Rebuilding the DLL should help in this situation.
NOTE 1: If the application is configured to run out-of-proc in IIS 4.0 (or on IIS 5.0 with medium or high Application Protection), then attaching debugger to Inetinfo.exe will not break execution of an Extension DLL. You will need to attach the debugger to the MTX.exe process (or DLLHOST.exe if using Windows 2000) that hosts the ISAPI DLL. Because there may be more than one MTX.exe (DLLHOST.exe) process running at one time, you may need to add code to the ISAPI DLL that shows the process ID (PID) that the DLL is loaded in. After the PID is known, you can attach the debugger to the MTX (DLLHOST) with corresponding PID. You can use this code:
#define _WIN32_WINNT 0x0400 #ifdef _DEBUG
char szMessage [256];
wsprintf (szMessage, "Please attach a debbuger to the process 0x%X (%s) and click OK",
GetCurrentProcessId(), argv[0]);
MessageBox(NULL, szMessage, "ISAPI/Filter Debug Time!",
MB_OK|MB_SERVICE_NOTIFICATION);
#endif Also, please note that medium Application Protection is a default setting of the IIS 5.0. NOTE 2: For debugging purposes it may be either to configure IIS 5.0 application to run with low Application Protection. This will allow attaching debugger directly to inetinfo.exe process.