Results 1 to 7 of 7

Thread: VDFQuery and 64bit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Germany
    Posts
    72

    Default VDFQuery and 64bit

    Hi all,

    compiling under 32bit works, except some toANSI/toOEM warnings.

    Compiling under 64bit gave me two errors of the same kind in aps.pkg: LongPtr needed.

    Code:
    External_Function32 ApsOemToCharA "OemToCharA" User32.DLL Pointer hpszOem Pointer hpszWindow Returns Integer
    Function APS_OemToChar Global String OemStr Returns String
      String  CharStr
      Integer OemAdress CharAdress grb# 
      Append OemStr (Character(0))
      Move (Repeat(Character(0), (Length(OemStr)))) To CharStr
      GetAddress Of OemStr  To OemAdress  <- LongPtr needed
      GetAddress Of CharStr To CharAdress <- LongPtr needed
      Move (ApsOemToCharA(OemAdress, CharAdress)) To grb#
      Function_Return (CString(CharStr))
    End_Function
    I changed it to:

    Code:
    External_Function32 ApsOemToCharA "OemToCharA" User32.DLL Pointer hpszOem Pointer hpszWindow Returns Integer
    Function APS_OemToChar Global String OemStr Returns String
      String  CharStr
      Integer grb# // OemAdress CharAdress  23-03-2021 TRU
      Longptr OemAdress CharAdress       // 23-03-2021 TRU
      Append OemStr (Character(0))
      Move (Repeat(Character(0), (Length(OemStr)))) To CharStr
      GetAddress Of OemStr  To OemAdress
      GetAddress Of CharStr To CharAdress
      Move (ApsOemToCharA(OemAdress, CharAdress)) To grb#
      Function_Return (CString(CharStr))
    End_Function
    and it compiles without errors under 64 and 32 bit.
    Is that enough or are there any difficulties to be expected?
    Regards
    Michael Trucksess

  2. #2
    Join Date
    Feb 2009
    Location
    The Netherlands
    Posts
    4,206

    Default Re: VDFQuery and 64bit

    I'd recommend to use Pointer instead of LongPtr for storing pointers. Also to use the AddressOf function instead of the GetAddress command. Besides that the bigger question is if the character conversion is still correct (is the incoming string still OEM or is UTF-8 in DataFlex 20).
    Harm Wibier
    Data Access Europe B.V.
    http://www.dataaccess.eu/

  3. #3
    Join Date
    Mar 2009
    Location
    Germany
    Posts
    72

    Default Re: VDFQuery and 64bit

    Thanks Harm,
    LongPtr was the suggestion of the compiler warnings.
    Datasource is still OEM.
    Regards
    Michael Trucksess

  4. #4
    Join Date
    Feb 2009
    Location
    Copenhagen, Denmark
    Posts
    1,864

    Default Re: VDFQuery and 64bit

    Hi Michael,

    I assume that the conversion is not needed anymore. If you have indications that it is necessary I'd like to hear about it.

    -Sture

  5. #5
    Join Date
    Mar 2009
    Location
    Germany
    Posts
    72

    Default Re: VDFQuery and 64bit

    Hi Sture,

    opening a Query definition file containing a german umlaut in its name says: file not found
    but it is not that important, I can easily rename that file.
    Last edited by TMike; 24-Mar-2021 at 04:55 AM.
    Regards
    Michael Trucksess

  6. #6
    Join Date
    Feb 2009
    Location
    Copenhagen, Denmark
    Posts
    1,864

    Default Re: VDFQuery and 64bit

    Hi Michael,

    I have attached my current version of VDFQuery20 (for DF20 only). This version I use myself whenever really absolutely need something from in there. It's not completely worked through but it satisfies my own needs so far. The code you mention has been removed since it is no longer needed to translate between oem and ansi.

    VDFQuery20_v1.zip

    -Sture

  7. #7
    Join Date
    Mar 2009
    Location
    Germany
    Posts
    72

    Default Re: VDFQuery and 64bit

    Hi Sture,

    thanks for sharing.
    Much appreciated.
    Regards
    Michael Trucksess

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •