Skip to Content
avatar image
Former Member

Amyuni with PB12.6 64-bit

I am using Amyuni PDF Creator to create PDF files.

The main library file is cdintf.dll.

I have a user object in which all Amyuni API function calls are prototyped.

eg: function Long DriverInit (String Printer) Library "cdintf.dll" alias for "DriverInit;Ansi"

Now I am trying to deploy this as 64-bit.

I find I need to register the 64-bit version of Amyuni: REGSVR32 cdintf64.dll

I then need to modify my user object to use this 64-bit library

eg: function Long DriverInit(String Printer) Library "cdintf64.dll" alias for DriverInit;Ansi"

This is unsatisfactory because now I need two versions of my app - 32-bat and 64-bit.

I prefer to have just one set of source code.

Any suggestions?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 09, 2015 at 04:37 AM

    You could use polymorphism. Create two descendants of the user object. n_cst_api32 and n_cst_api64 with the appropriate DriverInit function declarations in each. Then Create lnv_api Using "n_cst_api64" on 64bit...

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 09, 2015 at 02:22 PM

    Hi Larry;

    1)  You can use Lars suggestion for Polymorphism.

    - OR -

    2) You can just wrap the call with an IF .... for example:

    IF  fn_is_64bit_os ( ) = TRUE THEN

      DriverInit32 (......)

    else

      DriverInit64 ( ... )

    END IF

    Where

    a) the DriverInit method has two External Function entries qualified by either 32 or 64 bitness

    b) use the following in the fn_is_64bit_os ( ) method to check the OS bitness:

      Boolean   ib_64bit_os_found

      IsWOW64process ( GetCurrentProcess ( ) , ib_64bit_os_found)

      Return  ib_64bit_os_found

    Externals

    FUNCTION Boolean IsWow64Process ( ulong hProcess,  Ref boolean Wow64Process) LIBRARY "KERNEL32.dll"

    FUNCTION ulong GetCurrentProcess ( )  LIBRARY "KERNEL32.dll"

    HTH

    Regards ... Chris

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I always say .... "Its a great day when you learn something new"!   😉

      Or as Mr Warf would say on StarTrek ... "It is a good day to die and the day is not over yet"!  🤯