MCS

Home Up

Tracing
 

Tracing Overview

Release 1.8.000 significantly enhanced the tracing originally provided by Release 1.7.001.  A ZIP file contains the debug versions of the CCOs, plus two helper COM objects (RCSTraceOut.exe and RCSTraceOutPS.dll).

As pre-built, the trace information is written to C:\yyyymmdd-OposCCO_DeviceName.log, where yyyymmdd is the current date and DeviceName is the OPOS device name.  Up to five days of trace information is retained, with days prior to the current day compressed into a ZIP file.  Each day's ZIP file is named C:\yyyymmdd-OposCCO_DeviceName.zip.

If you choose to modify and/or rebuild the debug CCOs from the sources, then you will need to uncomment the line containing "#define _FILETRACE" in the file DeviceNameImpl.h.  The rebuilt CCO will use simple file I/O for the trace information, rather than the high performance tracing in the pre-built CCOs.  Also, some trace information will not appear -- specifically that generated by the "DODUMPV" macro.

Release 1.10.000 further enhanced tracing:  It added tracing of an application's event registration (see "Advise" and "Unadvise" trace lines) and of event delivery to an application (see "FireTheEvent" trace lines).

Security Implications

Warning!  The debug CCOs trace all data sent between the application and Service Object.  Therefore, they must not be used in live customer environments where sensitive information may be exposed.  For example:

  • The MSR debug CCO traces full card information including account numbers, names, and CVV.
  • The PINPad debug CCO traces the card account number, encrypted PIN, and key serial number.
  • The MICR debug CCO traces the bank transit number, checking account number, and check (serial) number.

Failure to heed this warning will violate VISA CISP compliance, and perhaps other industry or government rules or laws.

Sample Debug Control Object Output

The following debug traces are excerpts for POSPrinter.  They show the trace lines added to C:\20040322-OposCCO_POSPrinter.log for several APIs.  (Some line wrapping was added to format for display on this page.)

Create the CCO.
Get the properties State, ResultCode, ResultCodeExtended.

03/22 22:40:59.119 P0E1C T01E4
03/22 22:40:59.119 P0E1C T01E4  *Constructing: OPOS POSPrinter Control 1.8.000
    [Public, by CRM/RCS-Dayton] [With Tracing]
03/22 22:40:59.129 P0E1C T01E4  *State [Get] -- Closed
03/22 22:40:59.129 P0E1C T01E4  *ResultCode [Get] -- Closed
03/22 22:40:59.129 P0E1C T01E4  +ResultCodeExtended [Get]
03/22 22:40:59.129 P0E1C T01E4  -ResultCodeExtended [Get]: 0 (0x0) -- Closed

Call:  Open("7167").
Get the properties ResultCode, ResultCodeExtended, State, OpenResult.

03/22 22:41:03.636 P0E1C T01E4  *Open [Function]: DeviceName <7167>
03/22 22:41:03.636 P0E1C T01E4      Opened registry key HKLM\SOFTWARE\
    OLEforRetail\ServiceOPOS\POSPrinter
03/22 22:41:03.636 P0E1C T01E4      DeviceName is not a LogicalName; treating
    as PhysicalName
03/22 22:41:03.636 P0E1C T01E4      Opened DeviceName subkey
03/22 22:41:03.636 P0E1C T01E4      DeviceName mapped to ProgID
    <NCRPrinter.POSPrinter>
03/22 22:41:03.636 P0E1C T01E4      ProgID mapped to ClassID
03/22 22:41:03.696 P0E1C T01E4      Created Service Object
03/22 22:41:03.696 P0E1C T01E4      Acquired Service Object's dispatch pointer
03/22 22:41:03.696 P0E1C T01E4  +Open-OpenService [Function]  3 parameters
03/22 22:41:03.696 P0E1C T01E4      #1: STRING; Length 10 <POSPrinter>
03/22 22:41:03.696 P0E1C T01E4      #2: STRING; Length 4 <7167>
03/22 22:41:03.696 P0E1C T01E4      #3: DISPATCH 0xFF1F58
03/22 22:41:03.716 P0E1C T01E4  *ControlObjectDescription [Get]: <OPOS
    POSPrinter Control 1.8.000 [Public, by CRM/RCS-Dayton] [With Tracing]>
03/22 22:41:03.716 P0E1C T01E4  *ControlObjectVersion [Get]: 1008000
03/22 22:41:03.756 P0E1C T01E4  -Open-OpenService [Function]  RC=0 -- Closed
03/22 22:41:03.756 P0E1C T01E4      Service Object's OpenService succeeded
03/22 22:41:03.756 P0E1C T01E4      <Start> Service Object Properties.
03/22 22:41:03.756 P0E1C T01E4  +Open-ServiceObjectDescription [Get]
03/22 22:41:03.756 P0E1C T01E4  -Open-ServiceObjectDescription [Get]. Length 47
    <NCR 71xx Printer/MICR/CD/ChkScan Service Object>
