RE: How do I get a 32-bit application name while printing from 64-bit OS? by bobbym
bobbym
Wed Jan 04 13:55:59 CST 2006
------=_NextPart_0001_37BD3C8F
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
--------------------
Reply-To: "M Venkata Nagaraja" <mvnagaraja@ssdi.sharp.co.in>
From: "M Venkata Nagaraja" <mvnagaraja@ssdi.sharp.co.in>
Subject: How do I get a 32-bit application name while printing from 64-bit
OS?
Date: Wed, 4 Jan 2006 14:46:04 +0530
Lines: 17
Organization: SHARP
Hello Everyone
We are developing printer drivers. We need to know the application name from
which current print job is made. We were using GetModuleFileName() API while
developing 32-bit printer drivers. Ssame code base is used for developing
64-bit drivers.
My current problem is that, this API always returns SPLWOW64.EXE while
printing from a 32-bit application in 64-bit OS.
Can any body help in getting the actual application name from which print
job is made?
Regards
Nagaraj
Hi Nagaraj,
This is a known issue with wow64 printing and unfortunately there is no
workaround.
The GetModuleFileName can only get the file image for the current calling
process.
In the 32 app running on 64 bit OS, the driver is 64 bit and the 32 bit App
operation
is redirect to splwow64.exe then calling into printer driver. Due to the
existing splwow64
proxy/thunking layer, GetModuleFileName will return the splwow64.exe to the
driver code.
We are investigating whether something can be done in the spooler code to
take care of this.
Thank you,
Bobby Mattappally
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
------=_NextPart_0001_37BD3C8F
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20
\par \pard\li720 --------------------
\par Reply-To: "M Venkata Nagaraja" <mvnagaraja@ssdi.sharp.co.in>
\par From: "M Venkata Nagaraja" <mvnagaraja@ssdi.sharp.co.in>
\par Subject: How do I get a 32-bit application name while printing from 64-bit OS?
\par Date: Wed, 4 Jan 2006 14:46:04 +0530
\par Lines: 17
\par Organization: SHARP
\par
\par
\par Hello Everyone
\par
\par We are developing printer drivers. We need to know the application name from
\par which current print job is made. We were using GetModuleFileName() API while
\par developing 32-bit printer drivers. Ssame code base is used for developing
\par 64-bit drivers.
\par
\par My current problem is that, this API always returns SPLWOW64.EXE while
\par printing from a 32-bit application in 64-bit OS.
\par
\par Can any body help in getting the actual application name from which print
\par job is made?
\par
\par Regards
\par Nagaraj
\par
\par
\par \pard Hi Nagaraj,
\par This is a known issue with wow64 printing and unfortunately there is no workaround.
\par The GetModuleFileName can only get the file image for the current calling process.
\par In the 32 app running on 64 bit OS, the driver is 64 bit and the 32 bit App operation
\par is redirect to splwow64.exe then calling into printer driver. Due to the existing splwow64
\par proxy/thunking layer, GetModuleFileName will return the splwow64.exe to the driver code.
\par
\par We are investigating whether something can be done in the spooler code to take care of this.
\par
\par
\par Thank you,
\par Bobby Mattappally
\par Microsoft
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par
\par }
------=_NextPart_0001_37BD3C8F--