Hello all tops,
I am programming a imd driver.sprintf() works very well in 2000&xp, but
not in 98. I can’t find the right LIB.
Any hints are highly appreciated!!
Anthony
Hello all tops,
I am programming a imd driver.sprintf() works very well in 2000&xp, but
not in 98. I can’t find the right LIB.
Any hints are highly appreciated!!
Anthony
You should link your driver with “libcntpr.lib” static library (located in
the DDK lib directory). I did it myself some years ago and everything worked
fine for me. By the way, this static library contains many other so-called
“run-time” functions that are frequently used for user-mode programming
(e.g. strlen(), strcat(), strcpy(), wcslen() etc.).
Konstantin Manurin
Programmer
Nival Interactive
mailto:xxxxx@nival.com
10a bld. 5, 1st Volokolamsky proezd
Moscow 123060 Russia
Tel: +7 (095) 363-9630
Fax: +7 (095) 363-9631
http://www.nival.com
http://www.etherlords.com
http://www.evil-islands.com
Hello Konstantin,
Thanks for your advice.
But it still doesn’t work well in windows 98. I include this lib
“libcntpr.lib” in my driver, but the compiler stops at “unresolved external
symbol _RtlUnicodeToMultiByteN@20”
I check it in MSDN, and RtlUnicodeToMultiByteSize is only available from
win2000.
I can’t check it out. Thanks for your further advice.
Anthony
“Konstantin Manurin” ??? news:xxxxx@ntdev…
>
> You should link your driver with “libcntpr.lib” static library (located in
> the DDK lib directory). I did it myself some years ago and everything
worked
> fine for me. By the way, this static library contains many other so-called
> “run-time” functions that are frequently used for user-mode programming
> (e.g. strlen(), strcat(), strcpy(), wcslen() etc.).
>
>
> Konstantin Manurin
> Programmer
> Nival Interactive
> mailto:xxxxx@nival.com
>
> 10a bld. 5, 1st Volokolamsky proezd
> Moscow 123060 Russia
> Tel: +7 (095) 363-9630
> Fax: +7 (095) 363-9631
> http://www.nival.com
> http://www.etherlords.com
> http://www.evil-islands.com
>
>
>
>
>
This function is exported from NTKERN.VXD module in Win98/98SE, but it’s not
declared in WDM.H from Win98 DDK. So use this declaration:
NTSYSAPI
NTSTATUS
__stdcall
RtlUnicodeToMultiByteN(
PCHAR MbString,
ULONG MbLength,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
);
Plus this function is not included in WDM.LIB library, but NTOSKRNL.LIB
contains it. So you should link your project with NTOSKRNL.LIB
But I totally forgot that a whole lot of run-time functions are exported
from NTOSKRNL.EXE. So you don’t have to link your project with LIBCNTPR.LIB
static library. I tested sprintf() call in my test project this morning and
sprintf() call goes to NTOSKRNL.EXE module (acording to disassemly). So this
should work without any additional static libraries.
By the way, which type of driver do you build - WDM or VXD???
----- Original Message -----
From: “Anthony”
Newsgroups: ntdev
To: “Windows System Software Developers Interest List”
Sent: Tuesday, July 15, 2003 6:05 AM
Subject: [ntdev] Re: sprintf in 98 !!!
> Hello Konstantin,
>
> Thanks for your advice.
>
> But it still doesn’t work well in windows 98. I include this lib
> “libcntpr.lib” in my driver, but the compiler stops at “unresolved
external
> symbol _RtlUnicodeToMultiByteN@20”
>
> I check it in MSDN, and RtlUnicodeToMultiByteSize is only available
from
> win2000.
>
> I can’t check it out. Thanks for your further advice.
>
> Anthony
>
>
> “Konstantin Manurin” ???
news:xxxxx@ntdev…
> >
> > You should link your driver with “libcntpr.lib” static library (located
in
> > the DDK lib directory). I did it myself some years ago and everything
> worked
> > fine for me. By the way, this static library contains many other
so-called
> > “run-time” functions that are frequently used for user-mode programming
> > (e.g. strlen(), strcat(), strcpy(), wcslen() etc.).
> >
> >
> > Konstantin Manurin
> > Programmer
> > Nival Interactive
> > mailto:xxxxx@nival.com
> >
> > 10a bld. 5, 1st Volokolamsky proezd
> > Moscow 123060 Russia
> > Tel: +7 (095) 363-9630
> > Fax: +7 (095) 363-9631
> > http://www.nival.com
> > http://www.etherlords.com
> > http://www.evil-islands.com
> >
> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nival.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Dear Konstantin,
Thanks a lot. Following your way, I can build and link my driver
successfully. BTW, I am programming a VXD driver.
But unfortunately I can’t active my driver again. It’s so strange!!!
In the user interface, I use CreateFile to active my driver and it fails
all the time, as the same as I user DriverMonitor to do it. When I remark
the codes which use SPRINTF, it woks again.
I don’t know what is up???
Please give me more hints, thanks!
Anthony
“Konstantin Manurin” ??? news:xxxxx@ntdev…
>
> This function is exported from NTKERN.VXD module in Win98/98SE, but it’s
not
> declared in WDM.H from Win98 DDK. So use this declaration:
>
> NTSYSAPI
> NTSTATUS
> __stdcall
> RtlUnicodeToMultiByteN(
> PCHAR MbString,
> ULONG MbLength,
> PULONG ResultSize,
> PWCHAR UnicodeString,
> ULONG UnicodeSize
> );
>
> Plus this function is not included in WDM.LIB library, but NTOSKRNL.LIB
> contains it. So you should link your project with NTOSKRNL.LIB
>
> But I totally forgot that a whole lot of run-time functions are exported
> from NTOSKRNL.EXE. So you don’t have to link your project with
LIBCNTPR.LIB
> static library. I tested sprintf() call in my test project this morning
and
> sprintf() call goes to NTOSKRNL.EXE module (acording to disassemly). So
this
> should work without any additional static libraries.
>
> By the way, which type of driver do you build - WDM or VXD???
>
>
>
> ----- Original Message -----
> From: “Anthony”
> Newsgroups: ntdev
> To: “Windows System Software Developers Interest List”
> Sent: Tuesday, July 15, 2003 6:05 AM
> Subject: [ntdev] Re: sprintf in 98 !!!
>
>
> > Hello Konstantin,
> >
> > Thanks for your advice.
> >
> > But it still doesn’t work well in windows 98. I include this lib
> > “libcntpr.lib” in my driver, but the compiler stops at “unresolved
> external
> > symbol _RtlUnicodeToMultiByteN@20”
> >
> > I check it in MSDN, and RtlUnicodeToMultiByteSize is only available
> from
> > win2000.
> >
> > I can’t check it out. Thanks for your further advice.
> >
> > Anthony
> >
> >
> > “Konstantin Manurin” ???
> news:xxxxx@ntdev…
> > >
> > > You should link your driver with “libcntpr.lib” static library
(located
> in
> > > the DDK lib directory). I did it myself some years ago and everything
> > worked
> > > fine for me. By the way, this static library contains many other
> so-called
> > > “run-time” functions that are frequently used for user-mode
programming
> > > (e.g. strlen(), strcat(), strcpy(), wcslen() etc.).
> > >
> > >
> > > Konstantin Manurin
> > > Programmer
> > > Nival Interactive
> > > mailto:xxxxx@nival.com
> > >
> > > 10a bld. 5, 1st Volokolamsky proezd
> > > Moscow 123060 Russia
> > > Tel: +7 (095) 363-9630
> > > Fax: +7 (095) 363-9631
> > > http://www.nival.com
> > > http://www.etherlords.com
> > > http://www.evil-islands.com
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@nival.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
>
You can’t link VXD driver with import libraries even if it succeeds!!! VXD
can only have so-called dynamic link calls.
Sorry, but it’s not so easy to call several WDM functions (especially with
__cdecl) from VXD drivers. There is WDMVXD.CLB static library in Win98 DDK
which contains WDMJmp wrappers for many WDM functions (which allow you to
call WDM functions thru INT 2E interface), but this library doesn’t contain
symbols like __imp__sprintf etc (only WDMsprintf).
But you can still link your VXD driver with LIBCNTPR.LIB library defining
this function somewhere in your code:
//============================================================
NTSTATUS __stdcall RtlUnicodeToMultiByteN(PCHAR MbString,ULONG MbSize,
PULONG ResultSize,PWCHAR UnicodeString,ULONG UnicodeSize)
{
ULONG result;
result=UniToBCS(MbString,UnicodeString,UnicodeSize,MbSize,BCS_WANSI);
if (ResultSize)
{
*ResultSize=result;
}
return STATUS_SUCCESS;
}
//============================================================
UniToBCS is a VXD service which is declared in IFS.H and VXDWRAPS.H files.
But if you need only sprintf() functionality you can use _Sprintf VXD
service. It’s exactly the same as sprintf() function.
----- Original Message -----
From: “Anthony”
Newsgroups: ntdev
To: “Windows System Software Developers Interest List”
Sent: Wednesday, July 16, 2003 9:22 AM
Subject: [ntdev] Re: sprintf in 98 !!!
> Dear Konstantin,
>
> Thanks a lot. Following your way, I can build and link my driver
> successfully. BTW, I am programming a VXD driver.
>
> But unfortunately I can’t active my driver again. It’s so strange!!!
>
> In the user interface, I use CreateFile to active my driver and it
fails
> all the time, as the same as I user DriverMonitor to do it. When I remark
> the codes which use SPRINTF, it woks again.
>
> I don’t know what is up???
>
> Please give me more hints, thanks!
>
>
> Anthony
>
>
>
> “Konstantin Manurin” ???
news:xxxxx@ntdev…
> >
> > This function is exported from NTKERN.VXD module in Win98/98SE, but it’s
> not
> > declared in WDM.H from Win98 DDK. So use this declaration:
> >
> > NTSYSAPI
> > NTSTATUS
> > __stdcall
> > RtlUnicodeToMultiByteN(
> > PCHAR MbString,
> > ULONG MbLength,
> > PULONG ResultSize,
> > PWCHAR UnicodeString,
> > ULONG UnicodeSize
> > );
> >
> > Plus this function is not included in WDM.LIB library, but NTOSKRNL.LIB
> > contains it. So you should link your project with NTOSKRNL.LIB
> >
> > But I totally forgot that a whole lot of run-time functions are exported
> > from NTOSKRNL.EXE. So you don’t have to link your project with
> LIBCNTPR.LIB
> > static library. I tested sprintf() call in my test project this morning
> and
> > sprintf() call goes to NTOSKRNL.EXE module (acording to disassemly). So
> this
> > should work without any additional static libraries.
> >
> > By the way, which type of driver do you build - WDM or VXD???
> >
> >
> >
> > ----- Original Message -----
> > From: “Anthony”
> > Newsgroups: ntdev
> > To: “Windows System Software Developers Interest List”
>
> > Sent: Tuesday, July 15, 2003 6:05 AM
> > Subject: [ntdev] Re: sprintf in 98 !!!
> >
> >
> > > Hello Konstantin,
> > >
> > > Thanks for your advice.
> > >
> > > But it still doesn’t work well in windows 98. I include this lib
> > > “libcntpr.lib” in my driver, but the compiler stops at “unresolved
> > external
> > > symbol _RtlUnicodeToMultiByteN@20”
> > >
> > > I check it in MSDN, and RtlUnicodeToMultiByteSize is only available
> > from
> > > win2000.
> > >
> > > I can’t check it out. Thanks for your further advice.
> > >
> > > Anthony
> > >
> > >
> > > “Konstantin Manurin” ???
> > news:xxxxx@ntdev…
> > > >
> > > > You should link your driver with “libcntpr.lib” static library
> (located
> > in
> > > > the DDK lib directory). I did it myself some years ago and
everything
> > > worked
> > > > fine for me. By the way, this static library contains many other
> > so-called
> > > > “run-time” functions that are frequently used for user-mode
> programming
> > > > (e.g. strlen(), strcat(), strcpy(), wcslen() etc.).
> > > >
> > > >
> > > > Konstantin Manurin
> > > > Programmer
> > > > Nival Interactive
> > > > mailto:xxxxx@nival.com
> > > >
> > > > 10a bld. 5, 1st Volokolamsky proezd
> > > > Moscow 123060 Russia
> > > > Tel: +7 (095) 363-9630
> > > > Fax: +7 (095) 363-9631
> > > > http://www.nival.com
> > > > http://www.etherlords.com
> > > > http://www.evil-islands.com
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@nival.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nival.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Hello Konstantin,
I think I almost fall in the hell!
I can’t build it successfully. The error info is “unresolved external
symbol UniToBCS”, but I have included “ifs.h” & vxdwraps.h. Do it need other
LIB?
In fact, I just want to find a way to format my string as SPRINTF does.
Any hints or other advice ?
Anthony
“Konstantin Manurin” ??? news:xxxxx@ntdev…
>
> You can’t link VXD driver with import libraries even if it succeeds!!! VXD
> can only have so-called dynamic link calls.
>
> Sorry, but it’s not so easy to call several WDM functions (especially with
> __cdecl) from VXD drivers. There is WDMVXD.CLB static library in Win98 DDK
> which contains WDMJmp wrappers for many WDM functions (which allow you to
> call WDM functions thru INT 2E interface), but this library doesn’t
contain
> symbols like__imp__sprintf etc (only WDMsprintf).
>
> But you can still link your VXD driver with LIBCNTPR.LIB library defining
> this function somewhere in your code:
>
> //============================================================
> NTSTATUS__stdcall RtlUnicodeToMultiByteN(PCHAR MbString,ULONG MbSize,
> PULONG ResultSize,PWCHAR UnicodeString,ULONG UnicodeSize)
> {
> ULONG result;
>
> result=UniToBCS(MbString,UnicodeString,UnicodeSize,MbSize,BCS_WANSI);
> if (ResultSize)
> {
> *ResultSize=result;
> }
>
> return STATUS_SUCCESS;
> }
> //============================================================
>
> UniToBCS is a VXD service which is declared in IFS.H and VXDWRAPS.H files.
>
> But if you need only sprintf() functionality you can use _Sprintf VXD
> service. It’s exactly the same as sprintf() function.
>
> ----- Original Message -----
> From: “Anthony”
> Newsgroups: ntdev
> To: “Windows System Software Developers Interest List”
> Sent: Wednesday, July 16, 2003 9:22 AM
> Subject: [ntdev] Re: sprintf in 98 !!!
>
>
> > Dear Konstantin,
> >
> > Thanks a lot. Following your way, I can build and link my driver
> > successfully. BTW, I am programming a VXD driver.
> >
> > But unfortunately I can’t active my driver again. It’s so strange!!!
> >
> > In the user interface, I use CreateFile to active my driver and it
> fails
> > all the time, as the same as I user DriverMonitor to do it. When I
remark
> > the codes which use SPRINTF, it woks again.
> >
> > I don’t know what is up???
> >
> > Please give me more hints, thanks!
> >
> >
> > Anthony
> >
> >
> >
> > “Konstantin Manurin” ???
> news:xxxxx@ntdev…
> > >
> > > This function is exported from NTKERN.VXD module in Win98/98SE, but
it’s
> > not
> > > declared in WDM.H from Win98 DDK. So use this declaration:
> > >
> > > NTSYSAPI
> > > NTSTATUS
> > > __stdcall
> > > RtlUnicodeToMultiByteN(
> > > PCHAR MbString,
> > > ULONG MbLength,
> > > PULONG ResultSize,
> > > PWCHAR UnicodeString,
> > > ULONG UnicodeSize
> > > );
> > >
> > > Plus this function is not included in WDM.LIB library, but
NTOSKRNL.LIB
> > > contains it. So you should link your project with NTOSKRNL.LIB
> > >
> > > But I totally forgot that a whole lot of run-time functions are
exported
> > > from NTOSKRNL.EXE. So you don’t have to link your project with
> > LIBCNTPR.LIB
> > > static library. I tested sprintf() call in my test project this
morning
> > and
> > > sprintf() call goes to NTOSKRNL.EXE module (acording to disassemly).
So
> > this
> > > should work without any additional static libraries.
> > >
> > > By the way, which type of driver do you build - WDM or VXD???
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: “Anthony”
> > > Newsgroups: ntdev
> > > To: “Windows System Software Developers Interest List”
> >
> > > Sent: Tuesday, July 15, 2003 6:05 AM
> > > Subject: [ntdev] Re: sprintf in 98 !!!
> > >
> > >
> > > > Hello Konstantin,
> > > >
> > > > Thanks for your advice.
> > > >
> > > > But it still doesn’t work well in windows 98. I include this lib
> > > > “libcntpr.lib” in my driver, but the compiler stops at “unresolved
> > > external
> > > > symbol _RtlUnicodeToMultiByteN@20”
> > > >
> > > > I check it in MSDN, and RtlUnicodeToMultiByteSize is only
available
> > > from
> > > > win2000.
> > > >
> > > > I can’t check it out. Thanks for your further advice.
> > > >
> > > > Anthony
> > > >
> > > >
> > > > “Konstantin Manurin” ???
> > > news:xxxxx@ntdev…
> > > > >
> > > > > You should link your driver with “libcntpr.lib” static library
> > (located
> > > in
> > > > > the DDK lib directory). I did it myself some years ago and
> everything
> > > > worked
> > > > > fine for me. By the way, this static library contains many other
> > > so-called
> > > > > “run-time” functions that are frequently used for user-mode
> > programming
> > > > > (e.g. strlen(), strcat(), strcpy(), wcslen() etc.).
> > > > >
> > > > >
> > > > > Konstantin Manurin
> > > > > Programmer
> > > > > Nival Interactive
> > > > > mailto:xxxxx@nival.com
> > > > >
> > > > > 10a bld. 5, 1st Volokolamsky proezd
> > > > > Moscow 123060 Russia
> > > > > Tel: +7 (095) 363-9630
> > > > > Fax: +7 (095) 363-9631
> > > > > http://www.nival.com
> > > > > http://www.etherlords.com
> > > > > http://www.evil-islands.com
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntdev as:
xxxxx@nival.com
> > > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@nival.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
>
Anthony wrote:
In fact, I just want to find a way to format my string as SPRINTF does.
It seems to me that there are _Sprintf and _Vsprintf services in VMM.H.
–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com
Hello Walter,
Thanks for your advice.
Could you tell me how to call this service in a VXD? Some codes are
much better.
Anthony
“Walter Oney” ??? news:xxxxx@ntdev…
>
> Anthony wrote:
> > In fact, I just want to find a way to format my string as SPRINTF
does.
>
> It seems to me that there are _Sprintf and _Vsprintf services in VMM.H.
>
> –
> Walter Oney, Consulting and Training
> Basic and Advanced Driver Programming Seminars
> Check out our schedule at http://www.oneysoft.com
>
>
Anthony,
I actually should have said look at the samples and Windows 98
DDK. Do you believe what I found in 2 minutes of time spent on doing a
search?
e:\98ddk\inc\win98\VXDWRAPS.H(244):MAKE_HEADER(ULONG,_cdecl,_Sprintf,
(PCHAR pszBuf, PCHAR pszFmt, …))
e:\98ddk\inc\win98\VXDWRAPS.H(287):MAKE_HEADER(ULONG,_cdecl,_Vsprintf,(P
CHAR pchBuffer, PCHAR pszFormat, PVOID paParameters))
What this mean you can just call sprint function as follows
_Sprintf(Buffer, “%s”, “???\n”);
I will leave _Vsprintf as an exercise for you…
e:\98ddk\src\input\digijoy\i386\WRAPS.H(40):ULONG VXDINLINE __stdcall
SprintfOne( PCHAR pszBuf, PCHAR pszFmt, DWORD dwNum )
ULONG VXDINLINE __stdcall SprintfOne( PCHAR pszBuf, PCHAR pszFmt, DWORD
dwNum )
{
__asm push dwNum
Touch_Register(eax)
__asm push pszFmt
Touch_Register(ecx)
__asm push pszBuf
Touch_Register(edx)
VMMCall( _Sprintf );
__asm add esp,3*4
}
you can call this function as follows.
e:\98ddk\src\input\digijoy\i386\MAIN.C(225): SprintfOne( regval,
REGSTR_VAL_JOYNCONFIG, dwId+1 );
-Srin.
-----Original Message-----
From: Anthony [mailto:xxxxx@hotmail.com]
Sent: Wednesday, July 16, 2003 9:40 PM
To: Windows System Software Developers Interest List
Subject: [ntdev] Re: sprintf in 98 !!!Hello Walter,
Thanks for your advice.
Could you tell me how to call this service in a VXD? Some codes
are
much better.Anthony
“Walter Oney” ??? news:xxxxx@ntdev…
> >
> > Anthony wrote:
> > > In fact, I just want to find a way to format my string as
SPRINTF
> does.
> >
> > It seems to me that there are _Sprintf and _Vsprintf services in
VMM.H.
> >
> > –
> > Walter Oney, Consulting and Training
> > Basic and Advanced Driver Programming Seminars
> > Check out our schedule at http://www.oneysoft.com
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nai.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Dear Anthony.
As I wrote in my previous post if you need only sprintf() functionality you
can use _Sprintf VXD service. It’s exactly the same as sprintf() function.
On the whole if you’re going to use any VXD wrappers you should link your
VXD project with VXDWRAPS.CLB static library. But this library contains only
basic VXD service wrappers. So you should either create your own wrappers
(see BASE\VXDWRAPS folder in Win98 DDK as an example) or define necessary
VXD services as inline functions.
----- Original Message -----
From: “Anthony”
Newsgroups: ntdev
To: “Windows System Software Developers Interest List”
Sent: Thursday, July 17, 2003 6:49 AM
Subject: [ntdev] Re: sprintf in 98 !!!
> Hello Konstantin,
>
> I think I almost fall in the hell!
>
> I can’t build it successfully. The error info is “unresolved external
> symbol UniToBCS”, but I have included “ifs.h” & vxdwraps.h. Do it need
other
> LIB?
>
> In fact, I just want to find a way to format my string as SPRINTF does.
>
> Any hints or other advice ?
>
>
> Anthony
>
>
>
>
> “Konstantin Manurin” ???
news:xxxxx@ntdev…
> >
> > You can’t link VXD driver with import libraries even if it succeeds!!!
VXD
> > can only have so-called dynamic link calls.
> >
> > Sorry, but it’s not so easy to call several WDM functions (especially
with
> > __cdecl) from VXD drivers. There is WDMVXD.CLB static library in Win98
DDK
> > which contains WDMJmp wrappers for many WDM functions (which allow you
to
> > call WDM functions thru INT 2E interface), but this library doesn’t
> contain
> > symbols like__imp__sprintf etc (only WDMsprintf).
> >
> > But you can still link your VXD driver with LIBCNTPR.LIB library
defining
> > this function somewhere in your code:
> >
> > //============================================================
> > NTSTATUS__stdcall RtlUnicodeToMultiByteN(PCHAR MbString,ULONG MbSize,
> > PULONG ResultSize,PWCHAR UnicodeString,ULONG UnicodeSize)
> > {
> > ULONG result;
> >
> >
result=UniToBCS(MbString,UnicodeString,UnicodeSize,MbSize,BCS_WANSI);
> > if (ResultSize)
> > {
> > *ResultSize=result;
> > }
> >
> > return STATUS_SUCCESS;
> > }
> > //============================================================
> >
> > UniToBCS is a VXD service which is declared in IFS.H and VXDWRAPS.H
files.
> >
> > But if you need only sprintf() functionality you can use _Sprintf VXD
> > service. It’s exactly the same as sprintf() function.
> >
> > ----- Original Message -----
> > From: “Anthony”
> > Newsgroups: ntdev
> > To: “Windows System Software Developers Interest List”
>
> > Sent: Wednesday, July 16, 2003 9:22 AM
> > Subject: [ntdev] Re: sprintf in 98 !!!
> >
> >
> > > Dear Konstantin,
> > >
> > > Thanks a lot. Following your way, I can build and link my driver
> > > successfully. BTW, I am programming a VXD driver.
> > >
> > > But unfortunately I can’t active my driver again. It’s so
strange!!!
> > >
> > > In the user interface, I use CreateFile to active my driver and it
> > fails
> > > all the time, as the same as I user DriverMonitor to do it. When I
> remark
> > > the codes which use SPRINTF, it woks again.
> > >
> > > I don’t know what is up???
> > >
> > > Please give me more hints, thanks!
> > >
> > >
> > > Anthony
> > >
> > >
> > >
> > > “Konstantin Manurin” ???
> > news:xxxxx@ntdev…
> > > >
> > > > This function is exported from NTKERN.VXD module in Win98/98SE, but
> it’s
> > > not
> > > > declared in WDM.H from Win98 DDK. So use this declaration:
> > > >
> > > > NTSYSAPI
> > > > NTSTATUS
> > > > __stdcall
> > > > RtlUnicodeToMultiByteN(
> > > > PCHAR MbString,
> > > > ULONG MbLength,
> > > > PULONG ResultSize,
> > > > PWCHAR UnicodeString,
> > > > ULONG UnicodeSize
> > > > );
> > > >
> > > > Plus this function is not included in WDM.LIB library, but
> NTOSKRNL.LIB
> > > > contains it. So you should link your project with NTOSKRNL.LIB
> > > >
> > > > But I totally forgot that a whole lot of run-time functions are
> exported
> > > > from NTOSKRNL.EXE. So you don’t have to link your project with
> > > LIBCNTPR.LIB
> > > > static library. I tested sprintf() call in my test project this
> morning
> > > and
> > > > sprintf() call goes to NTOSKRNL.EXE module (acording to disassemly).
> So
> > > this
> > > > should work without any additional static libraries.
> > > >
> > > > By the way, which type of driver do you build - WDM or VXD???
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: “Anthony”
> > > > Newsgroups: ntdev
> > > > To: “Windows System Software Developers Interest List”
> > >
> > > > Sent: Tuesday, July 15, 2003 6:05 AM
> > > > Subject: [ntdev] Re: sprintf in 98 !!!
> > > >
> > > >
> > > > > Hello Konstantin,
> > > > >
> > > > > Thanks for your advice.
> > > > >
> > > > > But it still doesn’t work well in windows 98. I include this
lib
> > > > > “libcntpr.lib” in my driver, but the compiler stops at “unresolved
> > > > external
> > > > > symbol _RtlUnicodeToMultiByteN@20”
> > > > >
> > > > > I check it in MSDN, and RtlUnicodeToMultiByteSize is only
> available
> > > > from
> > > > > win2000.
> > > > >
> > > > > I can’t check it out. Thanks for your further advice.
> > > > >
> > > > > Anthony
> > > > >
> > > > >
> > > > > “Konstantin Manurin” ???
> > > > news:xxxxx@ntdev…
> > > > > >
> > > > > > You should link your driver with “libcntpr.lib” static library
> > > (located
> > > > in
> > > > > > the DDK lib directory). I did it myself some years ago and
> > everything
> > > > > worked
> > > > > > fine for me. By the way, this static library contains many other
> > > > so-called
> > > > > > “run-time” functions that are frequently used for user-mode
> > > programming
> > > > > > (e.g. strlen(), strcat(), strcpy(), wcslen() etc.).
> > > > > >
> > > > > >
> > > > > > Konstantin Manurin
> > > > > > Programmer
> > > > > > Nival Interactive
> > > > > > mailto:xxxxx@nival.com
> > > > > >
> > > > > > 10a bld. 5, 1st Volokolamsky proezd
> > > > > > Moscow 123060 Russia
> > > > > > Tel: +7 (095) 363-9630
> > > > > > Fax: +7 (095) 363-9631
> > > > > > http://www.nival.com
> > > > > > http://www.etherlords.com
> > > > > > http://www.evil-islands.com
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > —
> > > > > You are currently subscribed to ntdev as:
> xxxxx@nival.com
> > > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@nival.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nival.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Hello
Konstantin , Srin_Kumar, Walter,
Now I do not know how to express my feeling.
You are GREAT! I resolve my puzzle with your help. Thanks a lot!
I am just a layman about DDK programming, but I find I can learn it quickly
by getting valuable and useful help here.
Thanks again. Hope you can stil help me!
Anthony
“Anthony” дÈëÓʼþ news:xxxxx@ntdev…
>
> Hello all tops,
>
> I am programming a imd driver.sprintf() works very well in 2000&xp, but
> not in 98. I can’t find the right LIB.
>
> Any hints are highly appreciated!!
>
> Anthony
>
>
>
>
Hello tops,
I know you have a lot exp about VXD programming.
Now I am programming a VXD packet filter in 98. Sometimes, I have to
include “wdm.h” and “ndis.h” in a file. But they are conflict.
I know I can resolve ie by redefining some macro in NT programming, but it
does not work in 98.
Any idea?
Anthony
“Anthony” дÈëÓʼþ news:xxxxx@ntdev…
>
> Hello all tops,
>
> I am programming a imd driver.sprintf() works very well in 2000&xp, but
> not in 98. I can’t find the right LIB.
>
> Any hints are highly appreciated!!
>
> Anthony
>
>
>
>
Dear Anthony.
Some good advice: when you have some free time take a glance at DDK header
files and also DDK master make files. Beleive me you’ll learn many
interesting things which you won’t find in DDK help files. Especially it
concerns VXD programming :-)))) And of course, driver programming books,
especially from Walter Oney. And at last but definitely not least – THE
GREATEST NTDEV LIST!!!
----- Original Message -----
From: “Anthony”
Newsgroups: ntdev
To: “Windows System Software Developers Interest List”
Sent: Thursday, July 17, 2003 12:30 PM
Subject: [ntdev] Re: sprintf in 98 !!!
> Hello
> Konstantin , Srin_Kumar, Walter,
>
> Now I do not know how to express my feeling.
>
> You are GREAT! I resolve my puzzle with your help. Thanks a lot!
>
> I am just a layman about DDK programming, but I find I can learn it
quickly
> by getting valuable and useful help here.
>
> Thanks again. Hope you can stil help me!
>
> Anthony
>
> “Anthony” дÈëÓʼþ news:xxxxx@ntdev…
> >
> > Hello all tops,
> >
> > I am programming a imd driver.sprintf() works very well in 2000&xp,
but
> > not in 98. I can’t find the right LIB.
> >
> > Any hints are highly appreciated!!
> >
> > Anthony
> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nival.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>