Announcement

Collapse
No announcement yet.

Destinator 5/6 in Visual Basic

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Destinator 5/6 in Visual Basic

    Has anyone have success with using the SDK in Visual Basic ?
    I Just got the Destinator 5 PN SDK from Destinator and want to try to use it in VB, also with the included examples. But have no luck.

    The first few times it cam with the error “Error creating ActiveX object” with the line:
    Set g_Dest = CreateObject("DestSDK.Dest")
    And now I just get the error
    “Your Software is not correctly installed! Please reinstall the program” and then I exit my VB.

    So has anyone had more lock their an can help me ?

  • #2
    Originally posted by Centauri_dk View Post
    Has anyone have success with using the SDK in Visual Basic ?
    I Just got the Destinator 5 PN SDK from Destinator and want to try to use it in VB, also with the included examples. But have no luck.

    The first few times it cam with the error “Error creating ActiveX object” with the line:
    Set g_Dest = CreateObject("DestSDK.Dest")
    And now I just get the error
    “Your Software is not correctly installed! Please reinstall the program” and then I exit my VB.

    So has anyone had more lock their an can help me ?
    Destinator PN SDK 5.1.82b have many bug...and impossible use of it for development.
    This is one old discussion....
    Or you have one update version instead of 5.1.82b?

    D6 SDK ...not exist for this moment.


    Mauri

    Comment


    • #3
      Originally posted by mauri View Post
      Destinator PN SDK 5.1.82b have many bug...and impossible use of it for development.
      This is one old discussion....
      Or you have one update version instead of 5.1.82b?

      D6 SDK ...not exist for this moment.


      Mauri

      Its a Version i just have got from Destinator so i thing its the newest version, or at list should be.

      Do you have a version you can recoment, that works better?

      Comment


      • #4
        I can se the version i got form the SDK Team is
        Version 5.1.161_MR
        And the Version used I CentraFuse is
        Version 5.1.161_PC

        So what the different is those versions is I don’t know

        But after some playing around I can get some further and get an other error

        Run-time error 450
        Wrong number of arguments or invalid property assignment

        At the line
        res = g_Dest.CreateDestinatorWindow(F_DEFAULT)

        and the whole function is

        dim g_Dest As Object
        Set g_Dest = CreateObject("DestSDK.Dest")
        g_Dest.ParentWindow = hWnd
        res = g_Dest.CreateDestinatorWindow(F_DEFAULT)

        Hope someone now how to get this to work.

        Comment


        • #5
          Get in touch with CDR. He can surely help you out on this.
          The road is long but we are getting there.

          Comment


          • #6
            Have tried, he has the same problems :-(

            Comment


            • #7
              Hello Centauri_dk,

              I'm also trying to get the SDK working. I tried in Delphi, VB 6, VB.NET and C#.NET using the SDK supplied by CF RC3.

              When compiling, I get the "Interface not supported" COM error. The I tried creating the COM objects at runtime (no binding at designtime). I've got past that error and get a destinator window without map.

              When there are no maps in de Destinator dir, the map switch window is shown. That's how far CDR and I have come.

              Your "Wrong number of arguments" error can be fixed by supplying a valid key, like this:

              g_Dest.CreateDestinatorWindow(F_DEFAULT, "theKey")

              Hope we can get it running soon. The guy from CF has it running but is a partner of Destinator ...

              Maarten

              Comment


              • #8
                Destinator 6 SDK is working!!!

                Hello,

                Today I've got the SDK working in .NET! There are a few tricks that needs to be done before you can use it in .NET.

                First of all you need to enable the Multithread COM theading model.

                Code:
                //[STAThread]
                [MTAThread]
                static void Main()
                When you add the DestSDK.dll to your projects references, Visual Studio/Sharpdevelop will create a .NET wrapper for the DLL (called Interop.DESTSDKLIB.dll). When you want to use CreateDestinatorWindowEx, you need to supply a _RemotableHandle struct. There's no easy way to create such kind of object. The COM object can accept a int32 for the windowhandle, so I've modified Interop.DESTSDKLIB.dll to do this for me. These are the steps to modify:
                • Copy DestSDK.dll to c:\
                • Make the dotnet wrapper: tlbimp c:\DestSDK.dll /out:c:\Interop.DESTSDKLIB.dll
                • Make il of the wrapper: ildasm.exe (dump c:\Interop.DESTSDKLIB.dll to c:\Interop.DESTSDKLIB.il and c:\Interop.DESTSDKLIB.res)
                • Change argumenttype of CreateDestinatorWindowEx to Int32 in both places in Interop.DESTSDKLib.il
                • Compile again: ilasm /DLL /RESOURCE=c:\Interop.DESTSDKLib.res /OUTPUT=c:\Interop.DESTSDKLIB.dll c:\Interop.DESTSDKLib.il

                I've attached a minimal demo. The Interop.DESTSDKLIB.dll is supplied and is for the demo SDK. Destinator SDK is stripped to reduce attachement size.

                Hope this helps some of us.

                Maarten
                Attached Files

                Comment


                • #9
                  Dont had the time to check your success here....one question: Have you been able to show up some map and do basic navigaton??? How did you come up with a valid key???? The SDK is secured!!! Only Powerloc can provide a valid key otherwise you have to crack it and thats illegal so you cant develop applications and publish them!!!

                  Comment


                  • #10
                    Originally posted by Supergong View Post
                    Dont had the time to check your success here....one question: Have you been able to show up some map and do basic navigaton??? How did you come up with a valid key???? The SDK is secured!!! Only Powerloc can provide a valid key otherwise you have to crack it and thats illegal so you cant develop applications and publish them!!!
                    Yes, I'm able to show up a map and use the SDK. The valid legal key is the problem that we have. We can't distribute free software using Destinator 6 SDK. The C# demo uses the Destinator 6 SDK demo ("Not for sale" message in center of screen) and doesn't need a key.

                    But there was the same issue with Destinator 3 SDK. In the demo you got the "Not for sale" message. To make use of the full version, you had to buy it. But the full version was illegaly included in FreeDrive (or did CdR had permission to include it?).

                    Maarten

                    Comment


                    • #11
                      I did actually send Rafiq from destinator a early copy of freedrive, I think it was about 0.4 / 0.6 or something, I sent him the install exe and asked if everything was ok like that only including the berlin map as thats what was included with the last free sdk they produced. I got a email back saying fine if I needed any further help etc.. and to be aware the destinator were soon going to start charging for there sdk. He also gave me a link to there latest just to make sure I had the very last free one they did.. (nice man)

                      So I didnt bother asking again as that was good enough for me. As long as the end user owns a copy of destinator then I cant really see them having a problem.

                      CdR
                      Follow me on Twitter

                      http://www.FreeICE.co.uk

                      Comment


                      • #12
                        o yeah and I'm downloading vb.net express.. never touched .net before so this will be interesting.. to say the least lol

                        CdR
                        Follow me on Twitter

                        http://www.FreeICE.co.uk

                        Comment


                        • #13
                          Where do i get the destinator6 sdk demo?? Didnt see it on their website!

                          Comment


                          • #14
                            Hi,

                            i tried the steps from maarten to get the SDK running under VB.NET. It didnt work, because from the VS i get the error 80040154 (class not registered). So i tried to register the dll via register.bat to the system, but the the regsvr error said LoadLibrary("DeskSDK.dll") failed - The specified module could not be found. The dll is in the correct folder so it should work.

                            @maarten: how did you get it working? please step by step. I didnt get your example running? I get the same error in C# like in the try in VB.NET. Do I need some additional files?

                            Please! What i have to do get a map shown with this sdk files?

                            Greetings the Honk

                            Comment


                            • #15
                              It’s because the files in the ZIP file hire does not contain all the necessary files for the SDK. In only contain the Sample File and the Modified files from the SDK.
                              The rest of the files have to be copied in the Debug directory to.
                              So you need to have the SDK and copy the missing files your self.

                              Comment

                              Working...
                              X