English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   support.WinUAE (http://eab.abime.net/forumdisplay.php?f=5)
-   -   WinUAE and Windows dll... (http://eab.abime.net/showthread.php?t=64724)

Gilloo 18 June 2012 20:15

WinUAE and Windows dll...
 
Hi all,
I try to use the vector $f0ffc0 to interface winuae to a Windows dll (TM) (R) (c).
It works fine with unsigned long values, but how evil to share buffers ?.
Address space are completly different!!
Any idea :confused? please :bowdown


section text,code
; input A0 dllname
; output D0 dllhandle
DLLOpen
moveq #100,D0
jsr $00f0ffc0
rts
; input D1 dllhandle
DLLClose
moveq #103,D0
jsr $00f0ffc0
rts
; input D1 dllhandle
; A0 function or variable name
; output D0 function or variable address
DLLGetFuncAddr
moveq #101,D0
jsr $00f0ffc0
rts
; input A0 function address
; output D0 return
DLLExec
moveq #102,D0
jsr $00f0ffc0
rts
end

Gilloo 19 June 2012 16:46

I've found a tip!

; input void
; output D0 return memory offset
DLLGetMemoryOffset
moveq #105,D0
jsr $00f0ffc0
rts

This routine computes the offset between address 0 and the real memory offset in Windows world.
All buffers must be allocated in CHIP, for example toto = AllocMem(512, MEMF_CHIP), then DLLGetMemoryOffset()+toto matches exactly the buffer toto in the DLL.
So I can build strange dll for winuae now! :)


All times are GMT +2. The time now is 00:06.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.

Page generated in 0.06818 seconds with 11 queries