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

NSPDNS auto-loading

0 views
Skip to first unread message

Kai Reichert

unread,
Apr 27, 2002, 1:58:29 PM4/27/02
to
Hi
Is it safe to assume that NSPDNS is always loaded on NW5.x and NW6 ?
My question is because it's needed for an nlm and therefor in the
autoload list. And that prevents the application to be loaded into
protected memory.

--
Regards, Kai Reichert
Novell Support Connection SysOp

NetWare! Life is too short for reboots.


Peter, DevNet SysOp 4

unread,
Apr 27, 2002, 10:53:24 PM4/27/02
to
Kai,

I'd say so but it doesn't seem to have any dependencies -- ie you can just unload it (at least on NW5.1)...

DevNet SysOp 4
http://developer-forums.novell.com/category/index.tpt
NDS Rules!

Kai Reichert

unread,
Apr 28, 2002, 7:04:14 AM4/28/02
to
So, it might be better to check for nspdns on the fly and load it when
needed.
Any suggestion how to handle that ? I mean afaik when you check for the
nlm in protected memory you won't be able to see it or to load it, but
the exported functions should be there.
Is it possible to check for the existing of an exported function of
nspdns rather than if the nlm itself is loaded ?
(I'm not a programmer, just passing on these informations)

Dmitry Mityugov, DevNet SysOp 8

unread,
Apr 28, 2002, 9:02:07 AM4/28/02
to
Kai Reichert wrote:
> So, it might be better to check for nspdns on the fly and load it when
> needed.
> Any suggestion how to handle that ? I mean afaik when you check for the
> nlm in protected memory you won't be able to see it or to load it, but
> the exported functions should be there.
> Is it possible to check for the existing of an exported function of
> nspdns rather than if the nlm itself is loaded ?
> (I'm not a programmer, just passing on these informations)

Yes, this is possible. Your application should try to import one of the
required symbols with ImportSymbol().

--
Dmitry Mityugov, DevNet SysOp 8
Member of the Novell SysOp Team
http://developer.novell.com/support/sysop/

Guenter Knauf, DevNet SysOp 32

unread,
Apr 30, 2002, 5:11:42 AM4/30/02
to
Hi all,

I've just checked NSPDNS with NLMDUMP:
Module Name: NSPDNS.NLM
Description: NetWare Winsock 2.0 NSPDNS.NLM Name Service
Providers
Version: 6.00 (2001/11/16)
Copyright: Copyright 1995-2001 Novell, Inc. All rights
reserved.
File Format Version: 00000084 (compressed)
Module Type: Generic (0)
Code Start: 000001B2
Code Size: 00001E38 ( 7736)
Data Start: 00001FEA
Data Size: 00000184 ( 388)
Uninitialized Data Size: 00000000 ( 0)
Start Procedure: 00000000
Exit Procedure: 000001B6
Check Unload Procedure: 00000200
Flags: 00000000
CLIB Stack Size: 00000200 ( 512)
CLIB Thread Name: NSPDNS.NLM
CLIB Screen Name:
Exported Symbols: 0
Imported Symbols: 37
AllocateResourceTag (1 reference)
Alloc (8 references)
Free (5 references)
Press any key...

unfortunately NSPDNS doesnt export any symbols; so ImportSymbol() is not
possible.
Seems that NWGetNLMLoadedList() and loop until NSPDNS is found is the
only way...

http://developer.novell.com/ndk/doc/clib/srvr_enu/data/sdk362.html
http://developer.novell.com/support/sample/tids/nlmlst/nlmlst.htm
http://developer.novell.com/ndk/doc/clib/srvr_enu/data/sdk1473.html

Guenter.

Dmitry Mityugov, DevNet SysOp 8

unread,
May 1, 2002, 3:59:41 AM5/1/02
to
Hi Guenter!

> unfortunately NSPDNS doesnt export any symbols; so ImportSymbol() is not
> possible.

What if NSPDNS exports symbols dynamically with ExportSymbol() or a similar
function? ;-)

--
Dmitry Mityugov, DevNet SysOp 8
Member of the Novell SysOp Team
http://developer.novell.com/support/sysop/

Peter, DevNet SysOp 4

unread,
Apr 29, 2002, 11:43:42 PM4/29/02
to
Kai,

I was going to suggest what Dmitry suggested, but with an additional note: the custom NLM must NOT call the functions exported by NSPDNS explictly but use the ImportSymbol calls to get at them -- so if the import fails, you try to load NSPDNS and import the symbol again ...

0 new messages