Error installing component JVCL Error: Undeclared identifier: 'DWORD_PTR'

If you use Delphi 7 and installing the JVCL component, and during the installation you are receving the following errors:
C: \ Program Files \ Borland \ COMPONENTS \ JVCL \ run \ JvRichEdit.pas (6013) Error: Undeclared identifier: 'DWORD_PTR'
C: \ Program Files \ Borland \ COMPONENTS \ JVCL \ run \ JvRichEdit.pas (6065) Error: Undeclared identifier: 'DWORD_PTR'
C: \ Program Files \ Borland \ COMPONENTS \ JVCL \ run \ JvDynControlEngineJVCL.pas (47) Fatal: Could not compile used unit '.. \ .. \ Run \ JvRichEdit.pas'

then, there is 2 way to resolve this:

1st Way:
  • You need to install the JCL Components too.
  • Use the JclBase inside the JvRichEdit.pas unit (Open JvRichEdit.pas file, and type
    Use JclBase, [another-unit]; on the top of your code).
2nd Way:
  • Open JvRichEdit.pas file and the line that reads dwCookie: = DWORD_PTR (aConverter);
    replace it with this code:
    dwCookie: = {$ IFDEF COMPILER19_UP} {$ ELSE} DWORD_PTR Longint {$ ENDIF} (aConverter);
    In the line that reads:
    dwCookie: = DWORD_PTR (Cookie);
    replace it with this code:
    dwCookie: = {$ IFDEF COMPILER19_UP} {$ ELSE} DWORD_PTR Longint {$ ENDIF} (Cookie);
     

Komentar