Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LSP Sample from Platform SDK Breaking Application Functionality

143 views
Skip to first unread message

sars...@yahoo.com

unread,
Feb 15, 2008, 4:44:01 AM2/15/08
to
Hi All,

I am going to develop an application based on layered service
provider (LSP) sample provided by MSFT. Before that, i decided to run
a few tests on the sample framework. I took this sample from the
Platform SDK i downloaded a month ago. Without making any change in
the code at all, I compiled both the registrant and the dll using
Visual Studio .Net2003.

Everything went well as far as the compilation is concerned. The next
thing i did was i fired up two virtual machines (using virtual PC).
One was Windows 2000 Advanced Server SP4 and the other was XP 2002
Base. I installed the LSP on XP (with success) and started the telnet
sever to quickly check if things are working ok after the installation
but it turned out that telnet server refused to start (errors
mentioned below). I uninstalled the LSP and then tried to start the
telnet server and it started successfully without a hitch. I tried the
same on Win 2000 but the error is the same.

The error displayed (in a dialog) says that:

"The Telnet service on Local Computer started and then stopped. Some
services stop automatically if they have no work to do, for example,
the Performance Logs and Alerts service."

Event Logger displays the following errors associated with the telnet
server:

---------First Error--------

Type: Error

Event ID: 4053

Description: WSAGetLastError() returned error. The requested service
provider could not be loaded or initialized.

--------Second Error-------

Type: Error

Event ID: 4004

Description: Telnet service failed to initialize.

--------

Some of the things that i forgot to mention in my first post on
another forum is that i installed the LSP using -a option. I have
copied SpOrder.dll in system32 folder and restarted the system before
installing LSP. instlsp.exe and lsp.dll are also placed in system32
folder.

If i (or anyone else for that matter) has to use this sample as a
starting point for LSP (which i guess is the only quick way as far as
i know) then i have to make sure that it does not break the
functionality of other applications. But right now it seems that it is
causing other applications to malfunction.

After trying a few more things without any success, i am wondering if
there is something wrong with the sample or am i the one who is not
doing things the way they should be done?

Please help me resolve this issue. Thank you for all your help.

Sarshah.

Volodymyr M. Shcherbyna

unread,
Feb 15, 2008, 4:51:28 AM2/15/08
to
If you're talking about this sample:
ftp://ftp.microsoft.com/bussys/Winsock/Winsock2/layered.zip then it works
just fine. Recently, there were a feedback about this problem on
microsoft.public.win32.programmer.networks NG:

>>
fixed it. it was the path to the dll when installing the LSP. I had to
specify the full path.


"Cosmin" wrote:

> I got the code and checking it out.
> Although the documentation says that the LSP does nothing if I install it
> no
> network operation works. I need to uninstall it to get my network back. I
> just realized that I can screw up my OS if not being careful with this
> stuff
> :).
>
> Am I missing anything?
<<

--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
<sars...@yahoo.com> wrote in message
news:ab69658f-9a91-4e70...@e6g2000prf.googlegroups.com...

sars...@yahoo.com

unread,
Feb 15, 2008, 9:03:07 AM2/15/08
to
Volodymyr,

Thank you so much for your response. I havent been able to go into the
source code yet to tell the differences between PSDK code and code
from ftp url but the number of LSP files from both sources are not
the same. I am assuming that PSDK code is the latest since the sdk is
latest and PSDK code (which i am trying to use) is a V.S .Net project
and the code from the ftp url is not. Dont you think that it is better
to use the sample provided by PSDK since it is the latest, most up-to-
date and could have bug fixes?

I am still having the same issues with PSDK LSP. No success so far.

Thanks again,
sarshah.


On Feb 15, 2:51 pm, "Volodymyr M. Shcherbyna"
<v_scherb...@online.mvps.org> wrote:
> If you're talking about this sample:ftp://ftp.microsoft.com/bussys/Winsock/Winsock2/layered.zipthen it works


> just fine. Recently, there were a feedback about this problem on
> microsoft.public.win32.programmer.networks NG:
>
>
>
> fixed it. it was the path to the dll when installing the LSP. I had to
> specify the full path.
>
> "Cosmin" wrote:
> > I got the code and checking it out.
> > Although the documentation says that the LSP does nothing if I install it
> > no
> > network operation works. I need to uninstall it to get my network back. I
> > just realized that I can screw up my OS if not being careful with this
> > stuff
> > :).
>
> > Am I missing anything?
>
> <<
>
> --
> V.
> This posting is provided "AS IS" with no warranties, and confers no

> rights.<sarsha...@yahoo.com> wrote in message

> > Sarshah.- Hide quoted text -
>
> - Show quoted text -

Viviana Vc

unread,
Feb 15, 2008, 9:34:22 AM2/15/08
to
Also, you might need to restart your computer _after_ you install the
LSP.

Viv

On Fri, 15 Feb 2008 10:51:28 +0100, "Volodymyr M. Shcherbyna"
<v_sch...@online.mvps.org> wrote :

Michael K. O'Neill

unread,
Feb 15, 2008, 11:22:37 AM2/15/08
to
> <sars...@yahoo.com> wrote in message
> news:ab69658f-9a91-4e70...@e6g2000prf.googlegroups.com...
> > Hi All,
> >
> > << snip >>

> >
> > Everything went well as far as the compilation is concerned. The next
> > thing i did was i fired up two virtual machines (using virtual PC).

Have you tried the LSP on actual machines as opposed to virtual ones?


Maxim S. Shatskih

unread,
Feb 15, 2008, 11:51:40 AM2/15/08
to
> Have you tried the LSP on actual machines as opposed to virtual ones?

This is not a hardware-level or timing-sensitive code, so, if it fails on a VM,
this is a strong direction that there is a bug in it.

So, I would not spend time trying the buggy code on a real machine, but would
debug it, ensure it works on the VM, and then try on real machine.

Many experienced Windows kernel module writers do the initial testing
(debugging) on a VM. Only after the thing runs OK on the VM, the final testing
(validation) is performed on actual machine (the more CPU cores, the better).

As about the initial issue - for me, this is an installation issue (check the
registry), or the DLL dependency issue (debug C runtime library, MSVC8 vs
MSVCRT or such). I would first look at these possibilities.

Adding DbgPrints to the DLL and listening to them using WinDbg/KD attached to a
VM is also a good idea. Maybe the LSP DLL does not load at all.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com

0 new messages