RE: FONTOBJ_pwszFontFilePaths question by bobbym
bobbym
Fri Dec 03 19:30:06 CST 2004
------=_NextPart_0001_D3716C04
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Luminita,
FONTOBJ_pwszFontFilePaths doesn?t have a corresponding user mode entry
point, unlike the rest of FONTOBJ_... calls.
So you won't be able to use it from your usermode driver.
--------------------
From: "Luminita" <magisoft@zappmobile.ro>
Subject: FONTOBJ_pwszFontFilePaths question
Date: Fri, 3 Dec 2004 13:01:23 +0200
Hello
I am writing a user mode printer driver for Win XP/2000 and I need to find
out the font file names for the fonts passed in DrvTextOut().
In the DDK documentation I found that FONTOBJ_pwszFontFilePaths seems to
return the exact information I want. But I could not use it, and here I have
some questions:
1. Is the FONTOBJ_pwszFontFilePaths working only in the kernel mode drivers?
Because mine is a user mode driver, so could it be that I cannot use it at
all?
2. The DDK documentation says that we have to find the function address by
calling EngFindImageProcAddress function. This seems to work only in kernel
mode drivers and returns always NULL pointers when I call it from the user
mode driver.
So I used instead GetProcAddress() function:
typedef VOID (*FONTFILEPROC)(FONTOBJ*, ULONG);
HMODULE hMod = GetModuleHandle(TEXT("GDI32.dll"));
FONTFILEPROC ProcAdd = (FONTFILEPROC) GetProcAddress(hMod,
"FONTOBJ_pwszFontFilePaths")
This seems to work for other FONTOBJ_xxx services but not for
FONTOBJ_pwszFontFilePaths.
Is this service implemented in other dll, not in the gdi32.dll?
Thank you
Luminita
Hope this helps.
Thank you,
Bobby Mattappally
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
------=_NextPart_0001_D3716C04
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\li720\f0\fs20 Luminita,
\par
\par FONTOBJ_pwszFontFilePaths doesn\rquote t have a corresponding user mode entry point, unlike the rest of FONTOBJ_... calls.
\par So you won't be able to use it from your usermode driver.
\par
\par --------------------
\par From: "Luminita" <magisoft@zappmobile.ro>
\par Subject: FONTOBJ_pwszFontFilePaths question
\par Date: Fri, 3 Dec 2004 13:01:23 +0200
\par
\par Hello
\par
\par I am writing a user mode printer driver for Win XP/2000 and I need to find
\par out the font file names for the fonts passed in DrvTextOut().
\par
\par In the DDK documentation I found that FONTOBJ_pwszFontFilePaths seems to
\par return the exact information I want. But I could not use it, and here I have
\par some questions:
\par
\par 1. Is the FONTOBJ_pwszFontFilePaths working only in the kernel mode drivers?
\par Because mine is a user mode driver, so could it be that I cannot use it at
\par all?
\par
\par 2. The DDK documentation says that we have to find the function address by
\par calling EngFindImageProcAddress function. This seems to work only in kernel
\par mode drivers and returns always NULL pointers when I call it from the user
\par mode driver.
\par So I used instead GetProcAddress() function:
\par
\par typedef VOID (*FONTFILEPROC)(FONTOBJ*, ULONG);
\par
\par HMODULE hMod = GetModuleHandle(TEXT("GDI32.dll"));
\par
\par FONTFILEPROC ProcAdd = (FONTFILEPROC) GetProcAddress(hMod,
\par "FONTOBJ_pwszFontFilePaths")
\par
\par This seems to work for other FONTOBJ_xxx services but not for
\par FONTOBJ_pwszFontFilePaths.
\par
\par Is this service implemented in other dll, not in the gdi32.dll?
\par
\par Thank you
\par Luminita
\par
\par
\par \pard
\par
\par Hope this helps.
\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_D3716C04--