|  |  | 
|  | 
|  | 
|  | | quelle Register doit ici gesichert volonté. ou bien wird cela de Xpia4 bzw XProfan übernommen cela richtige Sichern de Registern?
 
 mfg
 KompilierenMarqueSéparation
  $MAKE CLE
 $H Windows.ph
Declare hwin&,x&,y&,f&,hdcwin&
Window 20,20-200,200
hWin& = Create(Window, %hWnd, Test, 250, 20, 650,500)
hDCWin& = ~GetWindowDC(hWin&)
If 0
    AsmStart pset
        Parameters hdcwin&,x&,y&,f&
        mov ecx,para1
        mov eax,para2
        mov ebx,para3
        mov edi,para4
        invoke SetPixel,ecx,eax,ebx,edi
    AsmEnd
EndIf
whileloop 0,100,1
    x&=&loop
    y&=&loop
    f&=$ff0000
    Call(GetXpiaProcAddress(XpiaModule&,pset),hdcwin&,x&,y&,f&)
endwhile
WaitInput
Fin
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  Frank
 Abbing
 | | Pratiquement chacun API modifié qui Register. si du qui données pour qui API wieder benutzen veux, musst du vous auparavant sur den Stack pushen et später wieder runternehmen. ou bien Variablen verwenden. quelle Register une API benutzt, ist toujours verschieden. tu peux aussi nie entier sûrement son, dass un Register pas modifié wird. cela peux sich chez prochain Betriebssystem déjà geändert avons.
 cela ici allez incidemment aussi:
 KompilierenMarqueSéparation
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  | | Jup,merci. 
 quoi pouvoir qui Profan2Cpp-Solution?
 
 mfg
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  Sebastian
 König
 | | 2peter Bierbach, Beitrag=52367, Zeitpunkt=15.05.2009 
 quoi pouvoir qui Profan2Cpp-Solution?
 
 Frank hat mir vorhin erklärt, quoi sich chez XPIA geändert hat. je werde ensuite bientôt mon Plug-dans daran anpassen. peux mais quelque chose dauern, là je zur Zeit très avec anderen Dingen beschäftigt suis...
 
 MfG
 
 Sebastian
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  | | Jup, alles bien sûr. 
 qui erstellten Dll de Xpia4 courir avec dem Profan2Cpp wunderbar.
 
 Habe maintenant la fois 2 Exe erstellt avec XProfan.
 Einmal avec Asmstart/Asmend et einmal avec qui dessus erstellten Dll.
 
 avec Asmstart/Asmend 10200 Zeiteinheiten et cela gleiche avec qui Dll 4550 Zeiteinheiten.
 qui Profan2Cpp fonctionne zur Zeit seulement avec qui Xpia4-Dll et braucht 4100 Zeiteinheiten.
 
 avec Dll :
 KompilierenMarqueSéparation
  $H Windows.ph
DEF createpen(3) ! asm_grafik1.dll,createpen
DEF lineto(3) ! asm_grafik1.dll,lineto
DEF movetoex(3) ! asm_grafik1.dll,movetoex
DEF pset(4) ! asm_grafik1.dll,pset
Declare hwin&,x&,y&,f&,hdcwin&,pstyle&,pwidth&,pcolor&,mypen&,test%
Window 20,20-200,200
hWin& = Create(Window, %hWnd, Test, 250, 20, 650,500)
hDCWin& = ~GetWindowDC(hWin&)
pstyle&=3
pwidth&=0
pcolor&=$ff0000
mypen&=createpen(pstyle&,pwidth&,pcolor&)
~SelectObject( hdcwin&, mypen& )
test%=&GetTickCount
whileloop 1,10000,1
    x&=200
    y&=200
    movetoex(hdcwin&,x&,y&)
    x&=400
    y&=40
    lineto(hdcwin&,x&,y&)
