OK, I guess my original reply was of no use to a Win2k and higher driver.
ntstrsafe.lib should be all that one needs, and not ntoskrnl.lib (as far as
safe string functions go). I guess then that _vsnwprintf is implemented in
the Win2k version of ntstrsafe.lib.
Thanks for making me realize my error.
Philip Lukidis < mailto:xxxxx@guillemot.com>
Software Engineer - Guillemot R&D inc. < http://www.guillemot.com
http:</http:> >
Tel: (514) 279-9960 ext:4111 Fax: (514) 279-2558
5800 St-Denis, Suite 1102, Montreal, Quebec, H2S 3L5, Canada
-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, September 21, 2004 3:47 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Safe strings usage …
The export in question is _vsnwprintf, not RtlUnicodeToMultiByteN
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Philip Lukidis
Sent: Tuesday, September 21, 2004 12:23 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Safe strings usage …
Just for my curiosity: using “dumpbin /exports” on the Win2k
ntoskrnl.lib
from the 3790 server 2003 DDK, RtlUnicodeToMultiByteN at least is
exported.
Is this in error, and the actual ntoskrnl.exe does not export this?
Just
curious…
Philip Lukidis < mailto:xxxxx@guillemot.com>
Software Engineer - Guillemot R&D inc. < http://www.guillemot.com >
Tel: (514) 279-9960 ext:4111 Fax: (514) 279-2558
5800 St-Denis, Suite 1102, Montreal, Quebec, H2S 3L5, Canada
-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, September 21, 2004 2:58 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Safe strings usage …
Make sure your driver still loads on win2k. if you are using an XP or
later ntoskrnl.lib, it will have the symbol, but win2k will not have the
export and you could potentially not load.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
Sent: Tuesday, September 21, 2004 11:49 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Safe strings usage …
Philip,
Including NTOSKRNL.LIB after NTSTRSAFE.LIB did the trick for building
with
and without NTSTRSAFE_LIB. Yes I said “with and without”. The forced
kernel
library inclusion satisfies the _vsnwprintf call also.
That’s a documentation bug since the documentation only mentions adding
NTSTRSAFE.LIB to the sources file and manipulating the positioning of
the
header file to include functions that NTSTRSAFE flags as deprecated. I
do
note that RtlStringCchPrintfW uses the deprecated function _vsnwprintf
so it
might be a chicken/egg problem if _vsnwprintf has been deprecated by the
safe string header file.
–
The personal opinion of
Gary G. Little
“Philip Lukidis” wrote in message
news:xxxxx@ntdev…
> Not sure about RtlAnsiToUnicodeChar (can’t find it in the WinXP lib
dir,
and
> I did “dumpbin /symbols *.lib > all.txt”, maybe that is not
sufficient).
> For WinXP, RtlUnicodeToMultiByteN seems to be defined in ntoskrnl.lib
and
> not wdm.lib, so try linking to the former library. I did the dumpbin
test
> on Win server 2003 SP1 build 1218 DDK, WinXP lib dir.
>
> Philip Lukidis < mailto:xxxxx@guillemot.com>
> Software Engineer - Guillemot R&D inc. < http://www.guillemot.com
> http:</http:> >
> Tel: (514) 279-9960 ext:4111 Fax: (514) 279-2558
> 5800 St-Denis, Suite 1102, Montreal, Quebec, H2S 3L5, Canada
>
>
> -----Original Message-----
> From: Gary G. Little [mailto:xxxxx@sbcglobal.net]
> Sent: Tuesday, September 21, 2004 1:33 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Safe strings usage …
>
>
> I’m trying to use safe strings in a DriverWorks class. I’m not saying
> DrivereWorks is interferring with symbol resolution for safe string
> functions, but I am seeing some really STUPID errors during linkage
edit.
>
> If I build with NTSTRSAFE_LIB I get LNK2019 on RtlUnicodeToMultiByteN
and
> RtlAnsiToUnicodeChar. If I use the inline version by removing
NTSTRSAFE_LIB
> I then get LNK2019 on vsnwprintf. Any one else encountered this, and
how
was
> it resolved?
>
> –
> The personal opinion of
> Gary G. Little
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@guillemot.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com