Rico

Run application in "Any CPU" mode

Recommended Posts

Hi,

 

i have a problem to add the EventHandler if i compile my application in Any CPU mode.

It throws the following error:

 

try
{
	//add eventhandler for the PubOnlineMgrNotification Events
    ConnectedLineManager.PubOnLineMgrNotification += EventHandler;
}
catch (Exception e)
{
	Console.WriteLine(e.Message);
}

 

bei System.Runtime.InteropServices.ComTypes.IConnectionPoint.Advise(Object pUnkSink, Int32& pdwCookie)
   bei CLMGRLib.IClientLineMgrEventsPub_EventProvider.add_PubOnLineMgrNotification(IClientLineMgrEventsPub_PubOnLineMgrNotificationEventHandler )
   bei CLMGRLib.ClientLineMgrClass.add_PubOnLineMgrNotification(IClientLineMgrEventsPub_PubOnLineMgrNotificationEventHandler )
   bei CdSwyxIt.SwyxItClientSdkEvents.ClientSdkEvents.Connect(ClientLineMgrClass lineManager, MessageHandler lineManagerMessageDelegate)
  
  Ausnahme von HRESULT: 0x80040202

 

I works perfect if i set the option "32-Bit bevorzugen" (see attachment).

 

My Problem is, that i can't set this option, because my application connects to SAP Business One.

If i set this option, i can't connect to SAP Business One 64bit Client.

 

 

 

Best regards,

Rico

 

 

 

Screenshot - 11.01.2017 , 16_20_10.png

Share this post


Link to post
Share on other sites

Hey Rico,

 

perhaps there is a problem between your application and the CLMGr.exe. The CLMgr.exe works with a COM Object to communicate.

 

When your Application is 64bit but the CLMgr.exe a 32 Bit app errors can occur. I am not realy shure but this could be the problem.

 

Best regards,

Pascal

Share this post


Link to post
Share on other sites

Hello,

 

swyx!it client and CLMgr.exe are both 32 bit applications. So an application which uses the client line manager component must also be in 32 bit.

As far as i know, the only way for 64 bit application is to use the CDS SDK, which works with web services.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now