How can access Shared DLL

Discussion in 'Questions (Windows Mobile)' started by sanatci, May 16, 2009.

  1. sanatci

    sanatci New Member Licensed User

    Hi Guys,
    I'm newbie on basic4ppc, but i like it so much, easy, user friendly, rich functions and libraries. Congratulations to all basic4ppc community.
    I tested some examples on desktop and CE 5.0 OS device. Everything is excellent.
    Now, i want to use basic4ppc for a real project for mapping and navigation. I'm sorry, i'm not sharing map company name, it's confidential and i signed an agreement. They have a shared dll and it have some functions to be call.
    I know only this DLL suitable for embedded Visual C++ and also i have functions reference.
    How can i use basic4ppc with this DLL ?
    Thanks a lot,
    gurbuz
     
  2. agraham

    agraham Expert Licensed User

    You need a Basic4ppc library written that acts as an interface to, or wrapper for, that native library. Such a library is a .NET assembly usually written in C# or VB.NET. The most convenient way to write such a library is with Visual Studio 2005 or 2008 or with the free SharpDevelop IDE. If the library is plain C++ it is probably possible, if it is a COM library things may be a little bit more difficult. A lot depends upon how the native library is implemented.
     
  3. sanatci

    sanatci New Member Licensed User

    .net functions equivalents

    Is it possible following .net functions equivalents in basic4ppc ?
    LoadLibrary
    CallWindowProc
    GetProcAddress
    FreeLibrary
     
  4. agraham

    agraham Expert Licensed User

    Those are not .NET functions, they are native Win32 API calls. They are not accessible from within Basic4ppc and are not relevant in a .NET language.

    LoadLibrary, GetProcAddress and FreeLibrary are taken care of by the .NET Framework when using DllImport to P/Invoke native functions from managed code. A Basic4ppc library could do this for a Basic4ppc program to access functions in a native dll.

    Equivalent (more or less) functionality to CallWindowProc is available in .NET but varies according to the platform and version of .NET. To use it successfully you will need a knowledge of Windows message handling (which you may already have) and some knowledge of .NET (which I suspect you may not yet have).
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice