Calling a FB Sub from a DLL - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html) +--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html) +--- Thread: Calling a FB Sub from a DLL (/thread-6264.html) |
Calling a FB Sub from a DLL - Tio Bit - 02-27-2005 Is possible to call a freebasic procedure or function from a DLL?; Anyone has some example?. Thks in Adv. Tio Bit Calling a FB Sub from a DLL - VonGodric - 02-27-2005 see exaples\dll\ in your freebasic directory Calling a FB Sub from a DLL - Tio Bit - 02-27-2005 Hi VonGodric; But in that example you call a function defined in the DLL from the EXE file (the normal way); I want to know if it's possible to call a Function defined on the main EXE from the DLL (something like a callback function) Calling a FB Sub from a DLL - lkd85 - 02-27-2005 Do you mean using EXPORT on the sub in the main exe code and using GetProcAddress to get this function in the DLL code. Look at the export and import examples in the export folder. Calling a FB Sub from a DLL - Tio Bit - 02-27-2005 Ok, Thanks, it was very easy (adapted from the dll and export examples ): TEST.BAS Code: '' and MYDLL.BAS Code: . mydll.bi doesn't change. |