1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

C# and FSUIPC

Discussion in 'Tools programming' started by ras78, 7/5/07.

  1. ras78

    ras78

    Joined:
    1/9/05
    Messages:
    374
    Country:
    italy
    Hello guys,
    I'm building a simply dll for read some offset and use it in my scenery. I've coded my dll with C# and FSUIPC. I've just a question: how FS can "call" my class? fi:

    PHP:
    using FsuipcSdk;

    namespace 
    MyClass {
      public class 
    MyClassTest {
            protected 
    void test()
            {
            
    //...code...
            
    }
      }
    }
    So, how can I tell to FS to istanciate my class and load test() method? There're no documentations about c#, fsuipc and dll...
  2. scruffyduck

    scruffyduck Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    17/9/05
    Messages:
    25,456
    Country:
    wales
    I'm not sure I understand the question. Are you trying to write a module to run inside FS?
  3. ras78

    ras78

    Joined:
    1/9/05
    Messages:
    374
    Country:
    italy
    Yes, should be a dll such ActiveGate.
  4. scruffyduck

    scruffyduck Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    17/9/05
    Messages:
    25,456
    Country:
    wales
    OK then I can't help as I have not written a module for FS - all my tools are external. Maybe someone else can offer help.........
  5. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2/6/04
    Messages:
    2,564
    Country:
    us-wisconsin
    Hi ras78.

    I don't believe you can use a .NET dll within any of the FS series... it is written in C++ as native 32 bit app.

    Dick
  6. ras78

    ras78

    Joined:
    1/9/05
    Messages:
    374
    Country:
    italy
    thanks guys, I've installed the Bloodshed C++ and succesfully compiled my dll.
  7. lordofwings

    lordofwings

    Joined:
    5/11/06
    Messages:
    559
    Country:
    panama
    Having grown out of a myriad of programming languages such as Basic, VB, C, C++, Java, etc. I have been a .NET programmer for years. Needless to say my favourite language is C#.

    Last year I made a nearly complete port of the FS2004 NetPipes SDK in C# which I used nearly successfully on a test application.

    Now, new ideas have come to my mind and I need to develop these, in C# of course.

    Well, I just downloaded the FSUIPC SDK for FS2004 from Dawson's site and there is a section with examples about using his SDK with C#! It is distributed in the SDK but it is apparently developed by some Bob Scott guy. Now, I think that is a good starting point (I will start from there) but I must warn you that this "port" was definitely not very type safe, for example he is using hardcoded integer values such as 0x23456 for the offsets instead of simply using an enum type that would define them by name and value. Anyway, better than nothing if you ask me.
  8. scruffyduck

    scruffyduck Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    17/9/05
    Messages:
    25,456
    Country:
    wales
  9. lordofwings

    lordofwings

    Joined:
    5/11/06
    Messages:
    559
    Country:
    panama
    RE: In C#

    Indeed!. My first add-on was based on the "standard" C# SDK that comes with the FSUIPC SDK. However as I mentioned it was poorly written and more proceduraly oriented than object oriented.

    After nearly 3 weeks of coding I dumped my add-on because there were too many similar products out there.

    I started a new project and I can agree with Scruffy that the .NET Client SDK presented in that thread is a much better alternative.

Share This Page