03/22 22:41:03.756 P0E1C T01E4  +Open-DeviceDescription [Get]
03/22 22:41:03.756 P0E1C T01E4  -Open-DeviceDescription [Get]. Length 46
    <NCR 7167 Printer: Thermal Receipt, Impact Slip>
03/22 22:41:03.756 P0E1C T01E4  +Open-DeviceName [Get]
03/22 22:41:03.756 P0E1C T01E4  -Open-DeviceName [Get]. Length 16
    <NCR 7167 Printer>
03/22 22:41:03.756 P0E1C T01E4      <End> Service Object Properties.
03/22 22:41:03.756 P0E1C T01E4  +Open-ServiceObjectVersion [Get]
03/22 22:41:03.756 P0E1C T01E4  -Open-ServiceObjectVersion [Get]: 1007000
    (0xF5D98)
03/22 22:41:03.756 P0E1C T01E4  -  Success (0/0)
03/22 22:41:03.756 P0E1C T01E4  +ResultCode [Get]
03/22 22:41:03.756 P0E1C T01E4  -ResultCode [Get]: 0 (0x0)
03/22 22:41:03.756 P0E1C T01E4  +ResultCodeExtended [Get]
03/22 22:41:03.756 P0E1C T01E4  -ResultCodeExtended [Get]: 3 (0x3)
03/22 22:41:03.756 P0E1C T01E4  +State [Get]
03/22 22:41:03.756 P0E1C T01E4  -State [Get]: 2 (0x2)
03/22 22:41:03.756 P0E1C T01E4  *OpenResult [Get]: 0

Call:  PrintNormal( PTR_S_RECEIPT, "ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n" )
   This fails, as expected, because the printer has not been claimed or enabled.
Get the properties ResultCode, ResultCodeExtended.

03/22 22:41:12.278 P0E1C T01E4  +PrintNormal [Function]  2 parameters
03/22 22:41:12.278 P0E1C T01E4      #1: LONG 2 (0x2)
03/22 22:41:12.278 P0E1C T01E4      #2: STRING; Length 28 [Contains non-ASCII]
  000: 41 00 42 00 43 00 44 00 45 00 46 00 47 00 48 00    !A.B.C.D.E.F.G.H.!
  010: 49 00 4a 00 4b 00 4c 00 4d 00 4e 00 4f 00 50 00    !I.J.K.L.M.N.O.P.!
  020: 51 00 52 00 53 00 54 00 55 00 56 00 57 00 58 00    !Q.R.S.T.U.V.W.X.!
  030: 59 00 5a 00 0d 00 0a 00                            !Y.Z.....!
03/22 22:41:12.288 P0E1C T01E4  -PrintNormal [Function]  RC=103
03/22 22:41:12.288 P0E1C T01E4  +ResultCode [Get]
03/22 22:41:12.288 P0E1C T01E4  -ResultCode [Get]: 103 (0x67)
03/22 22:41:12.288 P0E1C T01E4  +ResultCodeExtended [Get]
03/22 22:41:12.288 P0E1C T01E4  -ResultCodeExtended [Get]: 3 (0x3)

Call:  Close()
Get the properties ResultCode, ResultCodeExtended, State.

03/22 22:41:14.792 P0E1C T01E4  *EventPreCloseRelease
03/22 22:41:14.792 P0E1C T01E4  +Close-CloseService [Function]  0 parameters
03/22 22:41:14.792 P0E1C T01E4  -Close-CloseService [Function]  RC=0
03/22 22:41:14.802 P0E1C T01E4  *EventClose
03/22 22:41:14.802 P0E1C T01E4  *Close [Function]  RC=0
03/22 22:41:14.802 P0E1C T01E4  *ResultCode [Get] -- Closed
03/22 22:41:14.802 P0E1C T01E4  +ResultCodeExtended [Get]
03/22 22:41:14.802 P0E1C T01E4  -ResultCodeExtended [Get]: 0 (0x0) -- Closed
03/22 22:41:14.802 P0E1C T01E4  *State [Get] -- Closed

Destroy the CCO

03/22 22:41:18.467 P0E1C T01E4  *Destructing
03/22 22:41:18.477 P0E1C T01E4
Last updated: 2008-08-20

 

Web Site navigation aids:  Table-of-Contents.  Search.
Send mail to webmaster@monroecs.com with questions or comments about this web site.
Copyright © 2009 Monroe Consulting Services, Inc.