473,846 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to generate a EV_RING event in rs232 serial COM port? visual c++ 6.0

Hi
I'm working with visual C++ 6.0

I can detect when an EV_RING event is generated with:

BOOL WaitCommEvent(
HANDLE hFile, // handle to communications device
LPDWORD lpEvtMask, // pointer to variable to receive event
LPOVERLAPPED lpOverlapped, // pointer to overlapped structure
);

I want to SEND an EV_RING event, generate it.
Any idea as to how to do it?
I can send characters, but not this particular RING event.

Thank you!
Laura Lucas
Jul 22 '05 #1
4 3040
Laura Lucas wrote:
Hi
I'm working with visual C++ 6.0

I can detect when an EV_RING event is generated with:

BOOL WaitCommEvent(
HANDLE hFile, // handle to communications device
LPDWORD lpEvtMask, // pointer to variable to receive event
LPOVERLAPPED lpOverlapped, // pointer to overlapped structure
);

I want to SEND an EV_RING event, generate it.
Any idea as to how to do it?
I can send characters, but not this particular RING event.


Please post MS Windows programming questions to the newsgroup where
they are on topic: comp.os.ms-windows.program mer. Another choice is
the VC++ newsgroup: microsoft.publi c.vc.language (although yours is
not really a _language_ problem, is it?)

V
Jul 22 '05 #2
Victor Bazarov <v.********@com Acast.net> wrote in message news:<dMh9d.409 6> > I'm working with visual C++ 6.0

I can detect when an EV_RING event is generated with:

BOOL WaitCommEvent(
HANDLE hFile, // handle to communications device
LPDWORD lpEvtMask, // pointer to variable to receive event
LPOVERLAPPED lpOverlapped, // pointer to overlapped structure
);

I want to SEND an EV_RING event, generate it.
Any idea as to how to do it?
I can send characters, but not this particular RING event.


Please post MS Windows programming questions to the newsgroup where
they are on topic: comp.os.ms-windows.program mer. Another choice is
the VC++ newsgroup: microsoft.publi c.vc.language (although yours is
not really a _language_ problem, is it?)

Ok sorry, I will post my message to that groups too. So, in c++, any
function or method or anything to send something to a serial rs232 COM
port is inexistent? There isn't anything multiplatform? :S

thanks!
Laura Lucas
Jul 22 '05 #3
Laura Lucas wrote:
[...] So, in c++, any
function or method or anything to send something to a serial rs232 COM
port is inexistent? There isn't anything multiplatform? :S


Of course there isn't. Hardware is _always_ OS-specific.
Jul 22 '05 #4
* Laura Lucas:

Ok sorry, I will post my message to that groups too. So, in c++, any
function or method or anything to send something to a serial rs232 COM
port is inexistent? There isn't anything multiplatform? :S


The language (discussed here) and what you can use it for (discussed
in other groups) are different things. C++ is a general purpose
programming language and can be used for just about anything. We need
to limit the scope of discussion to avoid the "just about anything".

Your question is off-topic here.

See the FAQ and Shiva's welcome text.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 22 '05 #5

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

Similar topics

7
12760
by: Chris | last post by:
Here's the situation: I work at a scientific institution and I have a portable electronic device which is used to take measurements. The device produces a very small amount of numerical data, about 10 to 15 numbers per measurement. This operation is performed frequently and I would like to implement an automatic solution that moves this data across a windows network and into the fields of an Access database application. The device...
1
7832
by: Dan | last post by:
I wnat to see in browser an status from an device connected on rs232 port The java class for read from serial port is: //Serial.java import java.io.*; import java.util.*; import java.lang.*; import javax.comm.*;
4
2212
by: nchap99 | last post by:
hello, Does anybody know if Microsoft Dot Net supports the RS232 type of connection. As far as I know Visual basic 6 supports RS232 connection format. Thanks,
6
3153
by: Peter Hans | last post by:
Hi, I developed two applications to test a flush() method in my application, but I am having some problems when running it at high baud rates (115200) I connected two computers using a cross-talk cable and wanted to test if all data sent from application 1 was correctly received by application 2 (test the flush method). The first application is the receiver - basically it opens the serial port and loops infinitely. Inside the loop, it...
6
9139
by: Ken Breit | last post by:
I am using the RS232.vb class to talk to the serial port. The problem I am having is when I try to read if anything is on the comm port. I call the read method, with the number of bytes I am expecting to read. As long as I know the length of the command that I will be getting on the input of the port it works great. The problem is when I don't know how long the data I am receiving is. If I request more bytes than I know I am getting...
3
2336
by: Przemo | last post by:
Hi, Do you know some good RS232C class? There is one in VB.NET 101 Examples, but I think it is poor. 1. I can't for e.g. read into my application all data received. I must tell how many bytes I would like to read. If I specify too many exception occures, if too less there are still some data in buffer.
2
5165
by: Wouter van Teijlingen | last post by:
Dear Readers, I was reading about how to control the COM and LPT port using VB .NET. I've found a lot of information, and it was very useful to me. I found an example program on the site of Microsoft. You can find it overhere: http://www.microsoft.com/downloads/details.aspx?FamilyID=075318ca-e4f1-4846-912c-b4ed37a1578b&DisplayLang=en I did found a lot about the RS232 port on the Internet, but i haven't found the same amount of...
13
6887
by: jay.dow | last post by:
I want to write to the pins of an RS232 without using the serial protocol. The use would be every pin could act to complete a circuit in customized hardware. I could use python to communicate serially to a BASIC stamp or a Javelin stamp and then use the stamp to set however many pins as 0's or 1's but should it be that hard to do with python. I've looked through how python does serial with the "serial" module but it just uses Java's...
4
5508
by: Dave Harry | last post by:
I found the RS232 class from MS's 101 VB samples. Writing to the port works fine. (I've got hyperterminal on the other comm port and a crossover cable between COM1 and COM2) The port is opened with: Public switchcom As New Rs232 switchcom.Open(2, 57600, 8, Rs232.DataParity.Parity_None, Rs232.DataStopBit.StopBit_1, 512)
0
9727
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10978
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10330
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9477
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7879
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7050
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5716
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5907
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4113
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.