Die Muster möchte ich dann nehmen für eigene dll.
Danke.
gruss
Code: Alles auswählen
DECLARE FUNCTION myLibChange LIB "ptr_dll" ALIAS "myLibChange" (ByVal c AS UByte PTR) AS integer
Function myLibChange (ByVal c AS UByte PTR) AS Integer Export
c[0]=234
myLibChange=c[0]
END FUNCTION
DECLARE FUNCTION bitmapzeiger LIB "bitmap_dll" ALIAS "bitmapzeiger" (ByVal c AS Integer PTR) AS integer
Function bitmapzeiger (ByVal c AS Integer PTR) AS Integer Export
Dim z As Integer
For z=0 To 128*128
*c=&h00ff00
c=c+1
Next
End FUNCTION
DECLARE FUNCTION myLibAdd LIB "test_asm_dll" ALIAS "myLibAdd" (BYREF a AS INTEGER, _
ByRef b AS INTEGER) AS INTEGER
DECLARE FUNCTION myLibChange LIB "test_asm_dll" ALIAS "myLibChange" (ByVal c AS INTEGER PTR) AS INTEGER
FUNCTION myLibAdd (BYREF a AS INTEGER, BYREF b AS INTEGER) AS INTEGER EXPORT
ASM
mov esi, [a]
mov eax, [esi]
mov esi, [b]
mov ebx, [esi]
ADD eax, ebx
mov [FUNCTION], eax
END ASM
END Function
FUNCTION myLibChange (ByVal c AS INTEGER PTR) AS INTEGER EXPORT
ASM
mov esi, [c]
mov eax, [esi]
ADD eax, 11
mov [esi], eax
mov [FUNCTION], eax
END ASM
END FUNCTION
