ASM proc to C++ declaration
I have a really small .obj file (thanks, CyberBen) that has the compiled MASM code for some blitting routines. It has this proc:
DDSysBlit proc destsurface :DWORD
sourcesurface : DWORD
DestX :DWORD
DestY :DWORD
SourceRect :RECT
DestPitch :DWORD
SourcePitch :DWORD
bpp :WORD
I changed this into this prototype:
void DDSysBlit(DWORD destsurface, DWORD sourcesurface, DWORD DestX, DWORD DestY, RECT SourceRect, DWORD DestPitch, DWORD SourcePitch, WORD bpp);
This is correct, right? I need this for some .h files...
~BenDilts( void );
I haven''t done many asm declarations so I''m not sure. Did you take into acount packing and calling convention? I think cdecl puts the parameters on the stack in reverse order, but stdcall does it the other way around.
For a good time hit Alt-F4! Go ahead try it, all the cool people are doing it.
Wouldn''t it put it in reverse order for me if I put it in as an extern "C" function? I thought that was what that was for. I tried it with and without, but what the heck I''ll try reversing all the params.
Surely someone has done this before?
~BenDilts( void );
President, BDAA.
Surely someone has done this before?
~BenDilts( void );
President, BDAA.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement