Re: Re: Re: Re: SL7 and C#
In theory both VB.net and C# compile down to the same or equivalent intermediate language code, however, I recall a hotfix awhile back that dealt specifically with calling Object Model from C# code, so perhaps there are some minor differences in the SL environment. The SL kernel is still C++ from what I understand.
Also, launching the parent app from managed code is a little inconsistent sometimes, to put it gently. Make sure you have all hotfixes dealing with object model for your version (mind the SP level too), and there is a specific recommendation for adding a thread delay during launch (it deals with RPC) and also calling the garbage collection a couple of times (e.g . Collect / WaitForPendingFinalizers / Collect, Thread.sleep(delay), repeat) - described in KB article 952057.
Be sure to check out these KB articles if you run into any issues:
943294: Error messages when you try to use Object Model together with languages other than Visual Basic .NET in Microsoft Dynamics SL 7.0: "Automation error" or "Unable to establish connection with Parent.SIVToolbarRemoteObject"
952057: Error message when you try to execute Object Model code in Microsoft Dynamics SL: "Did not receive signal from MSDynamicsSL" or "Unable to establish connection with Parent.SIVToolbarRemoteObject"
Regards,
Paul