Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Interrupts in VB (API)

Reply
Thread Tools

Interrupts in VB (API)

 
 
D.Sn
Guest
Posts: n/a
 
      01-12-2004
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.


 
Reply With Quote
 
 
 
 
Mark Alexander Bertenshaw
Guest
Posts: n/a
 
      01-12-2004
"D.Sn" <> wrote in message
news:...
> 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

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

This gives you a maximum of four integers on the stack that you can use in
your machine code routine. Naturally, you can stick pointers to UDTs on the
stack, if necessary.

--
Mark Bertenshaw
Kingston upon Thames
UK



 
Reply With Quote
 
 
 
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      01-12-2004
Please post only to relevant NG's.

Willy.

"D.Sn" <> wrote in message
news:...
> 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.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NAT table entries generate Interrupts? anybody43@hotmail.com Cisco 0 10-31-2005 11:06 AM
Microblaze XPS Gpio not working with interrupts guru10 VHDL 1 08-18-2005 07:25 PM
Keyboard interrupts Victor Bazarov C++ 8 03-29-2005 06:21 PM
MicroBlaze User Peripheral with 2 interrupts Ciaran VHDL 12 02-27-2004 01:37 PM
Firewire capture problem and changing interrupts Fred Computer Support 7 10-30-2003 04:27 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57