cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a ARD for 64 Bit And 32 Bit Systems

Former Member
0 Kudos

Dear All,

Please help me to solve my problem. I am not able to create the ARD for both type systems (32 Bit and 64 Bit Bit). My system is OS Windows 7, 32 bit operating system. Sometimes my add-ons run successfully for 32 bit , sometimes for 64 bit. I am creating 2 ARD's for each add-on but I have failed.

I have read many threads but I got no success.

Please help me.

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

maybe this document can hel you.

https://websmp210.sap-ag.de/~sapidb/011000358700000247582013E/SDK_CompGuide_90.pdf

regards, alessandro

Former Member
0 Kudos

Dear , , ,

Please reply. I am stuck to this problem since long time.

Regards

edy_simon
Active Contributor
0 Kudos

Hi Kuldeep,

How do you currently do it  and what is the problem you are facing now ?

Regards

Edy

pedro_magueija
Active Contributor
0 Kudos

Hi Kuldeep,

We need more details on what is not working. Is it the addon or the installer?

Can you install the addon in SAP Business One?

Have you checked the addon compatibility matrix from SAP and the configuration of the machines where the addon fails?


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

Hi , ,

Thanks for your reply. I follow below mentioned steps to create the ARD File. I build my add-on code as mentioned below:

Solution ConfigurationSolution PlatformProject Properties/Compile/ Advanced Compile Option/ Target CPUAdd-on Registration Data Generator x64 Option
Debugx86x86FALSE (Unchecked)
Debugx86x86True (Checked)

I was able to create and use ARD by doing in above mentioned way. But sometimes these ARD doesn't work or doesn't get installled.

Regards

edy_simon
Active Contributor
0 Kudos

Hi Kuldeep,

do you use B1wizardbase in your code?

Regards,

Edy

Former Member
0 Kudos

Hi ,

I create ARD using B1DE.

Regards

pedro_magueija
Active Contributor
0 Kudos

Hi Kuldeep,

When you compile you're addon as a 32bit addon (x86) you must ensure that the machine where it will run has the 32bit DI-API installed and the 32bit client running.

The installer must also have the x64 unchecked.

To run your addon in a 64bit machine there are several option, I'll post one of the options:

Compile the addon with x64 flags.

Set the x64 flag in the installer.

Ensure that in the machine where the addon is going to run has only the 64bit DI-API and 64bit client installed.

Please note that there are other ways to make your addon work in these environments but this is a simple way you can try and check if everything works well.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

edy_simon
Active Contributor
0 Kudos

Hi Kuldeep,

If you want a full-proof solution :

-. For SBO 32 bit

     - Keep everything as you have done with all the previous versions

-. For SBO 64 bit

  1.      Target Platform x64
  2.      Configuration Debug/Release is not a problem
  3.      Net FrameWork at least 3.5
  4.      Make sure you reference 64 bit DLLs (SAPbobsCOM, SAPbouiCOM, B1Wizardbase, any other custom dll you might use)
  5.      An Installer that calls the "AddOnInstallAPI_x64.dll"
  6.      An ARD that have the Platform = "X"

Point 1,2,3 is straight forward, you can set it up directly in your project.

Point 4, If you are using B1Wizardbase or any other custom DLL, you will need to get a 64 bit version of them.

B1Wizardbase, you need to get the source code, retarget and recompiled it for x64 and Net Framework 3.5

Point 5, if you open up your B1DE generated installer, you can find an external function declaration under the AddOnInstallManager.vb


    'SetAddOnFolder - Use it if you want to change the installation folder.

    Declare Function SetAddOnFolder Lib "AddOnInstallAPI.dll" (ByVal strPath As String) As Int32

    'RestartNeeded - Use it if your installation requires a restart, it will cause

    'the SBO application to close itself after the installation is complete.

    Declare Function RestartNeeded Lib "AddOnInstallAPI.dll" () As Int32

You need to modify it to read :


   'SetAddOnFolder - Use it if you want to change the installation folder.

        Declare Function SetAddOnFolder Lib "AddOnInstallAPI_x64.dll" (ByVal strPath As String) As Int32

    'RestartNeeded - Use it if your installation requires a restart, it will cause

    'the SBO application to close itself after the installation is complete.

        Declare Function RestartNeeded Lib "AddOnInstallAPI_x64.dll" () As Int32

Under the same AddonInstallManager.VB, modify the InitRegistryKeyValues() to


   Protected Sub InitRegistryKeyValues()

      keyValue = "SOFTWARE\\SAP\\SAP Manage\\SAP Business One\\AddOnInstaller\\x64" _

        + "\\" + installInfo.PartnerName + "\\" + installInfo.AddOnName

      subKeyAddOnInstallDirValue = "AddOnInstallDir"

      subKeyDllPathValue = "DllPath"

    End Sub

Also, modify the UnregisterAddOnInfo() to


    Private Sub UnregisterAddOnInfo()

      Dim regParam As RegistryKey

            regParam = _

              Registry.CurrentUser.OpenSubKey( _

                "SOFTWARE\\SAP\\SAP Manage\\SAP Business One\\AddOnInstaller\\x64" _

                + "\\" + installInfo.PartnerName, True)

      If (Not regParam Is Nothing) Then

        regParam.DeleteSubKey(installInfo.AddOnName, True)

        regParam.Close()

      End If

    End Sub

Finally, retarget the installer to x64 recompiled, and then regenerate the ARD file.

Do not forget to modify the ARD file to PLATFORM="X"

Regards
Edy

Former Member
0 Kudos

Hi ,

Thank you for your help. But can you please help me once. Can you please access my system through team viewer or anyhow and show it to me step by step. I will be really thankful to you. And it will be a great help.

Please help me once.

Regards

Former Member
0 Kudos

Hi Pedro and Edy,

Where can I find SAPbobsCOM, SAPbouiCOM, B1Wizardbase dlls for 64 bit. Through Browse, I can only get SAPbobsCOM dll ?

Regards

edy_simon
Active Contributor
0 Kudos

Hi Kuldeep,

SAPbouiCOM is inside the SBO 64 bit client installation folder.

B1Wizardbase, you will need to build your own from the B1DE Source Code.

Or you can download here.

After you can compile your addon successfully in 64 bit, I can try to assist you on the rest of the step here, or by teamviewer.

Regards
Edy

Former Member
0 Kudos

Hi ,

Please access my system.

Team ID : 412 665 665

Password: 4758

Regards

edy_simon
Active Contributor
0 Kudos

Hi Kuldeep,

Have you successfully compile your addon in 64 bit ?

If not, please do so first before i take a look.

I only have teamviewer version 7.

You can download and run a teamviewer 7 QS.

Regards

Edy

Former Member
0 Kudos

Hi ,

Yes, I have compiled my add-on in 64 bit.

I also have teamviewer 7 running.

Id is

845 918 271- id

1462- password

Regards

Former Member
0 Kudos

Hi ,

Thanks for your help. Just one more thing what to do in your steps if I am creating ARD for 32 bit client.

Regards

edy_simon
Active Contributor
0 Kudos

Hi Kuldeep,

For the 32 bit, you dont need to do anything.

You have been doing it all the time don't you ?

But if you are thinking of having 1 source for x86 and x64, then the answer is no you cannot have only 1 source for x86 and x64.

x86 needs to be compiled in x86

x64 needs to be compiled in x64.

only under certain circumstances, you can have x86 running in x64.

As I mentioned in my original reply, if you want a full-proof, you need to follow mine.

Regards

Edy