printer related code
-
Hi all, i am developing a software ,,which will helpfull for the network administrator in such a way that....it will provide efficiency to the printer.. my software is explained as this software will restrict the user to use the printer....for example... the network administrator will provide a database for the user that e.g, "abc" user can only print 3 pages...if user send 4 number of prints from any place means from network or any software then then the message box come to the user that u r restricted to use on 3 pages...the boundries of such software are completed.....the main module that when the user send the print job to printer then the job should cancelled and read the database and according to that data base there will be printing pages to certain users... So i have to take help that ....plz made me this help that this module i m tying a lot ..but not happening that the job should canelled first of the printer and then job according to database apply...please programmes help me .I will very thankful to all...I will wait for yours response and the code also related to this module.. Lot of thanx for solving my problem
-
Hi all, i am developing a software ,,which will helpfull for the network administrator in such a way that....it will provide efficiency to the printer.. my software is explained as this software will restrict the user to use the printer....for example... the network administrator will provide a database for the user that e.g, "abc" user can only print 3 pages...if user send 4 number of prints from any place means from network or any software then then the message box come to the user that u r restricted to use on 3 pages...the boundries of such software are completed.....the main module that when the user send the print job to printer then the job should cancelled and read the database and according to that data base there will be printing pages to certain users... So i have to take help that ....plz made me this help that this module i m tying a lot ..but not happening that the job should canelled first of the printer and then job according to database apply...please programmes help me .I will very thankful to all...I will wait for yours response and the code also related to this module.. Lot of thanx for solving my problem
cishi_us wrote: I will wait for yours response and the code also related to this module.. Lot of thanx for solving my problem Uhhh.... YOU have to write the code, we're not doing it for you. You solve your own problems, we just help. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
cishi_us wrote: I will wait for yours response and the code also related to this module.. Lot of thanx for solving my problem Uhhh.... YOU have to write the code, we're not doing it for you. You solve your own problems, we just help. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
well sir sure i like to take urs help...i have just reaced to my destiny as well but some problems occuring in it..... i m writing here u code and plz try to help me...The problem occuring on following places..please read code i m writing where the problem is occuring.. /////////////////////////////////////////////////////////////////// try { PropertyDataCollection __gc *pdc = e->NewEvent->get_Properties(); PropertyDataCollection::PropertyDataEnumerator __gc *pdce = pdc->GetEnumerator(); while(pdce->MoveNext()) { PropertyData __gc *pd = pdce->get_Current(); ManagementBaseObject __gc *mbo = dynamic_cast(pd->get_Value()); 1) problem***************problem occuring on the below if statement.not all time but some time the mbo variable does not declare and by using watches i see that mbo is undeclared value.its some time ... and printer does not pause..*********************************** if( mbo != NULL && mbo->ClassPath->ToString()->ToUpper()->EndsWith(S"WIN32_PRINTJOB") ) { ///// //pause job long a=0; long *hprinter = &a; for(int i=0 ; iprintersname->Length ; i++) { try { int result = PrinterAPIs::OpenPrinter(this->printersname[i], hprinter, NULL); bool resultf = PrinterAPIs::SetJob(*hprinter, (long)Int64::Parse( mbo->Properties->get_Item(S"Jobid")->Value->ToString() ), 0, NULL, 1); PrinterAPIs::ClosePrinter(*hprinter); MessageBox::Show(this, mbo->Properties->get_Item(S"Owner")->Value->ToString()); ***************************************************************************** 2) Below message box is not showing the correct number of pages that comes from print status that come in task bar when a pages are going to print.*************************************** MessageBox::Show(this, mbo->Properties->get_Item(S"TotalPages")->Value->ToString()); if(resultf == true) break; } catch(Exception __gc *ex) { MessageBox::Show(this, ex->ToString()); ex = NULL; }
-
well sir sure i like to take urs help...i have just reaced to my destiny as well but some problems occuring in it..... i m writing here u code and plz try to help me...The problem occuring on following places..please read code i m writing where the problem is occuring.. /////////////////////////////////////////////////////////////////// try { PropertyDataCollection __gc *pdc = e->NewEvent->get_Properties(); PropertyDataCollection::PropertyDataEnumerator __gc *pdce = pdc->GetEnumerator(); while(pdce->MoveNext()) { PropertyData __gc *pd = pdce->get_Current(); ManagementBaseObject __gc *mbo = dynamic_cast(pd->get_Value()); 1) problem***************problem occuring on the below if statement.not all time but some time the mbo variable does not declare and by using watches i see that mbo is undeclared value.its some time ... and printer does not pause..*********************************** if( mbo != NULL && mbo->ClassPath->ToString()->ToUpper()->EndsWith(S"WIN32_PRINTJOB") ) { ///// //pause job long a=0; long *hprinter = &a; for(int i=0 ; iprintersname->Length ; i++) { try { int result = PrinterAPIs::OpenPrinter(this->printersname[i], hprinter, NULL); bool resultf = PrinterAPIs::SetJob(*hprinter, (long)Int64::Parse( mbo->Properties->get_Item(S"Jobid")->Value->ToString() ), 0, NULL, 1); PrinterAPIs::ClosePrinter(*hprinter); MessageBox::Show(this, mbo->Properties->get_Item(S"Owner")->Value->ToString()); ***************************************************************************** 2) Below message box is not showing the correct number of pages that comes from print status that come in task bar when a pages are going to print.*************************************** MessageBox::Show(this, mbo->Properties->get_Item(S"TotalPages")->Value->ToString()); if(resultf == true) break; } catch(Exception __gc *ex) { MessageBox::Show(this, ex->ToString()); ex = NULL; }