|
-
Apr 11th, 2007, 05:08 AM
#1
Thread Starter
New Member
List of Serial.sys commands
Hi, i need a list of commands in the serial.sys.
I am hoping to find a way to react on a serial input.
Something like OnCom(), but entirelie build from standard system files.
As a followup, but i could start a new thread on that, i will need multitasking and windowsmessage WM_ infos.
to sum all up:
1) serial.sys reference / where to get
2) multitasking / how to do
3) Windows messages /where to get and how to do
Thanks a lot, Johannes
-
Apr 12th, 2007, 05:32 AM
#2
Thread Starter
New Member
Re: List of Serial.sys commands
My research shows that 1) and 3) are currently not that important for me.
However 2) looks very interesting.
I wrote some code:
Code:
Option Explicit
'**********************************************************************************
'* A Button Doomsdaydevice and a Textbox Multibox are needet in the Form Tabelle1 *
'**********************************************************************************
'**********************************************************************************
'* Kernel32 Declares *
'**********************************************************************************
Public Declare Function CloseHandle Lib "kernel32" _
(ByVal lpHandle As Long) _
As Long
Public Declare Function CreateThread Lib "kernel32" _
(ByVal lpThreadAttributes As Any, _
ByVal dwStackSize As Long, _
ByVal lpStartAddress As Long, _
ByVal lParameter As Long, _
ByVal dwCreationFlags As Long, _
ByVal lpThreadID As Long) _
As Long
'**********************************************************************************
'* Functions and Subs *
'**********************************************************************************
Private Sub Doomsdaydevice_Click()
Dim threadhandle As Long
Dim i As Long
MultiBox.Text = ""
For i = 1 To Round(((Rnd * 10) + 1), 0)
threadhandle = CreateThread(ByVal 0&, 2000, AddressOf thiswillbethepowerthread, ByVal 0&, ByVal 0, ByVal 0&)
CloseHandle (threadhandle)
Next i
End Sub
Sub thiswillbethepowerthread() 'This thread should be the multiple one
Dim i As Integer
For i = 1 To Round(((Rnd * 10) + 1), 0)
Tabelle1.MultiBox.Text = Tabelle1.MultiBox.Text + Str(i) 'Without this Line, all is well
Next i
End Sub
Now, this Line
Code:
Tabelle1.MultiBox.Text = Tabelle1.MultiBox.Text + Str(i)
Leads to some kind of crash. Error 7 Not enough memory, and the Debugger crashes without error.
Please give me some clue, thanks.
-
Apr 13th, 2007, 07:32 AM
#3
Re: List of Serial.sys commands
CreateThread has never worked properly in VB6 and is well known for causing IDE crashes.
If you need true multithreading capabilities your best bet is to move to VB.NET
-
Apr 16th, 2007, 02:05 AM
#4
Thread Starter
New Member
Re: List of Serial.sys commands
I would love to, but my Boss says we habe to do this in VBA.
-
Apr 18th, 2007, 05:20 PM
#5
Re: List of Serial.sys commands
If your boss told you that you had to make a fire, but the fuel you had to use was water, what would you do?
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Apr 19th, 2007, 03:33 AM
#6
Thread Starter
New Member
Re: List of Serial.sys commands
hey, he pays me.
So i would so the following:
I would split um H20, using an anode and a cathode.
Then i would save those gases and recombine them to water.
That schould make an explosion. -> as close as we get 
Never the less, you are right. I'll talk it over wiith him.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|