473,395 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Interrupts in VB (API)

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.
Jul 21 '05 #1
2 1379
"D.Sn" <no*@moreply.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl...
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

Jul 21 '05 #2
Please post only to relevant NG's.

Willy.

"D.Sn" <no*@moreply.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl...
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.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: engsol | last post by:
Has anyone done a script that will rspond to the serial com port(s) receive buffer interrupt, as opposed to polling and timeouts? Win2000 is the main interest right now. Thanks Norm B
6
by: engsol | last post by:
I didn't fully think through my application before posting my question. Async com port routines to handle com port interrups only work well if one has access to the low level operating system. In...
6
by: Larry Woods | last post by:
I have multiple Calendar controls on my page and I want the user to select various dates, then press a Submit button. Is there a way to disable the interrupts from the Calendar controls? TIA, ...
8
by: Cyber | last post by:
Hello ! I want to catch any event on a PC by the interrupts (C++ under Linux). My first step is to catch everything from the keyboard. I have: ...
9
by: Sweety | last post by:
hello, Is there any code using interrupts . bye
2
by: D.Sn | last post by:
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...
0
by: AlanL | last post by:
I am using MSCOMM for serial control and have an issue with some computers. When the handshake lines (CD, DSR, etc )are not connected on the computer I they generate OnComm events. I can ignore the...
4
by: jmarcrum | last post by:
I have to modify this assembly code in order to make it use interrupts. Right now, when I push button 1 on the microprocessor the count increments once (the LED's count in binary, using only 3 LED's...
1
by: JKaur | last post by:
hello frnds, please tell me the difference between DOS interrupts and interrupts invoked using int86() function in C (are those 8086 intrupts?). In some text i have read these are different, but...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.