Hi all,
I tried and failed to make a dll in freeBasic to work with VB.NET. First i have made the dll successfully but i can't include it in my vb.net project. When i tried to include it via Add reference, it shows me that the dll is not valid.
Then i tried to make this dll valid by using TlbImport.exe in VS command propmt. But that is not supporting this dll. So somebody please tell me how can make a valid dll in freeeBasic. I have some hits about the datatype mismatching in these two languages. I am seeking information on that area too.
How to make a dll file in freeBasic to work with VB.NET
Re: How to make a dll file in freeBasic to work with VB.NET
I don't use VB.NET but I do use C#. I successfully created a FB DLL and used it through a C# application. Have a look at the C# portion of this post where I declare the DLLs. Perhaps it is similar to the way VB.NET imports functions.
FBGfx for C#
-Vince
FBGfx for C#
-Vince
Re: How to make a dll file in freeBasic to work with VB.NET
@ vdecampo ,
Thanks a lot. Let me check. :)
Thanks a lot. Let me check. :)
Re: How to make a dll file in freeBasic to work with VB.NET
VB.NET works on the .NET platform, the CLR. To use native (or "unmanaged") .dll files (which are different to .NET ("managed") assemblies, which also use the .dll file extension) see "Platform Invoke" (or P/Invoke in short).
Here's an older, but still valid tutorial: https://msdn.microsoft.com/en-us/library/aa288468.aspx
Note that there are only some syntactic differences between VB.NET and C# - otherwise it's the same.
More information on Platform Invocation Services can be found on Wikipedia: https://en.wikipedia.org/wiki/Platform_ ... n_Services
Here's an older, but still valid tutorial: https://msdn.microsoft.com/en-us/library/aa288468.aspx
Note that there are only some syntactic differences between VB.NET and C# - otherwise it's the same.
More information on Platform Invocation Services can be found on Wikipedia: https://en.wikipedia.org/wiki/Platform_ ... n_Services