
PTBurnSDK Page42of68
©2011PrimeraTechnology,Inc.PrimeraisaregisteredtrademarkandBravoisatrademarkofPrimeraTechnology,Inc.Allothertrademarks
arethepropertyoftheirrespectivecompanies.
Value=X
ClientID=Administrator
RobotName=zzzz
wherethevalueofXwilleitherSetorClearKioskMode.
1=SetKioskMode
0=ClearKioskMode
ClientIDshouldbesettoAdministrator
RobotNamezzzzspecifieswhichprinter/robottoset/clear(e.g.DiscPublisherSE).If
RobotNameisnotspecifieditwillset/clearkioskmodeforthefirstrobotfound.
4.16 CleanCartridges
Thiscommandisusedtoclean/purgethecartridges.
Message=CLEAN_CARTRIDGES
5 CodingBestPractices
5.1 Programming Tips
5.1.1 ReadingtheStatusFile
ThestatusfileshouldNOTbeopenedinalockedstate.Toensurethisyoushouldeitheropen
thefilewithFileSharesettoFileShare.ReadWriteoruseGetPrivateProfileString(and/or
GetPrivateProfileInt).
C#example:
FileStreamfs=File.Open(“C:\PTBurnJobs\Status\DiscPublisherProXi.txt”,
FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
5.1.2 DeterminingiftheserviceisRunning.
TodetermineiftheserviceisrunningyoucanusetheServiceControllerclassin.NET.
OtherwiseifyoureadthestatusfileandtheServerTimeandServerTickCountareNOT
incrementingthenyouknowtheserviceisNOTrunning.
5.1.3 Startingtheservice
Weadvisethatwhenyouapplicationstartsitshouldensuretheserviceisrunningandifnot
yourapplicationshouldstarttheservice.Thiscanbedoneeasilywith.NETusingthe
ServiceControllerclass.
Comentarios a estos manuales