How can access Shared DLL

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
 

agraham

Expert
Licensed User
Longtime User
How can i use basic4ppc with this DLL ?
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.
 

sanatci

New Member
Licensed User
.net functions equivalents

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

agraham

Expert
Licensed User
Longtime 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).
 
Top