web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

SL7 and C#

(0) ShareShare
ReportReport
Posted on by 1,245

Hello Everyone

I'm new to SL development and was wondering if it is possible to write custom modules in C# instead of VB.NET.  Does swimapi (again I know very little of this) have any limitations if used in C#?

 TIA

Nayan

*This post is locked for comments

I have the same question (0)
  • pbrattin Profile Picture
    1,850 on at

    When you say custom modules, do you mean additional screens for a SL system or a custom module that uses the Solomon Object Model? How do you plan to use swimapi in C#?

  • Nayan Mansinha Profile Picture
    1,245 on at

    Both.  Additional screens in SL and using custom module using Solomon Object Model.

    TIA

    Nayan

  • George Sagen Profile Picture
    1,005 on at

    Here's a link to the SL Object Model Reference Guide:

    https://mbs.microsoft.com/downloads/customer/solomon/70adminguides/sl_ob.pdf 

    The document claims to be for: 

    "Other Windows programmers who need to write client applications that automate Microsoft Dynamics SL and who know a programming tool that can create COM automation clients. Such tools might include Microsoft Visual C++, Borland C++, Borland Delphi, PowerBuilder, and many other Windows programming tools. Although all of the examples that are offered are Visual Basic-based, the discussions apply to any COM client ."

     Geo

  • pbrattin Profile Picture
    1,850 on at

    Absolutely you can write programs that utilize the Solomon Object Model in C#. I would guess you could write VBTools screens in C# but you would have to figure out the C# equivalent of the VBTools required objects, like the record buffers. Examples of those objects are shown in VB.Net.

     

     

  • Paul Phillips Profile Picture
    590 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans