ASCII values problem between D3 and D7
From: John Anderson (john_at_fish_head_gear.co.uk)
Date: 10/30/03
- Next message: Rob Kennedy: "Re: How do interface implementations work?"
- Previous message: Sarfraz Bokhari: "Re: Making network login window popup"
- Next in thread: Kurt Barthelmess: "Re: ASCII values problem between D3 and D7"
- Reply: Kurt Barthelmess: "Re: ASCII values problem between D3 and D7"
- Reply: a: "Re: ASCII values problem between D3 and D7"
- Reply: John Anderson: "Re: ASCII values problem between D3 and D7"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Oct 2003 21:36:11 -0000
Hi,
I've got some passwords which were encrypted in Clipper 5 by adding a
certain amount to the ASCII value of each character. In Delphi 3, I can turn
these back into meaningful strings by subtracting the same values. In
Delphi 7, tho, the same encrypted characters are showing as higher ASCII
value, so when I subtract a value they come back as a different character.
For example, the character for Chr(146) in D3 is the character for Chr(198)
in D7. Unfortunately, the displacement isn't consistent, for example
encrypted numbers come back OK.
I tried putting the encrypt/decipher routines in a D3 DLL and calling that
from D7, but something's getting lost in the translation - valid PChar and
integer values passed into the DLL are appearing within it as garbage. (Is
this a Delphi version incompatibility? I've always had problems calling
DLL's not created with the same version of Delphi.) Then I tried creating a
D3 COM object to do the translation. This works, but behaves the same way as
Delphi 7. I've also tried using OemToChar (or whatever it's called) - this
gave different results but still wrong.
Can anyone either tell me what I'm missing or suggest a solution?
TIA
John
- Next message: Rob Kennedy: "Re: How do interface implementations work?"
- Previous message: Sarfraz Bokhari: "Re: Making network login window popup"
- Next in thread: Kurt Barthelmess: "Re: ASCII values problem between D3 and D7"
- Reply: Kurt Barthelmess: "Re: ASCII values problem between D3 and D7"
- Reply: a: "Re: ASCII values problem between D3 and D7"
- Reply: John Anderson: "Re: ASCII values problem between D3 and D7"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|