Interrupts in VB (API)

D

D.Sn

Hi all

I need to implement interrupt functioality like Int86() in C, In VB

I have an idea. What about precompiled assembly language use using

"CallWindowProc" .

I am not clear what situating this "CallWindowProc" is used.Thougth the help

for the function is avilable in MSDN i want to what is input and where the

output comes?how to acess the output registers/values?,Situating where this

function can be used?.

So dynamically create optcode for the interrupt function and use

CallWindowProc get return value?

What tools are required to create assembly (note: i am not a master in

assembly language)?. How to get the optcode?

Pl. explain with example? It would be great halp.

Regards,

D.Sn.
 
M

Mark Alexander Bertenshaw

D.Sn said:
Hi all

I need to implement interrupt functioality like Int86() in C, In VB
I have an idea. What about precompiled assembly language use using
"CallWindowProc" .
I am not clear what situating this "CallWindowProc" is used.Thougth the help
for the function is avilable in MSDN i want to what is input and where the
output comes?how to acess the output registers/values?,Situating where this
function can be used?.

So dynamically create optcode for the interrupt function and use
CallWindowProc get return value?
What tools are required to create assembly (note: i am not a master in
assembly language)?. How to get the optcode?
Pl. explain with example? It would be great halp.

"D.Sn" -

It kind of worries me that you are asking what tools are required for
assembly, and how to use it. You may be better off writing a C DLL, and
exporting functions which can be called from VB. You also might be way off
track - are you sure that what you want to do requires calling interrupts?
There may be another way.

But all I know, you might be a genius who thrives on "challenges". Get a
book on assembly code, and download "Microsoft Macro Assembler", which I
believe is still free on the microsoft download site. This should get you
started. Allow a month or two to get used to it.

As for CallWindowProc() - that function is for use with subclassing windows.
so it isn't ideal. However, you can use it to indirectly call a machine
code routine embedded into your VB code as a Byte array.

----------------

Sub MachineCode(ByVal lParam1 As Long, ByVal lParam2 As Long, ByVal lParam3
As Long, ByVal lParam4 As Long)
Dim abytCode(1 To 64) As Byte

' Load the machine code instructions into this array.
abytCode(1) = 10
abytCode(2) = 1
...
abytCode(n-1) = <ret> ' Ensure this is the code for ret.
abytCode(n) = 3 ' Just in case.

CallWindowProc VarPtr(abytCode(1)), lParam1, lParam2, ByVal lParam3,
ByVal lParam4

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top