I have not done much in the way of assembly with Win32 and I am
hoping to give myself more time in this area. One of the ways
to quickly learn is to cut and paste some existing code. I am
converting a small TASM win32 example to compile in PBDLL60. I want
to preserve as much ASM code as possible. My question is if PB allows
me to use the ASM 'call' instruction to make an API call.
For instance,
I could convert this back to an API call, but I want to preserve as
much as I can. What I think I need is the address of the function
GetSystemMetrics to use the asm call instruction. So perhaps CODEPTR()
would be the answer?
Any tips, suggestions, comments are much appreciated.
Thanks!
Regards, Jules
hoping to give myself more time in this area. One of the ways
to quickly learn is to cut and paste some existing code. I am
converting a small TASM win32 example to compile in PBDLL60. I want
to preserve as much ASM code as possible. My question is if PB allows
me to use the ASM 'call' instruction to make an API call.
For instance,
Code:
'*GET some needed SystemMetrics ! push %SM_CXSIZEFRAME ! call GetSystemMetrics ! mov [SM_CX_SizeFrame], eax ! push %SM_CYSIZEFRAME ! call GetSystemMetrics
much as I can. What I think I need is the address of the function
GetSystemMetrics to use the asm call instruction. So perhaps CODEPTR()
would be the answer?
Code:
Local lpAnyApiCall As Dword lpAnyApiCall = CODEPTR(GetSystemMetrics) ! push %SM_CXSIZEFRAME ! call GetSystemMetrics ! mov [SM_CX_SizeFrame], eax ! push %SM_CYSIZEFRAME ! call lpAnyApiCall
Thanks!
Regards, Jules
Comment