Hello,
First thing is you are asking wrong questions at wrong place, you should post them on NTDEV.
Following are my comments about ur questions
First:
I dont know
Second:
Couple of reasons:
- The function is not called at all. Make sure that notepad/MSWORD invokes PrintDlg(A/W) function.
- Since you are having a user mode hook make sure that u are actually hooking the functions in that process’s address space. Well this is a most fundamental thing of user mode hooking and you might already be doing it.
- Your hooking logic has gone wrong. May be your DLL is not getting injected properly, you are not hooking the proper functions etc. What function are u hooking PrintDlgA or PrintDlgW?
Third:
These are the values which I have copied form wingdi.h. I think you are using a very old SDK version. Upgrade the SDK to the latest version.
#define DMNUP_SYSTEM 1
#define DMNUP_ONEUP 2
Coming back to what Microsoft is doing on this earth, I think Microsoft is distributing platform SDKs which MS expects ppl to install and upgrade periodically, secondly it is distributing MSDN which contains ample of information on how to do user mode hooking properly, and lastly it is supporting the NTFSD mailing list which is meant for File System related discussions but still ppl on this list do answer totally unrelated questions of user mode hooking…
thanks
-Kiran
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of (SCT)???
Sent: Wednesday, November 26, 2003 2:28 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Why cannot I get dmCopies from DEVMODE when I print in
MSWORD?
Hello,
I am trying to develop a print monitor.But I get a serveral problem.Wish
somebody could give me any help.
First,I hooked EndDocPrinter API and use GetJob to retrive information of
Job.Most parameter in DEVMODE structure is right,but when I print a document
in MSWORD, dmCopies always is set “1”. This is why? Is this a bug of
Microsoft?
Second, I hooked Windows API PrintDlg, but when I print in notepad,MSWORD
etc…PrintDlg is not be passthrough.This is why? PrintDlg is not be
invoked when printing in Notpad,MSWORD?
Third,In DEVMODE structure,there is a parameter named “dmNup”, and it has
relation with two const “DMNUP_SYSTEM” and “DMNUP_ONEUP”,all of them is not
available.That means I cannot find their protype or declaration in
wingdi.h.This is why? What on earch is Microsoft doing?
Who can help me?
Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@calsoftinc.com
To unsubscribe send a blank email to xxxxx@lists.osr.com