Strategy checksum as variable

PacProject 10.3

When downloading a strategy we get the checksum compare, is there a way to store this particular value into a variable?

I don’t think there is a supported command.

You can open up a comm handle to port 22001 to localhost and use the TransmitReceiveString command. EOM character would be 20h (space) and the command to transmit would be “CRCSTAMP” + Chr(13) - That will return a string with the ASCII checksum - there will be a couple leading null characters you will need to remove.

Thanks for reply! I understand…some…of what you described. Hah. Let me play around with it and see what I figure out. Thanks again.

Here is some sample code that gets the strategy checksum:

SetCommunicationHandleValue("tcp:127.0.0.1:22001", chLocal);

nCommStatus = OpenOutgoingCommunication(chLocal);
if(nCommStatus == 0) then
  SetEndOfMessageTerminator(chLocal, ' ');

  sTransmit = "CRCSTAMP" + Chr(13);
  nCommStatus = TransmitReceiveString(sTransmit, chLocal, sReceive);

  if(nCommStatus == 0 and GetStringLength(sReceive) > 2) then
    //Trim null padding
    GetSubstring(sReceive, 2, GetStringLength(sReceive) - 2, sStrategyChecksum);
  endif

  CloseCommunication(chLocal);
endif