Very new to BMax: I need help here with DLL's
BlitzMax Forums/BlitzMax Programming/Very new to BMax: I need help here with DLL's
| ||
hi! i need some help here using the kernel32 dll! this is a bb program it contains a library in which you can easily set up pixels. i tried to port it to bmax, but first i needed to import the kernel DLL, but i just didn't figure out how :( can somebody help me here, please? thanks a lot :) |
| ||
Something likeExtern "Win32" Function apiRtlMoveMemory(Destination:Byte Ptr,Source:Byte Ptr,Length)="RtlMoveMemory@12" EndExtern or Extern "Win32" Function RtlMoveMemory(Destination:Byte Ptr,Source:Byte Ptr,Length) EndExtern |
| ||
and what exactly do i do with this? you know i'm a pro in BB and a beginner in bmax |
| ||
BlitzMax has a MemCopy command which can be used instead. It takes two pointers and a length, just as yours do. EDIT: Not that there's anything wrong with Azathoth's response. I just cross-posted. |
| ||
wow quick answer :) so, how do i USE this command instead of that one? |
| ||
It defines the function RtlMoveMemory, you put it at the top of your program. Edit: If you're uncertain whether the memory blocks over lap you could use MemMove, instead of MemCopy. |
| ||
Extern "Win32" Function RtlMoveMemory(Destination:Byte Ptr,Source:Byte Ptr,Length) EndExtern so i only put in this piece of code, and i can use RtlMoveMemory as default? and how do i access the BackBuffer ? |
| ||
so i only put in this piece of code, and i can use RtlMoveMemory as default? Yep. |
| ||
and how do i access the BackBuffer ? i need the pointer of the backbuffer |
| ||
well thats just whats missing. i need the pointer to the backbuffer. in BB you usualy get this with BackBuffer() |
| ||
There's not the same easy way in Bmax as far as I know. You can try the following : graphics800,600 Local renderSurf:IDirectDrawSurface7 D3D7GraphicsDriver().Direct3DDevice7().GetRenderTarget Varptr renderSurf to get one from DX. |