Standard C function!

Hi,
Can I use string comparison functions such as _strnicmp and sprintf? Any
alternative functions I should use instead of these functions? Are they safe
in any IRQL?
Thanks in advanced.

Regards,
Sin-Lam

They are safe in any IRQL as long as the memory is non paged.
At IRQL 0 you can use them on paged pool, too.

Tan Sin Lam wrote:

Hi,
Can I use string comparison functions such as _strnicmp and sprintf? Any
alternative functions I should use instead of these functions? Are they safe
in any IRQL?


Kind regards, Dejan M. www.alfasp.com
E-mail: xxxxx@alfasp.com ICQ#: 56570367
Alfa File Monitor - File monitoring library for Win32 developers.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa Registry Monitor - Registry monitoring library for Win32 developers.
Alfa Registry Protector - Registry protection library for Win32 developers.

Tan Sin Lam wrote:

Hi,
Can I use string comparison functions such as _strnicmp and sprintf? Any
alternative functions I should use instead of these functions? Are they safe
in any IRQL?
Thanks in advanced.

Regards,
Sin-Lam

You might want to look at #pragma intrinsic.

Andy.

I have only few words to make Dejan’s words more correct:

You have to be very careful with any routine which may
convert between UNICODE and ANSI strings at IRQL > APC_LEVEL.
The reason is that Nls translation tables reside in paged memory
and if they are accessed at higher IRQL and not physically present…
…anyone can imagine what happens ;-)).

The same rule applies for any Rtl conversion routine as well as for
DbgPrint!

If you for example call KdPrint((“print something %wZ\n”,
&unicodeSomething))
at high IRQL, this is good candidate for crashing the system.

But calls like this are without any problem:
swprintf(unicodeBuffer, “%s”, unicode);
sprintf(ansiBuffer, “%s %Z”, ansi, ansiString);

Paul

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Dejan Maksimovic
Sent: Wednesday, March 27, 2002 7:03 AM
To: File Systems Developers
Subject: [ntfsd] Re: Standard C function!

They are safe in any IRQL as long as the memory is non paged.
At IRQL 0 you can use them on paged pool, too.

Tan Sin Lam wrote:

Hi,
Can I use string comparison functions such as _strnicmp and sprintf? Any
alternative functions I should use instead of these functions? Are they
safe
in any IRQL?


Kind regards, Dejan M. www.alfasp.com
E-mail: xxxxx@alfasp.com ICQ#: 56570367
Alfa File Monitor - File monitoring library for Win32 developers.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa Registry Monitor - Registry monitoring library for Win32 developers.
Alfa Registry Protector - Registry protection library for Win32 developers.


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to %%email.unsub%%