0

Does anyone know how to debug the LSP sample provided with Microsoft platform SDK? I read about this topic and found that the sample dt_dll generate a DLL file that can be used with a checked version of ws2_32.dll.

The problem is that they are not saying how to do it. How to use the dt_dll.dll file? How to include it? How to debug it? The whole process is not clear.

Also, I tried to created a log file in the code of the LSP sample. The file was not created even though the LSP was loaded and the networking operations are functional as normal.

I need a way to check what I am doing (using a log file, or debugging the LSP).

I am using Windows XP with Visual C++ 2008 Express.

Any ideas?

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
Khaled
  • 1,114
  • 14
  • 31

1 Answers1

3

Let's assume that your LSP and its installer have been built successfully. And assume that the installer has successfully installed the LSP. Let's call it lsp.dll.

Then all applications using winsock, eg ws2_32.dll will also load your lsp.dll.

Verify it by open the command line console and type:

tasklist /m lsp.dll

If your browser is running you should see it in the list outputted by the above command. Attach your debugger to your running browser, you should be able to debug your LSP dll.

In Visual Studio, go to Debug->Attach Process->Select your running browser, eg IE.

You can certainly write to a log file from your LSP. However, please note that your lsp has the same privilege as the host application and it might not have permission to write file.

neo
  • 76
  • 2