endwhile
Print Str$(Int(&GetTickCount-test%))
WaitInput
Fin
sans Dll:
 KompilierenMarqueSéparation
  $MAKE CLEI
 $H Windows.ph
Déclarer hwin&,x&,y&,f&,hdcwin&,pstyle&,pwidth&,pcolor&,mypen&,test%
Fenêtre 20,20-200,200
hWin& = Créer(Fenêtre, %hWnd, Test, 250, 20, 650,500)
hDCWin& = ~GetWindowDC(hWin&)
Si 0
    AsmStart createpen
        Paramètres pstyle&,pwidth&,pcolor&
        invoke CreatePen,para1,para2,para3
    AsmEnd(mypen&)
    AsmStart movetoex
        Paramètres hdcwin&,x&,y&
        invoke MoveToEx,para1,para2,para3,0
    AsmEnd
    AsmStart pset
        Paramètres hdcwin&,x&,y&,f&
        invoke SetPixel,para1,para2,para3,para4
    AsmEnd
    AsmStart lineto
        Paramètres hdcwin&,x&,y&
        invoke LineTo,para1,para2,para3
    AsmEnd
EndIf
pstyle&=3
pwidth&=0
pcolor&=$ff0000
mypen&=Call(GetXpiaProcAddress(XpiaModule&,createpen),pstyle&,pwidth&,pcolor&)
~SelectObject( hdcwin&, mypen& )
test%=&GetTickCount
whileloop 1,10000,1
    x&=200
    y&=200
    Call(GetXpiaProcAddress(XpiaModule&,movetoex),hdcwin&,x&,y&)
    x&=400
    y&=40
    Call(GetXpiaProcAddress(XpiaModule&,lineto),hdcwin&,x&,y&)
endwhile
Imprimer Str$(Int(&GetTickCount-test%))
WaitInput
Fin
mfg
 | 
 
  | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  Sebastian
 König
 | | Ist cela maintenant seulement un Beispiel ou bien pourquoi kapselt du cet einfachen API-Aufrufe dans DLL-Funktionen? je mon, un simple 
 DEF SetPixel(3) !GDI32,SetPixel
 usw.
 
 mais est sûrement qui effizienteste Solution...
 
 MfG
 
 Sebastian
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  | | mais est sûrement qui effizienteste Solution... 
 Wird vom Tool, welches chez Xpia4 avec dabei ist, so angefertigt pour den Aufruf.
 
 Ist cela maintenant seulement un Beispiel ou bien pourquoi kapselt du cet einfachen API-Aufrufe dans DLL-Funktionen?
 
 qui Routinen wurden la fois avec invoke sur Xpia4 aufgerufen. Ist un Funktionstest.
 
 mfg
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  Frank
 Abbing
 | | 
 mais est sûrement qui effizienteste Solution... 
 qui effizienteste Solution ist wohl, aussi qui Boucle dans ASM trop programmieren.
  | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  | | qui effizienteste Solution ist wohl, aussi qui Boucle dans ASM trop programmieren. 
 qui Scheife selber ist avec Profan2Cpp déjà un Blitz, wohin es oui maintenant wunderbar sur dem Aufruf de Xpia4 fonctionne.
 
 je voulais seulement la fois cela wesentliche Testen.
 
 mfg
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  Sebastian
 König
 | | 2peter Bierbach, Beitrag=52377, Zeitpunkt=16.05.2009 
 qui effizienteste Solution ist wohl, aussi qui Boucle dans ASM trop programmieren.
 qui Scheife selber ist avec Profan2Cpp déjà un Blitz, wohin es oui maintenant wunderbar sur dem Aufruf de Xpia4 fonctionne.
 
 je voulais seulement la fois cela wesentliche Testen.
 
 Mir ging es maintenant seulement tout autor, dass on simple API-Funktionen aussi direct avec DEF bzw. Extérieures () verwenden peux - une Kapselung dans une ASM-Block bringt seulement zusätzlichen Overhead avec sich...
 
 MfG
 
 Sebastian
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 |