Is there anyway to call functions from an unmanaged DLL inside of purebasic? OpenLibrary doesn't seem to quite be cutting it.
A good example in C++.
http://blogs.msdn.com/b/jonathanswift/a ... 80637.aspx
Edit.... I included the wrong link previously
Thanks,
boop64
Unmanaged DLL
Unmanaged DLL
Last edited by boop64 on Thu Mar 08, 2012 3:31 am, edited 1 time in total.
Re: Unmanaged DLL
I can't see any problem with Openlibrary:
Code: Select all
PrototypeC MultiplyByTen(numberToMultiply.i)
Global MultiplyByTen.MultiplyByTen
If OpenLibrary(0, "yourdllwithmultiplybytenfunction.dll")
MultiplyByTen = GetFunction(0, "MultiplyByTen")
Debug MultiplyByTen(100)
EndIf
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: Unmanaged DLL
While you are correct OpenLibrary works fine for most DLL's, some DLL's do not have an export table and are not able to be called or interrogated by the normal purebasic functions.
Thanks,
boop64
Thanks,
boop64
ts-soft wrote:I can't see any problem with Openlibrary:Code: Select all
PrototypeC MultiplyByTen(numberToMultiply.i) Global MultiplyByTen.MultiplyByTen If OpenLibrary(0, "yourdllwithmultiplybytenfunction.dll") MultiplyByTen = GetFunction(0, "MultiplyByTen") Debug MultiplyByTen(100) EndIf
Re: Unmanaged DLL
You can load and use all unmanaged dlls, if no function-export, use GetFunctionEntry()
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
