on 02-26-2013 10:20 AM
Hello all,
I have a problem with the installer for x64 add-ons. The AddonInstallApi.dll provided by B1 x64 seems to be built for x86 and calls to it fail with the error: "An attempt was made to load a program with an incorrect format." Are 64-bit add-ons supposed to use it, and if not, then what should they use instead? I didn't find any x64 analog for it.
Also how does the B1 client classify add-ons as either x86 or x64? I built my add-on as x64 in Visual Studio but it still is reported as x86 by B1. The AddonRegDataGen tool is x86 only as well...
Hi Anton,
You have to use AddOnInstallAPI_x64.dll for x64 Addon.
Addon - target platform x64
Installer - target platform x64
Jozef Horyl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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" >>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Everybody,
Can u explain which path of AddOnInstallAPI_x64.dll for 64 bit of SAP B1 9.0 Version?
Please share the download path for AddOnInstallAPI_x64.dll for 64 bit of SAP B1 9.0 Version.
When am creating ARD fie for 64 bit of SAP B1 9.0 , By Right Click on the Project Properties-->compile-->Advanced Compile Options-->X64.
Once created ARD file, then i opened "C:\Users\User1\Desktop\ARDFile\ARDname\ARDname\ARDname\AddOnRegDataGenFile"
While double click on the "windows Batch file"(AddOnRegDataGen), it automatically generates ARD file and EXE File.
In ARD file, Edit the ARD file--> Change the Platform "N" to "X". whereas EXE file could not change the 64 bit.
Hence the error shows in SAP b1 "Addon exception or "Incorrect string format".
Please fix this issue ASAP.
Thanks & Regards,
Bowya S S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Anton Shepelev
Actually your AddOn is running over SAP 9.0 64 bits? The method EndInstallEx of AddOnInstallAPI_x64 is the same that x86?
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alvaro Gonzalez, yes I have found it in the SDK's "Create a Setup Program" section, which I had neglected skipping right the the Installer sample. But when I tried to call this function I got the following exception: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Here's my definition of it: http://pastebin.com/mm5UCNzs
What did I get wrong?
I authored my installer manually, without any wizards. I think there are none for VS2008.
Alvaro Gonzalez, no you are mistaken. The SDK describes EndInstallEx() as a parameterless function, whereas it accepts two parameters — a string and a boolean, which are not even mentioned either in the documentation or in the C# SDK installer sample.
I have written about it to Support and they have acknowledged the error and promised to fix it.
I found that AddonRegDataGet UI has a "x64" checkbox, but how can it be set from the xml file passed to it as a command-line parameter?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can recompile your add-on. Please visit this content.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Bryan.
I am writing addons manually in Visual Studio, without using any B1-specific templates or wizards, and your video didn't answer my questions. You were using the AddonRegDatagen tool, but, as I have said, even in B1 9.0 it is provided only as a 32-bit executable which doesn't work on my x64 machine. Secondly, I couldn't find a 64-bit version of the addon installer API, while the supplied 32-bit one can't conveniently be used from an x64 application.
Could you please look into your source and let me know how the addon installer API is accessed therefrom? The only way to do that I know is via some complicated trickeration:
Do you also know how B1 determines whether an add-on is 64-bit or 32-bit? Simply rebuilding it as x64 doesn't help and it still is detected as 32-bit...
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.