basic question about porting 32 bit driver to 64 bit windows

device driver

    Sponsored Links

    Next

  • 1. About NdisQueryPacket!!
    hi,everyone: I am writint an IMD driver using 2003 DDK. But now , I find there's something wrong with NdisQueryPacket: In function MPSendPackets( or MPSend), I access the Packet through the following code: VOID PrintPacket(IN PNDIS_PACKET Packet) { PNDIS_BUFFER BuffDT = NULL; UINT PhyBufCount = 0; UINT BufCount = 0; PUCHAR BuffVA = NULL; UINT TotalPacketSize; NdisQueryPacket(Packet,&PhyBufCount,&BufCount,&BuffDT,&TotalPacketSize); DbgPrint("PhyBufCount = %d BufCount =%d TotalPacketSize =%d\n",PhyBufCount,BufCount,TotalPacketSize); } Unfortunately, sometimes(when accessed through the network neighbor), the value of TotalPacketSize is bigger than 1514 which is the max size of Ethernet frame. why ? any idea? thanks you very much.
  • 2. KeWaitForSingleObject and SMP machines
    Does anyone know for certain if KeWaitForSingleObject is multi-processor safe. In other words, is it SMP safe.
  • 3. Inheritance
    Hi, I trying to derived two different struct from the base one. typedef struct _COMMON_BASE_ { ..... }BASE_ONE, *PBASE_ONE; typedef struct _DERIVED_ONE_ : public _COMMON_BASE_ { ..... }DERIVED_ONE, *PDERIVED_ONE; typedef struct _DERIVED_TWO_ : public _COMMON_BASE_ { ..... }DERIVED_TWO, *PDERIVED_TWO; and when I run "build" i have error complaining about ":". I built the same code in VS with no problem. Could you point what I'm doing wrong ? thank you
  • 4. file object address
    Can I rely on the file object address in my file system filter driver during all the life-time of the object? In other words, is file object can be found at the same memory address during all the life-time till the last close operation?
  • 5. USB HID Power class device cause windows 98 delay shutdown for 1 m
    Hi, I develop a UPS device it belong to USB HID class and Power subclass, once this device plug on system, and you shudown windows later, it cause windows hang on screen "windows is shuting down" for one minute then actually shutdown completely. if I unplug it before ask windows to shut down, and windows will shutdown immediately without any waiting. I don't know why ? this situation would not happen on Windows XP/2000, only on 98/98SE/ME. did you have any idea for this condition ? Thanks.

basic question about porting 32 bit driver to 64 bit windows

Postby rkhazin » Thu, 06 Oct 2005 06:52:45 GMT

Can a 64 bit driver be build on a 32 bit windows 2000 machine with the
w2k server 2003 sp1 ddk? Or must the 64 bit driver be build on a
machine running 64 bit windows?


Re: basic question about porting 32 bit driver to 64 bit windows

Postby Don Burn » Thu, 06 Oct 2005 07:03:39 GMT

You can build a 64 bit driver on a 32-bit host.


-- 
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply










Re: basic question about porting 32 bit driver to 64 bit windows

Postby rkhazin » Thu, 06 Oct 2005 07:30:10 GMT

Thanks.
Is there an FAQ or guide somewhere that details what I will need to
change in my VC project and source code in order to build it into a 64
bit driver? Things such as preprocessor definitions, compile and link
settings, etc.? I've already installed the latest w2k server 2003 sp1
ddk on my W2K development machine but didn't see any 64 bit driver
samples to experimwnt with.
Thanks.


Re: basic question about porting 32 bit driver to 64 bit windows

Postby Don Burn » Thu, 06 Oct 2005 07:32:18 GMT

Well this is why most of use BUILD or DDKBUILD to driver a BUILD script. 
Trying to get the settings right in Visual Studio are a pain, especially 
since the compiler has to be the one from the DDK.


-- 
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply










Re: basic question about porting 32 bit driver to 64 bit windows

Postby Stephan Wolf [MVP] » Thu, 06 Oct 2005 18:57:31 GMT

See also

  http://www.**--****.com/ 
  > 64-bit Driver Guidelines

  http://www.**--****.com/ 
  > Win32 and COM Development
   > Design Guide
    > Driver Programming Techniques
     > 64-Bit Issues

Stephan
---




Similar Threads:

1.Porting Windows 32 bit driver to 64 bit Windows

Hi,

I have a WDM driver working in 32 bit windows. I need to port it to 64
bit world.
I have started with all the basics but the driver build settings are
failing. I have installed WinDDK . Its not working.
Also what are the steps necessary to port the driver . I am aware of
the address space for 64 bit and its increase in size for pointers.
The build settings work fine on 32 bit , but when i try to build it for
64 bit it fails. I am building the driver on 32 Bit windows XP. Are
there any switches to be added in order to build.

