Click here to Skip to main content
15,898,920 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFindFirstPrinterChangeNotification() fail! Pin
szcococut27-Feb-06 15:43
szcococut27-Feb-06 15:43 
Iuse Administrator to Logged on My widnow xp.
I enum the share printer connected in the network.
I use openprinters() to open the printer ,it success.
I get the printer handle.
then I use FindFirstPrinterChangeNotification() to Monitor the printer ,it fail ,the Error code is 5(ERROR_ACCESS_DENIED).

but if Use the domain user to logged on my window xp(just like: domain1\\user1),
all is good .

why?
what different between of administrator(local) and domain1\\user1(domain)?
how to fix it?
thanks!

my code like this:

hPrinterNotification = FindFirstPrinterChangeNotification(
ThreadParam.hPrinter,
PRINTER_CHANGE_DELETE_JOB,
0,
&NotificationOptions);
if (hPrinterNotification == INVALID_HANDLE_VALUE)
{
CString strE;
strE.Format ("FindFirstPrinterChangeNotification failed! Error code = %d",GetLastError());
return 0;
}


-- modified at 21:47 Monday 27th February, 2006
AnswerRe: FindFirstPrinterChangeNotification() fail! Pin
Blake Miller1-Mar-06 9:28
Blake Miller1-Mar-06 9:28 
GeneralRe: FindFirstPrinterChangeNotification() fail! Pin
szcococut1-Mar-06 21:37
szcococut1-Mar-06 21:37 
GeneralRe: FindFirstPrinterChangeNotification() fail! Pin
Blake Miller2-Mar-06 4:16
Blake Miller2-Mar-06 4:16 
Questioninvisible c++ mfc app Pin
yageroy27-Feb-06 15:41
yageroy27-Feb-06 15:41 
AnswerRe: invisible c++ mfc app Pin
Hamid_RT27-Feb-06 17:11
Hamid_RT27-Feb-06 17:11 
GeneralRe: invisible c++ mfc app Pin
yageroy27-Feb-06 17:30
yageroy27-Feb-06 17:30 
GeneralRe: invisible c++ mfc app Pin
Hamid_RT27-Feb-06 17:44
Hamid_RT27-Feb-06 17:44 
GeneralRe: invisible c++ mfc app Pin
yageroy27-Feb-06 17:46
yageroy27-Feb-06 17:46 
AnswerRe: invisible c++ mfc app Pin
Ryan Binns27-Feb-06 17:56
Ryan Binns27-Feb-06 17:56 
GeneralRe: invisible c++ mfc app Pin
yageroy27-Feb-06 18:12
yageroy27-Feb-06 18:12 
QuestionHow to set color in each item in CCombobox Pin
lorey27-Feb-06 15:31
lorey27-Feb-06 15:31 
AnswerRe: How to set color in each item in CCombobox Pin
mbue27-Feb-06 15:40
mbue27-Feb-06 15:40 
AnswerRe: How to set color in each item in CCombobox Pin
Nibu babu thomas27-Feb-06 17:19
Nibu babu thomas27-Feb-06 17:19 
AnswerRe: How to set color in each item in CCombobox Pin
Hamid_RT27-Feb-06 17:31
Hamid_RT27-Feb-06 17:31 
QuestionUI Programming start Pin
Chintoo72327-Feb-06 14:46
Chintoo72327-Feb-06 14:46 
AnswerRe: UI Programming start Pin
_AnsHUMAN_ 27-Feb-06 16:45
_AnsHUMAN_ 27-Feb-06 16:45 
GeneralRe: UI Programming start Pin
Chintoo72327-Feb-06 17:31
Chintoo72327-Feb-06 17:31 
GeneralRe: UI Programming start Pin
_AnsHUMAN_ 27-Feb-06 18:10
_AnsHUMAN_ 27-Feb-06 18:10 
QuestionHow to Compute the ID of "eject" menuitem? Pin
Syouki_kou27-Feb-06 14:07
Syouki_kou27-Feb-06 14:07 
AnswerRe: How to Compute the ID of "eject" menuitem? Pin
mbue27-Feb-06 15:47
mbue27-Feb-06 15:47 
GeneralRe: How to Compute the ID of "eject" menuitem? Pin
Syouki_kou27-Feb-06 16:42
Syouki_kou27-Feb-06 16:42 
GeneralRe: How to Compute the ID of "eject" menuitem? Pin
Nibu babu thomas27-Feb-06 17:15
Nibu babu thomas27-Feb-06 17:15 
GeneralRe: How to Compute the ID of "eject" menuitem? Pin
mbue27-Feb-06 21:19
mbue27-Feb-06 21:19 
GeneralRe: How to Compute the ID of "eject" menuitem? Pin
Syouki_kou27-Feb-06 22:02
Syouki_kou27-Feb-06 22:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.