Gokmen Gok [MSFT]
2009-06-19 17:55:01 UTC
This is a query against the WSD category so whenever you execute this query
you will discover the WSD printer as long as it is online. THe fact that you
associated the printer does not affect the discoverability. When your printer
is associated though, if you discover the printer using this query again you
will see that PKEY_PNPX_Installed is set to VARIANT_TRUE in the property
store of the function instance you receive.
I work on pnpx, I am not an expert in printing but Delete method should also
delete the print port etc without a reboot. Make sure you call delete after
the printer/driver is completely installed.
Thanks
Gokmen [MSFT]
--
This posting is provided "AS IS" with no warranties, and confers no rights.
The use of any included script samples are subject to the terms specified
at http://www.microsoft.com/info/cpyright.htm
you will discover the WSD printer as long as it is online. THe fact that you
associated the printer does not affect the discoverability. When your printer
is associated though, if you discover the printer using this query again you
will see that PKEY_PNPX_Installed is set to VARIANT_TRUE in the property
store of the function instance you receive.
I work on pnpx, I am not an expert in printing but Delete method should also
delete the print port etc without a reboot. Make sure you call delete after
the printer/driver is completely installed.
Thanks
Gokmen [MSFT]
--
This posting is provided "AS IS" with no warranties, and confers no rights.
The use of any included script samples are subject to the terms specified
at http://www.microsoft.com/info/cpyright.htm
Ok , my program is used for discovering my WSD based printers in the network
if( S_OK == hr )
hr = m_pFunDisc->CreateInstanceCollectionQuery(
FCTN_CATEGORY_WSDISCOVERY,
NULL,
TRUE,
this,
NULL,
&pQuery);
if( S_OK == hr )
hr = pQuery->AddQueryConstraint(
PROVIDERWSD_QUERYCONSTRAINT_TYPE ,
L"http://schemas.microsoft.com/windows/2006/08/wdp/print/PrintDeviceType" );
if( S_OK == hr )
hr = pQuery->AddQueryConstraint(
PNP_CONSTRAINTVALUE_NOTIFICATIONSONLY ,
L"TRUE" );
I have another question that , in Vista once I execute
PnPXAssociation::Delete , the printer icon and the WSD print port can't be
deleted immediatly , I have to reboot the PC for deleting them . So is it
normal ? Can I manually delete them after execution of the method
PnPXAssociation::Delete ?
Thanks .
if( S_OK == hr )
hr = m_pFunDisc->CreateInstanceCollectionQuery(
FCTN_CATEGORY_WSDISCOVERY,
NULL,
TRUE,
this,
NULL,
&pQuery);
if( S_OK == hr )
hr = pQuery->AddQueryConstraint(
PROVIDERWSD_QUERYCONSTRAINT_TYPE ,
L"http://schemas.microsoft.com/windows/2006/08/wdp/print/PrintDeviceType" );
if( S_OK == hr )
hr = pQuery->AddQueryConstraint(
PNP_CONSTRAINTVALUE_NOTIFICATIONSONLY ,
L"TRUE" );
I have another question that , in Vista once I execute
PnPXAssociation::Delete , the printer icon and the WSD print port can't be
deleted immediatly , I have to reboot the PC for deleting them . So is it
normal ? Can I manually delete them after execution of the method
PnPXAssociation::Delete ?
Thanks .
Can you briefly explain what your program does? What category you are
querying and constraint are you setting?
Thanks
Gokmen [MSFT]
--
This posting is provided "AS IS" with no warranties, and confers no rights.
The use of any included script samples are subject to the terms specified
at http://www.microsoft.com/info/cpyright.htm
querying and constraint are you setting?
Thanks
Gokmen [MSFT]
--
This posting is provided "AS IS" with no warranties, and confers no rights.
The use of any included script samples are subject to the terms specified
at http://www.microsoft.com/info/cpyright.htm
Hi , I mean that the Function Discovery found two times the same WSD device
.And I have added a constraint for filrating the WSD printer . So is it
normal ? i should add a flag for filrating them .
.And I have added a constraint for filrating the WSD printer . So is it
normal ? i should add a flag for filrating them .
You should use the Delete method. Can you explain what you mean by "my
program detects one more time"?
Thanks
Gokmen [MSFT]
--
This posting is provided "AS IS" with no warranties, and confers no rights.
The use of any included script samples are subject to the terms specified
at http://www.microsoft.com/info/cpyright.htm
program detects one more time"?
Thanks
Gokmen [MSFT]
--
This posting is provided "AS IS" with no warranties, and confers no rights.
The use of any included script samples are subject to the terms specified
at http://www.microsoft.com/info/cpyright.htm
Hi , I'm trying to write my program to study the Function
Discovery and IPNPXAssociation , but , I saw that in the MSDN's doc , There
are two methods Delete and Unassocite , I dont know when I should use Delete
and Unassociate ? And in my test's program , once I associated the WSD
printer(install the driver , create the port ) , my program detects one more
time , so it did the associate one more time . How can I avoid this ?
Thanks in advance
Discovery and IPNPXAssociation , but , I saw that in the MSDN's doc , There
are two methods Delete and Unassocite , I dont know when I should use Delete
and Unassociate ? And in my test's program , once I associated the WSD
printer(install the driver , create the port ) , my program detects one more
time , so it did the associate one more time . How can I avoid this ?
Thanks in advance