Announcement

Collapse
No announcement yet.

DWORD Time Puzzle

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • DWORD Time Puzzle

    OK, I have this puzzle that's been driving me crazy for over a week. Perhaps if I explain it to you someone can help me to crack it!

    I'm trying to replicated the behaviour of some software. It's a digital signage system and consists of a server application running, at the moment, on my PC, and a client which is a giant LCD screen with a built-in PC running Windows XP Embedded. In case anyone's familiar with it the sofware is MagicInfo by Samsung.

    The server application has the option to create an alert ticker message. It can be formatted, colours selected, etc. And when it's ready you hit the 'Send' button in the server console and instantly the message appears on the remote client screen. It'll keep running for the length of time I specified in the message setup or I can stop it by pressing the 'Stop' button in the server console.

    I've determined that the message itself and its formatting is contained in a simple XML file, which I'll paste below. Every time I update the message in the server the XML file on the client is updated. So, it's simple for me to come up with my own way to change the message.

    The hard part is how to trigger the display of the message. Remember, it can't be scheduled, it only appears when that 'Send' button is pressed. I have searched high and low on the client for SOMEWHERE that might store the on/off flag, or SOME indication of what changes when the message is activated.

    Getting in a bit over my head I've used network sniffer programs to examine the data packets sent between the server and the client when the message is activated and, sure enough, I can see the text of the updated message being sent. The client is permanently running a little application called XL_TICKER which seems to just sit there and wait for these packets from the server. However, attempting to replicate the packets manually with my limited knowledge has thus far failed to trigger the message on the client.

    So here's the puzzle. The ONLY thing that appears to change on the client each time I trigger the message (other than the XML file itself) is an entry in the Windows Registry, in a node containing various details about MagicInfo. There are two keys, called TickerStartTimeHigh and TickerStartTimeLow. These are DWORD values. The latter, TickerStartTimeLow, changes every time I trigger the ticker message. The other one only changes sometimes. I'm desperately hoping that somehow the client checks these values continually and, depending on what the values are, displays the message. I know it's a long shot but since I can find nothing else on the client that changes with the triggering of the ticker message I've got nothing else to go on.

    The problem is that the values in these keys make no sense at all. I don't even know why there would be a HIGH and a LOW start time. Here are some examples of the values in the keys. If anybody can work out how these relate to time or, indeed, what they mean, I'd be eternally grateful!



    I know it looks as if the TickerStartTimeHigh might simply be an incremental value, going up one each time, but sometimes it doesn't change from one triggering of the message to the next. It does, however, seem to go up by very small amounts over time, whereas TickerStartTimeLow leaps up by thousands, then all of a sudden drops by thousands, as if it's reaches a maximum and started again (although only rises are seen in the data above). I can only assume that the actual time or significant value is a derivation of the two numbers, but again - why store it in this way?

    FWIW, here's the text of the XML file for the ticker:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <root>
    	<Ticker>
    		<Text>The text of the message goes here</Text>
    	</Ticker>
    	<Time>00:02:00</Time>
    	<BottomPosition>True</BottomPosition>
    	<Direction>Right To Left</Direction>
    	<Speed>95</Speed>
    	<Step>1</Step>
    	<Font>Arial</Font>
    	<Size>70</Size>
    	<Italic>False</Italic>
    	<Bold>True</Bold>
    	<UnderLine>False</UnderLine>
    	<Strikeout>False</Strikeout>
    	<HLocation>Center</HLocation>
    	<TextColor>16777215</TextColor>
    	<BackgroundColor>255</BackgroundColor>
    	<Transparency>100</Transparency>
    </root>
    Last edited by phil2415; 24th September 2009, 16:16.

  • #2
    Re: DWORD Time Puzzle

    Originally posted by phil2415 View Post
    OK, I have this puzzle that's been driving me crazy for over a week. Perhaps if I explain it to you someone can help me to crack it!

    <..>
    So here's the puzzle. The ONLY thing that appears to change on the client each time I trigger the message (other than the XML file itself) is an entry in the Windows Registry, in a node containing various details about MagicInfo. There are two keys, called TickerStartTimeHigh and TickerStartTimeLow. These are DWORD values. The latter, TickerStartTimeLow, changes every time I trigger the ticker message. The other one only changes sometimes. I'm desperately hoping that somehow the client checks these values continually and, depending on what the values are, displays the message. I know it's a long shot but since I can find nothing else on the client that changes with the triggering of the ticker message I've got nothing else to go on.

    The problem is that the values in these keys make no sense at all. I don't even know why there would be a HIGH and a LOW start time. Here are some examples of the values in the keys. If anybody can work out how these relate to time or, indeed, what they mean, I'd be eternally grateful!



    I know it looks as if the TickerStartTimeHigh might simply be an incremental value, going up one each time, but sometimes it doesn't change from one triggering of the message to the next. It does, however, seem to go up by very small amounts over time, whereas TickerStartTimeLow leaps up by thousands, then all of a sudden drops by thousands, as if it's reaches a maximum and started again (although only rises are seen in the data above). I can only assume that the actual time or significant value is a derivation of the two numbers, but again - why store it in this way?
    Hi Phil,

    I can't help with the sofware MagicInfo. Although, I hopefully can help demystifying those TickerStartTimeHigh and TickerStartTimeLow values in the registry.

    Typically Highpart and Lowpart property methods are used to break up what originally was a 64-bit value into two 32-bit parts.
    By using this method the 64-bit value can now be handled by programs that cannot handle 64-bit (8 bytes) numbers.

    64-bit numbers (integer8 value) usually represent time in 100-nanosecond intervals.
    If the Integer8 value is a date, the value represents 100-nanosecond intervals since the "zero" date (12:00 AM January 1, 1601).

    example:
    First, the Highpart value and Lowpart value need to be united to get the number of 100-nanosecond intervals:
    lngDate= (highpartdecimalvalue * 2^32) + lowpartdecimalvalue

    Next, convert the number of 100-Nanosecond intervals to a number of seconds:
    lngDate= lngDate/10000000.00

    The "Ticker Start Time" is a date value. The date-time can be calculated by adding the number of days to the "zero" date:
    1. Convert the seconds to number of minutes
      (where BIAS is the local GMT-offset in minutes (time-zone + daylight saving offset) for this computer)
      lngDate= (lngDate/60) - (BIAS)
    2. Convert the minutes to number of days
      lngDate= lngDate/1440
    3. Add the number of days to the "zero" date
      TickerStartTime= #1/1/1601# + lngDate

    Lets try this in a vbscript.
    Using the values from your table the second row,
    TickerStartTimeHigh - hexadecimal value: 0x01ca3d2a => decimal value: 30031146
    TickerStartTimeLow - hexadecimal value: 0xba31b120 => decimal value: 3123818784
    Code:
    '# Highpart and Lowpart values as decimal values
    TickerStartTimeHigh = 30031146
    TickerStartTimeLow = 3123818784
    
    '# Enter the +- GMT offset in minutes for this computer
    '  (is the time-zone + daylight saving offset)
    lngBias = -0
    ' maybe the Samsung software already dealt with the BIAS (dunno).
    
    '# unite the HighPart and LowPart
    lngDate = TickerStartTimeHigh * 2^32 + TickerStartTimeLow
    
    '# convert the number of 100-Nanosecond intervals to days
    lngDate = ((lngDate*1E-7/60)-lngBias)/1440  'days
    
    '# Add the number of days to the "zero" date
    TickerStartTime = CDate( #1/1/1601# + lngDate )
    
    wscript.echo TickerStartTime
    Note,
    There is a posibility to retrieve also by script the 3 values, that are colored blue in the script above, from the local registry.


    \Rems
    Last edited by Rems; 28th September 2009, 20:06.

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment

    Working...
    X