there are some related questions:
1. is there any detailed tutorial to use .net DLL in freebasic?
2. can System.Windows.Forms be used to created GUI?
3. can we bundle .net DLL into EXE file compiled by freebasic? When the EXE runs, no DLL is extacted into the harddisk.
4. can we bundle all .net DLLs into EXE file compiled by freebasic? I mean the application only use functions in A.dll, but A.dll has a dependency of B.dll.
Thanks.
Using .NET DLL?
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: Using .NET DLL?
If you need the NET runtime environment why do you not use VB.net (VisualBasic for NET) ?
Joshy
Joshy
Re: Using .NET DLL?
Hi All,
I am actually interested in this as well since I am playing with some FreeBASIC code that will be able to call various 3rd-party DLL libraries (i.e. generated from C/C++, Golang, and .NET, etc.)
Any support or suggestions on this would be greatly apprciated.
I am actually interested in this as well since I am playing with some FreeBASIC code that will be able to call various 3rd-party DLL libraries (i.e. generated from C/C++, Golang, and .NET, etc.)
Any support or suggestions on this would be greatly apprciated.
Re: Using .NET DLL?
This topic came up in another forum for Xojo. Eugene Dakin had a solution available to make raw C# C compatible libraries (DLLs). Libraries created using this method can be consumed by any language capable of accessing native C libraries.oyster wrote: ↑Aug 16, 2022 9:30 there are some related questions:
1. is there any detailed tutorial to use .net DLL in freebasic?
2. can System.Windows.Forms be used to created GUI?
3. can we bundle .net DLL into EXE file compiled by freebasic? When the EXE runs, no DLL is extacted into the harddisk.
4. can we bundle all .net DLLs into EXE file compiled by freebasic? I mean the application only use functions in A.dll, but A.dll has a dependency of B.dll.
Thanks.
https://scispec.ca/index.php/blog/55-cr ... l-for-xojo
To answer your questions directly:
1) See above for link to detailed tutorial
2) If you can embed it in your DLL, you can use it in your Freebasic application.
3) No - you are provided static DLLs when you compile C#. C# runtime assembly is not compatible with Freebasic. You cannot bind the libraries to your Freebasic EXE. Binding C# to C# exes, it is possibly to eliminate side-file DLL's & bind the libraries directly to your EXE.
4) You will need to build each DLL that you wish your application to use by hand, and then invoke the declares from within Freebasic.
-
- Posts: 2
- Joined: Apr 05, 2023 10:36
Re: Using .NET DLL?
Hello,oyster wrote: ↑Aug 16, 2022 9:30 there are some related questions:
1. is there any detailed tutorial to use .net DLL in freebasic?
2. can System.Windows.Forms be used to created GUI?
3. can we bundle .net DLL into EXE file compiled by freebasic? When the EXE runs, no DLL is extacted into the harddisk.
4. can we bundle all .net DLLs into EXE file compiled by freebasic? I mean the application only use functions in A.dll, but A.dll has a dependency of B.dll.
Thanks.
It is possible to use .NET DLLs in FreeBASIC, but there may not be a detailed tutorial specifically for this. However, you can find resources online that explain how to use external libraries in FreeBASIC, which may help with using .NET DLLs. It's important to note that using .NET DLLs requires the .NET runtime to be installed on the target machine.
Yes, System.Windows.Forms can be used to create GUI in FreeBASIC. It provides a way to create and manage windows, dialogs, buttons, text boxes, and other controls.
Yes, it is possible to bundle .NET DLLs into the EXE file compiled by FreeBASIC using a technique called "embedding resources." This involves adding the DLLs as resources to the EXE file, and then using the appropriate functions to load them at runtime. This way, the DLLs are not extracted to the hard disk.
It is possible to bundle all .NET DLLs into the EXE file compiled by FreeBASIC using the same technique as in 3. However, this may result in a larger EXE file size and longer load times. It's also important to note that bundling all DLLs may not be necessary, as only the DLLs that the application actually uses need to be included.
Re: Using .NET DLL?
.NET DLLs are .NET assemblies containing IL. To my best knowledge there is no runnable native code in them. So you need to instruct a .NET interpreter instantiated in your process or another process to load and process them.Gregorygall wrote: ↑Apr 06, 2023 8:37 However, you can find resources online that explain how to use external libraries in FreeBASIC, which may help with using .NET DLLs.
The classic answer is go via COM or the other way around (let a .NET program call FB dlls via interop). IIRC Remobjects had some product for Delphi to make this possible (Hydra, https://www.remobjects.com/hydra/), which I assume is some COM and header generators, but I dont know the details how it works.
How, examples or even just an explanation ? Connecting them over IPC/TCP/IP IMHO doesn't count. The answer is a bit vague and ChatGPTy.Yes, System.Windows.Forms can be used to create GUI in FreeBASIC. It provides a way to create and manage windows, dialogs, buttons, text boxes, and other controls.
Re: Using .NET DLL?
Welcome to the brave new world of ChatGPT-powered forum spambots. Most likely we will see this post (and the bot's other post) edited in the near future to add urls.