It will be very helpful if someone informs about the procedure.

Any help in this regard is appreciated.

2.ODBC 32/64 bit Drivers for Microsoft access on Windows 7 64 bit

We have a suit of applications that we are porting to 64 bit. We are not 
upgrading the VB applications but updating the C++ applications to 64 bit.

Issue is both VB and C++ applications are accessing the mdb files. So C++ 
need to access mdb files via 64 bit driver and the VB applications need to 
connect via 32 bit drivers.

Office 2010 has ODBC 64 bit drivers but will it be available for Office 64 
bit only or with Office 32 bit as well. Reason for asking this question is as 
client can install any Office version on 64 bit machine. Also will these 
drivers be availabel standalone...?


3.Using a Windows XP 64 bit print driver on a 32 bit Windows 2003 Print Server

Hello chaps and ladies,

I have just rolled out a few 64 bit XP Pro clients and am having some
difficulties with our network printers. I have Lexmark Optra 1200,
W810 and M410s. The drivers for which *are* included with Windows XP
64 bit edition.... However, when I browse to those printers shared off
our network print server (32bit Windows 2003 Server) I get an error to
the effect that the print drivers on the server are not correct. That
is fine... They are not... However I have tried to update the Print
Server to add the 64 bit client drivers, but I cannot. How can I
extract the printer drivers from Windows XP 64? I can get the driver
files, but I am still lacking an inf file, and despite dumping all the
inf files that I can find which mention "Lexmark" from the Windows OS
directories and the driver files into a directory, the driver will not
install.

Lexmark do not have any 64 bit print drivers on their website, so I
cannot got them from there. It seems ridiculous, that in effect, I
have the drivers, but I cannot deploy them for lack of an inf file.
*grumbles*

Help! Any suggestions? 

Thanks.

-- 
Alex Griffin 

4.system crash printing on FILE port on AMD 64-bit XP from 32 bit a

Hi Shiva,

>pvBits 
>Pointer to the first scan line of the bitmap that is to be created. If this parameter >is null, GDI allocates the storage space for the pixels of the bitmap. If pvBits is not >NULL, it is a pointer to the buffer for the bitmap.

I work on 32bit GDI printer drivers.. Just give a try,  let GDI allocate the 
memory for you.
set pvBits = NULL .. I feel that User memory cannot be passed to 
EngWritePrinter by the printer driver.

Hth,

"ShivaP" wrote:

> Hi all,
> 
> We modified the MSPLOT printer driver sample in ddk to create a GDI
> managed surface using engcreatebitmap in DrvEnableSurface.
> 
> The last parameter of engcreatebitmap function,
> 
> HBITMAP
> 
>   EngCreateBitmap(
> 
>     IN SIZEL  sizl,
> 
>     IN LONG  lWidth,
> 
>     IN ULONG  iFormat,
> 
>     IN FLONG  fl,
> 
>     IN PVOID  pvBits
> 
>     );
> 
> pvBits is given a pointer to the allocated buffer.
> 
> Using 32bit application when given Print to file or FILE port, the
> system crashes with BUGCHECK 0x03 SYSTEM_SERVICE_EXCEPTION.
> 
> But when using 64 bit application on the same printer driver, the crash
> does not occur.
> 
> Platform:-
> AMD 64-bit XP Beta
> 
> Is there any known problem with splwow64.exe?
> 
> Thanks,
> 
> Shiva P
> 
> 

5.system crash printing on FILE port on AMD 64-bit XP from 32 bit application

Hi all,

We modified the MSPLOT printer driver sample in ddk to create a GDI
managed surface using engcreatebitmap in DrvEnableSurface.

The last parameter of engcreatebitmap function,

HBITMAP

  EngCreateBitmap(

    IN SIZEL  sizl,

    IN LONG  lWidth,

    IN ULONG  iFormat,

    IN FLONG  fl,

    IN PVOID  pvBits

    );

pvBits is given a pointer to the allocated buffer.

Using 32bit application when given Print to file or FILE port, the
system crashes with BUGCHECK 0x03 SYSTEM_SERVICE_EXCEPTION.

But when using 64 bit application on the same printer driver, the crash
does not occur.

Platform:-
AMD 64-bit XP Beta

Is there any known problem with splwow64.exe?

Thanks,

Shiva P

6. 32-bit Drivers under Windows XP 64-Bit System

7. Adding Windows 7 64 bit Print Driver to Server 2003 32 bit

8. Installing 64-bit print drivers on 32-bit Windows Server 2003



Return to device driver

 

Who is online

Users browsing this forum: No registered users and 30 guest