test
2008-03-22 17:33:38 UTC
Hi,
Trying to use the TIdHashMessageDigest4 component, but came access the
delphi/cpp convert error, (cpp can't return arrays)
The generated cpp code is as such
typedef unsigned T16x4LongWordRecord[16];
typedef unsigned T4x4x4LongWordRecord[4][4];
......
class DELPHICLASS TIdHashMessageDigest4;
class PASCALIMPLEMENTATION TIdHashMessageDigest4 : public
TIdHashMessageDigest
{
typedef TIdHashMessageDigest inherited;
protected:
unsigned FBuffer[4];
unsigned FCBuffer[16];
virtual void __fastcall MDCoder(void);
virtual unsigned __fastcall func_f(unsigned x, unsigned y, unsigned z);
virtual unsigned __fastcall func_g(unsigned x, unsigned y, unsigned z);
virtual unsigned __fastcall func_h(unsigned x, unsigned y, unsigned z);
public:
virtual Idhash::T4x4LongWordRecord __fastcall HashValue(Classes::TStream*
AStream)/* overload */;
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TIdHashMessageDigest4(void) :
TIdHashMessageDigest() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual
~TIdHashMessageDigest4(void) { }
#pragma option pop
/* Hoisted overloads: */
public:
inline Idhash::T4x4LongWordRecord __fastcall HashValue(const AnsiString
ASrc){ return TIdHash128::HashValue(ASrc); }
};
the lines
virtual Idhash::T4x4LongWordRecord __fastcall HashValue(Classes::TStream*
AStream)/* overload */;
inline Idhash::T4x4LongWordRecord __fastcall HashValue(const AnsiString
ASrc){ return TIdHash128::HashValue(ASrc); }
were the ones giving errors, so after some googling (very limited results
;( ) I changed them to
virtual unsigned __fastcall HashValue(Classes::TStream* AStream)/* overload
*/;
inline unsigned __fastcall HashValue(const AnsiString ASrc){ return
TIdHash128::HashValue(ASrc); }
My App compiles but I get an access voilation error as soon as I try to use
it, any ideas how to fix this?
Project Project1.exe raised exception class EAccessViolation with message
'Access violation at address 20621acc in module 'indy100.bpl'. write of
address 20620ff8'.
I'm using Indy 9.0.50. I downgraded form 10 to 9 as I need 9 for older
projects. Also I'm using Code Gear 2007.
Thanks,
ar
Trying to use the TIdHashMessageDigest4 component, but came access the
delphi/cpp convert error, (cpp can't return arrays)
The generated cpp code is as such
typedef unsigned T16x4LongWordRecord[16];
typedef unsigned T4x4x4LongWordRecord[4][4];
......
class DELPHICLASS TIdHashMessageDigest4;
class PASCALIMPLEMENTATION TIdHashMessageDigest4 : public
TIdHashMessageDigest
{
typedef TIdHashMessageDigest inherited;
protected:
unsigned FBuffer[4];
unsigned FCBuffer[16];
virtual void __fastcall MDCoder(void);
virtual unsigned __fastcall func_f(unsigned x, unsigned y, unsigned z);
virtual unsigned __fastcall func_g(unsigned x, unsigned y, unsigned z);
virtual unsigned __fastcall func_h(unsigned x, unsigned y, unsigned z);
public:
virtual Idhash::T4x4LongWordRecord __fastcall HashValue(Classes::TStream*
AStream)/* overload */;
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TIdHashMessageDigest4(void) :
TIdHashMessageDigest() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual
~TIdHashMessageDigest4(void) { }
#pragma option pop
/* Hoisted overloads: */
public:
inline Idhash::T4x4LongWordRecord __fastcall HashValue(const AnsiString
ASrc){ return TIdHash128::HashValue(ASrc); }
};
the lines
virtual Idhash::T4x4LongWordRecord __fastcall HashValue(Classes::TStream*
AStream)/* overload */;
inline Idhash::T4x4LongWordRecord __fastcall HashValue(const AnsiString
ASrc){ return TIdHash128::HashValue(ASrc); }
were the ones giving errors, so after some googling (very limited results
;( ) I changed them to
virtual unsigned __fastcall HashValue(Classes::TStream* AStream)/* overload
*/;
inline unsigned __fastcall HashValue(const AnsiString ASrc){ return
TIdHash128::HashValue(ASrc); }
My App compiles but I get an access voilation error as soon as I try to use
it, any ideas how to fix this?
Project Project1.exe raised exception class EAccessViolation with message
'Access violation at address 20621acc in module 'indy100.bpl'. write of
address 20620ff8'.
I'm using Indy 9.0.50. I downgraded form 10 to 9 as I need 9 for older
projects. Also I'm using Code Gear 2007.
Thanks,
ar