Alaska Software Inc. - Re: Bin2Var bug - No XPF-format or incompatible version number
Username: Password:
AuthorTopic: Re: Bin2Var bug - No XPF-format or incompatible version number
AUGE_OHRRe: Bin2Var bug - No XPF-format or incompatible version number
on Sun, 15 May 2011 22:05:50 +0200
hi Thomas,

>>>If you are saving Xbase++ array types, they are saved as reg_binary with
>>>var2bin.
>>>
>>>You can control this behaviour by using the "ReadBinType" access/assign.

what about this to read REG_BINARY :

CASE nType == REG_BINARY
   DO CASE
      CASE ::cReadBinaryTypeAs = "A"
         bSaveError := ERRORBLOCK( { | oError | BREAK( oError ) } )
         BEGIN SEQUENCE
            ::xValue := Bin2Var( xRet )
         RECOVER USING oError
            ERRORBLOCK( bSaveError )
            ::xValue := StrToHex( xRet )         from Xbtools
         END SEQUENCE
         ERRORBLOCK( bSaveError )

@Geoffrey Cohen : Str2Hex( ALLTRIM(cBuffer2))

i found out that ALLTRIM() in this case can "miss" 1st byte so 
20FEFFFF0000... will become FEFFFF0000...
Sample :
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time 
Zones\Taipei Standard Time" using "TZI" Value

greetings by OHR
Jimmy