Skip to Content
author's profile photo Former Member
Former Member

Cannot import AddOnInstallAPI_x64.dll

Hi,

I am trying to create our installer for a client add-on using 64-bit. I have compiled our add-on using the x64 and Any platform. I have tried using the AddOnInstallAPI.dll file and the installer works but then just times out so SAP says it failed. If I use AddOnInstallAPI_x64.dll as suggested in other posts, I can the error 'Cannot import AddOnInstallAPI_x64.dll' and the install does not occur. I have AddOnInstallAPI_x64.dll on my machine in C:\Program Files\SAP\SAP Business One. What am I missing? I have wasted so much time on trying to get a 64-bit add on installed. Any suggestions are much appreciated.

Thanks,

David

BTW, we use InnoSetup. Here are the import lines I am using:

function SetAddOnFolder(Path: String): Integer; external 'SetAddOnFolder@AddOnInstallAPI_x64.dll';

function RestartNeeded(): Integer; external 'RestartNeeded@AddOnInstallAPI_x64.dll';

function EndInstall(): Integer; external 'EndInstall@AddOnInstallAPI_x64.dll';

Here is the function that InnoSetup runs after the installation has completed:

function GetCustomSetupExitCode: Integer;

begin

MsgBox('Add-On was installed successfully.', mbInformation, MB_OK);

Result := EndInstall();

end;

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 13, 2013 at 10:17 AM

    Hi,

    I have something for you.

    1. The firstly, you must build application project in Solution platforms is x86 bits.

    If you don't see solution platform, you can show it by menu Tools --> Customize...

    And if application project is built with Debug, solution platforms is x86 bits then Addon project will be built with Debug, solution platforms is x86 bits.

    Remember : when you change solution platforms is x86 bits in Addon project, you must build project once more time (not rebuild project). Some fles which built show in bin/x86 folder.

    2. The secondly, you use SAP Tools is AddOnRegDataGen to create .ard

    After all, you will install to SAP.

    I hope to help you.


    Customize.png (37.4 kB)
    registeration.png (23.5 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2016 at 01:09 AM

    To Generate X64 Addon for X64 Client with B1DE

    1- clean your project (delete all files or folder in Bin folder

    2- Add UIAPI and DIAPI to References of addon project

    from: C:\Program Files\SAP\SAP Business One\SAPbouiCOM.exe

    C:\Program Files\SAP\SAP Business One DI API\DI API 90\SAPbobsCOM90.dll

    3- On Project proprieties > Builds : set Plateform and target plateform to "Any CPU"

    4- Build you project

    5- Create your installer project with B1DE tools: new project> SAP B1 AddonInstaller .Net Wizard

    6- choose you generated Exec File on step 4

    7- Ctr+H (Search and replace) on All Solution : <<AddOnInstallAPI.dll>> by <<AddOnInstallAPI_x64.dll>>

    8- On Project proprieties > Compile >Advanced Compile Options > Target CPU:x64

    9- Build your project

    10- Go to your project folder and run AddOnRegDataGenFile\AddOnRegDataGen.bat

    11- Go to the Bin folder a new .ard file is generated

    12- Edit this file with notepad and replace :<<platform="N" >> by <<platform="X" >>

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.