Kbase P22290: How to pass a CHR(0) value to an OCX component
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/2/2003 |
|
Status: Unverified
GOAL:
How to pass a CHR(0) value to an OCX component
GOAL:
How to pass a CHR(0) value to a port
GOAL:
How to Pass the NULL Character Through MSComm Control
FACT(s) (Environment):
Progress/WebSpeed Versions
CAUSE:
Prior to Version 9.x, Progress 4GL assigns a length value of 1(one) for the NULL character CHR(0). However, starting with Version 9.x, 4GL computes the length of the NULL character as 0 (zero). When an instance of the OCX Control receives a CHR(0) with length 0 (zero), it ignores that character and all characters that follow.
FIX:
The following code forces the OCX Control to send the NULL character to the device:
DEFINE VARIABLE v-mem AS MEMPTR NO-UNDO.
DEFINE VARIABLE v-raw AS RAW NO-UNDO.
SET-SIZE(v-mem) = 1.
PUT-STRING(v-mem,1) = CHR(0).
v-raw = v-mem.
ASSIGN chCtrlFrame:MSComm:OUTPUT = v-raw.