English
Forum

ImportDLL, ImportFunc | What do I do wrong?

 
- Page 1 -



Christof
Neuß
Hi,

I try integrally simply a function a DLL To benefit.
Since I red have, that ImportDLL evt. not functions what about me not any functions from the DLL need, take I ImportFunc.

The first and simple function is, The Version the DLL auszulesen. it functions but not.

THANK YOU!

1 kB
Hochgeladen:01/14/16
Downloadcounter117
Download
770 kB
Hochgeladen:01/14/16
Downloadcounter132
Download
 
XProfan X3
Win10 16 GB RAM
01/14/16  
 



« this Posting watts as Solution marked. »


Christof
Neuß
The point was "hüpfende Komma".

so funktioniert's:
Var SQL3Handle&=UseDll("SQLite3.DLL")
ImportFunc(SQL3Handle&,"sqlite3_libversion","SQL3_Libversion")
Print "Programmstart..."
Print String $(SQL3_Libversion(),0)
FreeDLL SQL3Handle&
Print:Print:Print "Programmende!"
Waitkey
End
 
XProfan X3
Win10 16 GB RAM
01/14/16  
 



the beginnende question mark:

? SQL3.LIBVERSION()

is so but not correctly., or?!
Var SQL3Handle&=UseDll("SQLite3.DLL")
ImportFunc(SQL3Handle&,"sqlite3_libversion","SQL3.LIBVERSION")
Print "Programmstart..."
? SQL3.LIBVERSION()
FreeDLL(SQL3Handle&)
Print:Print:Print "Programmende!"
Waitkey
End

The DLL uses cdecl instead of stdcall?

i see The Help importdll but not,
must own Topic since.
 
01/14/16  
 




Christof
Neuß
SORRY!!!
so geht's...
-------------------------
Var SQL3Handle&=UseDll("SQLite3.DLL")
ImportFunc(SQL3Handle&,"sqlite3_libversion","SQL3.LIBVERSION")
Print "Programmstart..."
Print String $(SQL3.LIBVERSION(),0)
FreeDLL SQL3Handle&
Print : Print : Print "Programmende!"
Waitkey
End

---------------------------

the ? was my Error. Hab' first none understood, what You with "Freizeichen" meant. was gedanklich with of/ one others Language where the question mark synonym for "Print" stand can/must.
 
Win10 16 GB RAM
01/14/16  
 



Yes, verwirrend, having Freizeichen written and meant but question mark. Habs korrigiert. ^^
 
01/14/16  
 




Christof
Neuß
Häh?

now läuft's in the Interpreter, but the EXE bleats.

"Variable not declared: SQL3.LIBVERSION
row 5

 
XProfan X3
Win10 16 GB RAM
01/14/16  
 




Christof
Neuß
The point was "hüpfende Komma".

so funktioniert's:
Var SQL3Handle&=UseDll("SQLite3.DLL")
ImportFunc(SQL3Handle&,"sqlite3_libversion","SQL3_Libversion")
Print "Programmstart..."
Print String $(SQL3_Libversion(),0)
FreeDLL SQL3Handle&
Print:Print:Print "Programmende!"
Waitkey
End
 
XProfan X3
Win10 16 GB RAM
01/14/16  
 




Christof
Neuß
now have I another bisschen moreover made, but I slopes...
Var SQL3Handle&=UseDll("SQLite3.DLL")
ImportFunc(SQL3Handle&,"sqlite3_libversion","SQL3_Libversion")
ImportFunc(SQL3Handle&,"sqlite3_open","SQL3_Open")
ImportFunc(SQL3Handle&,"sqlite3_exec","SQL3_Exec")
Print "Programmstart..."
Erase "Probe3.sqlite"
Print String $(SQL3_Libversion(),0)
Var Datenbank&=0
SQL3_Open("Probe3.sqlite", Addr(Datenbank&))
Print Datenbank&, Addr(Datenbank&)
Var commands$="Create Table Probe 3 (slot01 Text, slot02 Text)"
Var Callback&=0
Var Param&=0
SQL3_Exec(Datenbank&, Addr(commands$), Callback&, Param&, 0)
FreeDLL SQL3Handle&
Print:Print:Print "Programmende!"
Waitkey
End

someone 'ne idea, I when calling of SQL3_Exec differently make must?
 
XProfan X3
Win10 16 GB RAM
01/14/16  
 




Michael
W.
i'm the SQLite simply To umständlich. FireBird operates like MySQL/MariaDB and the reicht really. too The data base must there larger his as with SQLite.
 
XProfan X3
System: Windows 8/10, XProfan X4
Programmieren, das spannendste Detektivspiel der Welt.
01/15/16  
 




Christof
Neuß
Hello Michael,

i'm Yes in the meantime too (almost) convincing, Firebird To take. already on my own therefore, because it in XProfan integrate is and fine supported becomes.

it has me though the "sportliche Ehrgeiz" gepackt, it at least hinzukriegen over these splint time a scheduler in SQLite lay out, bestücken and read to. Since I with DLLs yet neither To hardly worked have, learn I on the side yet what. i'd hold gladly know, as goes. an Solution there Yes generally with the SQLite3.INC of iF. but wieso functions not with ImportDLL... and ImportFunc... ?

i'll me yet something so keep busy, but either it works now soon time or I let it.
 
XProfan X3
Win10 16 GB RAM
01/15/16  
 



there have You you but ne schwierige DLL for rausgesucht,
usually are The integrally umgänglich. The SQLite uses z.B. cdecl instead of stdcall - vlt. functions therefore ImportDLL etc. not.
 
01/15/16  
 




RGH
ImportFunc and ImportDLL should too with CDECL-DLLs correct functions, but to the Calling the functions from the DLL must naturally with Set("CallConv", "CDECL") The Aufrufkonvention correctly tuned go. otherwise there a Error or it go unsinnige values back given. in the example supra missing these attitude the Aufrufkonvention!

Greeting Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
01/15/16  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

10.682 Views

Untitledvor 0 min.
H.Brill vor 7 Tagen
Erasmus.Herold11/28/23
Normann Strübli01/29/23
RudiB.08/30/21
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie