| |
|
|
Christian Schneider | Hello people,
I frickle already a whole while on it rum a Dll ans walk To get (see Appendix).
I post sometimes a the Codes (of it there ne crowd, with the Gemeinsamkeit tappt im dunkeln funkionieren not )
there The data base prepares becomes (has its accuracy, if not yet present) and subsequently the Interpreter abschmiert, I'm going time of it from it's located on the Return Value.
The Doku to function finds itself here: [...]
Greeting Christian
P.s. having with dll´s yet not really plenty on the hat ;)
Nutze The 11Sub12 |
|
|
| |
|
|
|
Andreas Miethe
| the lying not on the Return Value. The Dll uses CDECL-Aufrufkonventionen instead of StdCall.
See here : [...] |
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 01/10/08 ▲ |
|
|
|
|
Christian Schneider | thanks, there would I in life not on it come
The code runs by me unfortunately not. |
|
|
| |
|
|
|
Andreas Miethe
| have You you The Examples of Uwe Pascal Niemeier time runtergeladen ?
functions by me wonderful.
example : CompileMarkSeparation $H Windows.ph
proc CallCdecl----------------------------------CallCdecl-------------------------------
****************** © by TCS (Uwe Pascal Niemeier) 042006
declare asm#,RetVal&
dim asm#,36
long asm#, 0=-1947432107,166399045,-855390069,-394055169
long asm#,16=217613060,1166799479,-1949237496,1019370981,0
RetVal& = call( asm#,&(1),%pcount*4+8,&(2),&(3),&(4),&(5),&(6),
&(7),&(8),&(9),&(10),&(11),&(12),&(13),&(14) )
Dispose asm#
Return retval&
endproc---------------------------------------------------------------------------------
declare DB&,File$
declare SqlLite&,open&,close&-----------Cdecl-Funktionen
SqlLite&=usedll(sqlite3.dll)
open& =~GetProcAddress(SqlLite&,sqlite3_open)
close& =~GetProcAddress(SqlLite&,sqlite3_close)
File$ =Test1.db
CallCdecl(open&,Addr(File$),Addr(DB&))
Print Datenbank - Handle : +str$(DB&)
Waitinput
CallCdecl(close&,DB&)
Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 01/10/08 ▲ | |
|
|
|
|
Christian Schneider | whom Have I overlooking. thanks, functions. |
|
|
| |
|
|
|
RGH | The story has me on it reminds, I already longer vorhatte, in XProfan too CDECL To support. ex the next Subscriptionsversion functions following code: CompileMarkSeparationDeclare hDLL&, hDB&, Ergebnis&, Pointer&, err&, col&, row&
Set(CallConv, CDECL)
hDLL&=UseDll(sqlite3.dll)
importfunc(hDLL&,sqlite3_open,db_open)
importfunc(hDLL&,sqlite3_exec,db_exec)
importfunc(hDLL&,sqlite3_close,db_close)
importfunc(hDLL&,sqlite3_free,db_free)
importfunc(hDLL&,sqlite3_free_table,db_free_table)
importfunc(hDLL&,sqlite3_get_table,db_get_table)
PROC dbError
parameters e&
if e& <> 0
print string$(e&,0)
db_free(e&)
else
print OK
endif
ENDPROC
CLS
Datenbank öffnen
db_open(test.db,addr(hDB&))
dbError(err&)
Tabelle ggf. löschen
db_exec(hDB&,DROP TABLE buecher,0,0,addr(err&))
dbError(err&)
Tabelle erzeugen
db_exec(hDB&,CREATE TABLE buecher (titel CHAR(40), autor CHAR(40), preis NUMBER(5,2)),0,0,addr(err&))
dbError(err&)
Daten einfügen
db_exec(hDB&,INSERT INTO buecher VALUES (XProfan für Dummies,RGH-Soft,19.90),0,0,addr(err&))
dbError(err&)
db_exec(hDB&,INSERT INTO buecher (titel, autor) VALUES (Speed für Profaner,Frank Abbing),0,0,addr(err&))
dbError(err&)
Tabelle auslesen
db_get_table(hDB&,SELECT * FROM buecher,addr(Ergebnis&),addr(row&),addr(col&),addr(err&))
dbError(err&)
print col&; Spalten / ;row&; Zeilen
Pointer& = 0
whileloop 1, row& + 1
whileloop 1, col&
if long(Ergebnis&,Pointer&) > 0
print string$(long(Ergebnis&,Pointer&),0);
else
print get(SQLNULL);
endif
print get(SQLDEL);
Inc Pointer&, 4
endwhile
print
endwhile
db_free_table(hDB&, Ergebnis&)
waitinput
db_close(hDB&)
FreeDLL&
end
New is solely Set(CallConv, CDECL).
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/10/08 ▲ |
|
|
|
|
Jac de Lad | self-confessed time Please someone benefit of cdecl? and the differences? and at all??? |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 01/10/08 ▲ |
|
|
|
|
Christian Schneider | there falls me spontan only one one:
@JAC: [...] |
|
|
| |
|
|
|
Jac de Lad | I see, has means for Ottonormalprofaner no Auswirkungen?! |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 01/10/08 ▲ |
|
|
|
|
Christian Schneider | No. out of the now More dll´s nativ funkionieren as yet.
@Roland: what if one several dll´s in a Program uses and a part of it by cdecl and others by stdcall works? |
|
|
| |
|
|
|
Jac de Lad | which because to that example? |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 01/10/08 ▲ |
|
|
|
|
| Jac
self-confessed time Please someone benefit of cdecl? and the differences? and at all???
amateurish framed could one say on Asmebene there no functions and no Funktionsparameter - there's but Sprungadressen and a Stack. If one now behauptet the code behind whom Sprungadressen corresponds to one Funktionscode then becomes the Stack as Parametermerker using. one places (push) means values on the Stack and jumping (call) then to a Sprungadresse. The code behind it takes The values of Stack (pop) circa these To process. The Vollständigkeithalber could one allude the one möglicher Return Value of/ one such function fundamentally in the eax-tab hinterlegt becomes before The function by ret whom Rücksprung prompted.
whether stdcall or cdecl places hierbei z.B. The Order solid with the The values of Stack taken go. with cdecl go The Params hold in umgekehrter Order To stdcall on the Stack gepackt.
depending on with which Compileroption z.B. a DLL compiled watts (or How the asm knitted is) must one therefore with cdecl or stdcall Call. |
|
|
| |
|
|