Solved

how to use the :SetCommState, CommConfigDialog?

Posted on 1997-12-04
4
540 Views
Last Modified: 2013-11-20
I can't compile when i use the SetCommState. Where to put it and how to write Char to COM3?
0
Comment
Question by:hercules120197
  • 3
4 Comments
 

Author Comment

by:hercules120197
ID: 1311575
I need a sample in MSDEV4.x and more.
0
 
LVL 1

Accepted Solution

by:
IgorGrebnev earned 20 total points
ID: 1311576
Go to the stdafx.h and delete following #define
#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers

This VC_EXTRALEAN exclude declaration for SetCommState. Eliminate this define.
You can write character to COM with WriteFile. You careat the handle of the port with CreateFile function and supply the name of the file "COM3"
Yours, Igor
Yors Igor
0
 

Author Comment

by:hercules120197
ID: 1311577
Where can i use the comment SetCommState,CommConfigDialog.The CommConfigDialog needs a HWND and i m not understanding from which function or class.
0
 

Author Comment

by:hercules120197
ID: 1311578
Where can i use the comment SetCommState,CommConfigDialog.The CommConfigDialog needs a HWND and i m not understanding from which function or class.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Turn a spreadsheet into a vba executable. 2 79
either24  challenge 19 90
mapBully challenge 6 114
x-bar in Google Sheets 2 26
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now