| |
|
|
Sebastian König | Related Tutorials about: [...]
Profan2Cpp-Help
The Direktive $DLL, The at the beginning the Source code stand ought to, divides Profan2Cpp with, that a DLL generiert go should.
Procedures, The export go should, go with dllproc eingeleitet. After the names the procedure becomes thereby as second argument The Number of Parameter, The The procedure expects, indicated. These number ought to naturally with the, what later with parameters specify becomes, coincide. with dllproc declared Procedures cannot nested go.
since Profan2Cpp 1.6a can as dritter Parameter optional one Stringliteral (expression in quotation marks, no Variable!) indicated go, the whom detailed export-names the procedure angibt. (...)
example-code: CompileMarkSeparation $DLL
Alles, was nicht in eine Prozedur steht, wird beim Laden und
Entladen der DLL ausgeführt. Dies ist also auch der Platz,
wo eventuell nötige (De)Initialisierungen und stehen sollten.
if %DLLInit Laden...
MessageBox ... aus DllMain().,Meldung...,0
else Entladen...
MessageBox DLL wurde deinitialisiert.,Ciao,0
endif
proc IsPrime
Eine Prozedur, die nur innerhalb der DLL verwendet wird.
Gibt 1 zurück, wenn number& prim ist, sonst 0.
parameters number&
declare prime%
let prime% = 1
whileloop 2,(number& 2)
ifnot number& mod &loop
let prime% = 0
break
endif
endwhile
return prime%
endproc
dllproc CountPrimes,1
Zählt alle Primzahlen von 2 bis upto&.
parameters upto&
declare primes&
let primes& = 1 Die 2 zählt schonmal...
whileloop 3,upto&,2 sonst alle geraden Zahlen überspringen...
if IsPrime(&loop) <> 0
inc primes&
endif
endwhile
return primes&
endproc
so can The DLL then use (.inc becomes automatically of Profan2Cpp created): CompileMarkSeparation MfG
Sebastian
Related: survey DLLs with Profan2Cpp? [...] |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 03/11/09 ▲ |
|
|
|
|
Jac de Lad | How stehts with Controls and so, can The in Profan created and the DLL using and be inverse? gives it Einschränkungen? |
|
|
| 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 | 03/11/09 ▲ |
|
|
|
|
Sebastian König | Jac
How stehts with Controls and so, can The in Profan created and the DLL using and be inverse? gives it Einschränkungen?
*seufz* what about me Have me so much trouble with the write the Documentation given.. here means another statement: Profan2Cpp-Help
an more Einschräkung there unfortunately: inside the DLL should no command or functions, The Window or Fensterelemente produce, uses werden; the behaviour is otherwise unvorhersehbar. @SendMessage() and @PostMessage() functions however - and MessageBoxes stand available.
Ergänzend moreover is To say, that through API naturally everything allows is. The Einschränkung relating itself only on things How Create() and Control(), and with Create() too only on Fensterelemente.
generally would one but too sowiese sooner performance-censorial things in a C++-DLL auslagern, and there belong GUI-things with Windows of my experience to seldom moreover...
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 03/11/09 ▲ |
|
|
|
|
| Jup, this is a good demonstration. thanks.
well, then can I Yes some with my Programs time reshaping/auslagern.
mfg |
|
|
| |
|
|
|
Detlef Jagolski | I have me with Profan2Cpp for my Owner-Draw Menüs a Dll built with yet weitern functions The I always need. |
|
|
| XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11 | 03/11/09 ▲ |
|
|
|
|
Sebastian König | Detlef Jagolski
I have me with Profan2Cpp for my Owner-Draw Menüs a Dll built with yet weitern functions The I always need.
A beautiful example, the at the same time shows, that too Window-bezogene items possible are.
my Own testimony of supra (response and Jac) have I thereby again hither bedacht and must now say: its well not only with Things, for a high speed important is, meaningfully tappt im dunkeln in a DLL auszulagern. Perhaps would like one too simply a DLL to usage in several Projekten and/or to publication create.
The Zwischenstand the survey (if neither very repräsentativ) can me with the thoughts play, a Workshop to the Subject to create. I could me to that example present, a beginning of my SKControl.DLL in XProfan nachzubauen...
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 03/11/09 ▲ |
|
|
|
|
Sebastian König | Jac
yet ne stupid question: If I in XProfan what into interne Listboxliste filling, then can I in a DLL, The with Prf2CPP prepares watts not hereon grab or? and inverse sure neither? the would of/ one the Reasons on DLL-Creation To dispense, in the suitable drop anyway.
Einfache question - The response is something tricky without it probiert to have, would I from the memory say, that inside the DLL-Codes the following counts:
* stuff and Change the list functions * MoveListToStr$/Mem/aray() too * MoveListToHandle() not working with List- and ComboBoxes, with Edits but already
The Reasons this lying therein, that of Profan2Cpp-Applications one MultiThread-concept using, DLLs but not what about me for MoveListToHandle() none Thread-Test installed have.
the whole counts too for a couple further items. in the Einelfall: simply try and me ggf. circa Anpassung requests.
if you mean, that You in XProfan The list filling and then in the DLL so works want: the goes naturally not - with none DLL, because The white Yes nothing of XProfans internal list... EDIT: OK, you mean well very the - i was something To quick with the obigen response, but Perhaps is the nevertheless interestingly.
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 03/11/09 ▲ |
|
|
|
|
| Hmmm..., How becomes a Memory-Variable b# transfer on The DLL, where The size changes? should eien Dll go.
Übergabe wert&,b#,c# and Return z&. CompileMarkSeparation mfg. |
|
|
| |
|
|
|
Sebastian König | Peter Bierbachh
Hmmm..., How becomes a Memory-Variable b# transfer on The DLL, where The size changes?
The DLL-function must for each Memory-Variable know, How big she's. D.h. The sizes must as Parameter transfer go. example: CompileMarkSeparation If several reaches The same Size having, can itself naturally superfluous Parameter save...
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 03/12/09 ▲ |
|
|
|
|
| anything is correct not.
If I in the DLL first again new dimensionieren must....these Memory-Variables. it beisst itself what...
can't voices...or...
becomes probably for Programmablauf still zeitaufwendiger, if I in the DLL again whom zuweisungen with zero begin must.
mfg |
|
|
| |
|
|
|
Sebastian König | I have The Thread straight under the new names wiedergefunden...
Peter Bierbachh
anything is correct not. If I in the DLL first again new dimensionieren must....these Memory-Variables. it beisst itself what... can't voices...or... becomes probably for Programmablauf still zeitaufwendiger, if I in the DLL again whom zuweisungen with zero begin must. means there have You something wrong understood... it is not necessary, whom area in the DLL new To dimensionieren. It's all right only therefore, that You a exportierten procedure, The reaches as Parameter expects, communicating must, How big these in the aufrufenden code dimensioniert get.
this is completely analog to the work with API-functions How to that example ZeroMemory(). there commit one indeed a area (i.e. Zeiger) and the zugehörige Size...
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 03/12/09 ▲ |
|
|
|
|
| alas sooooo,....I had now wrong understood of example. would be indeed otherwise paradox.
mfg |
|
|
| |
|
|