DLL Importer howto?
Posted: Wed Mar 04, 2020 6:20 am
I can't seem to get it to work. Talking about the tool in C:\Program Files (x86)\PureBasic571\SDK\DLL Importer .
I created PUREBASIC.dll from the included DLLSample.pb (which also creates a .lib file)
I created a PUREBASIC.pbl file:
PUREBASIC.DLL
EasyRequester 1
All files are in the same folder.
I run DLL Importer and get this message:
---------------------------
Info
---------------------------
Conversion correctly finished.
Files created:
C:\Program Files (x86)\PureBasic571\PureLibraries\Windows\PUREBASIC
C:\Program Files (x86)\PureBasic571\PureLibraries\Windows\Libraries\PUREBASIC.lib
C:\TestDLL\Exports\purebasic.def
---------------------------
OK
---------------------------
I restart PB and try to get EasyRequester_("EasyRequester") to work.
---------------------------
PureBasic
---------------------------
Line 1: EasyRequester_() is not a function, array, list, map or macro.
---------------------------
OK
---------------------------
Where should the DLL be placed? Next to binary or does it have to be in system32?
I tried copying the DLL to C:\Windows\SysWOW64 (32 bit DLL). But still same message.
Btw. can't the tool create those IDL files from a .lib file (or .h if available)? Or use an existing.lib file instead? (the DLL Importer creates a .lib file too?).
The readme is quite basic and uses a weird translation for folder as 'drawer' it seems.
I created PUREBASIC.dll from the included DLLSample.pb (which also creates a .lib file)
I created a PUREBASIC.pbl file:
PUREBASIC.DLL
EasyRequester 1
All files are in the same folder.
I run DLL Importer and get this message:
---------------------------
Info
---------------------------
Conversion correctly finished.
Files created:
C:\Program Files (x86)\PureBasic571\PureLibraries\Windows\PUREBASIC
C:\Program Files (x86)\PureBasic571\PureLibraries\Windows\Libraries\PUREBASIC.lib
C:\TestDLL\Exports\purebasic.def
---------------------------
OK
---------------------------
I restart PB and try to get EasyRequester_("EasyRequester") to work.
---------------------------
PureBasic
---------------------------
Line 1: EasyRequester_() is not a function, array, list, map or macro.
---------------------------
OK
---------------------------
Where should the DLL be placed? Next to binary or does it have to be in system32?
I tried copying the DLL to C:\Windows\SysWOW64 (32 bit DLL). But still same message.
Btw. can't the tool create those IDL files from a .lib file (or .h if available)? Or use an existing.lib file instead? (the DLL Importer creates a .lib file too?).
The readme is quite basic and uses a weird translation for folder as 'drawer' it seems.