Click here to Skip to main content
15,896,502 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Doesn't open heading file VC ++ Pin
PeLeg8923-Nov-11 2:56
PeLeg8923-Nov-11 2:56 
GeneralRe: Doesn't open heading file VC ++ Pin
Albert Holguin23-Nov-11 3:32
professionalAlbert Holguin23-Nov-11 3:32 
QuestionHow to access physical memory location from IP address Pin
fingerss522-Nov-11 21:11
fingerss522-Nov-11 21:11 
AnswerRe: How to access physical memory location from IP address Pin
CPallini22-Nov-11 21:38
mveCPallini22-Nov-11 21:38 
AnswerRe: How to access physical memory location from IP address Pin
Erudite_Eric22-Nov-11 23:50
Erudite_Eric22-Nov-11 23:50 
AnswerRe: How to access physical memory location from IP address Pin
Software_Developer23-Nov-11 0:31
Software_Developer23-Nov-11 0:31 
GeneralRe: How to access physical memory location from IP address Pin
fingerss523-Nov-11 1:45
fingerss523-Nov-11 1:45 
QuestionSetDefaultCommConfig does not control / save DTR / RTS parameters - why ? Pin
Vaclav_22-Nov-11 9:49
Vaclav_22-Nov-11 9:49 
I am having hard time trying to understand why SetDefaultCommConfig will not set DTR / RTS parameters to 0. I can set the DCB to DTR = DTR_CONTROL_DISABLE (0) but when I read it back using GetDefaultCommConfig it goes back to 1.
I can control baud rate as expected, no problems here.
So what is so special about DTR or RTS that is cannot be controlled using Set/GetDefaultCommConfig?
Has data flow control involved here? In my system it is set to None.
The MSDN is rather cryptic saying that “some parameters cannot be changed” -using these APIs.

Here is my test code snippet:
COMMCONFIG config;
CString sPort;
int nPort = 2;
sPort.Format(_T("COM%d"), nPort);
DWORD dwSize = sizeof(COMMCONFIG);
if (!GetDefaultCommConfig(sPort, &config, &dwSize))
{
TRACE(_T("Failed in call to GetDefaultCommConfig\n"));

}

config.dcb.fDtrControl = DTR_CONTROL_DISABLE;// DTR_CONTROL_ENABLE;
config.dcb.fRtsControl = RTS_CONTROL_DISABLE;
config.dcb.BaudRate = 123456;
config.dcb.fOutxDsrFlow = false;

All parmaters are correct in watch.

if (!SetDefaultCommConfig(sPort, &config, dwSize))
{
TRACE(_T("Failed in call to GetDefaultCommConfig\n"));

}
if (!GetDefaultCommConfig(sPort, &config, &dwSize))
{
TRACE(_T("Failed in call to GetDefaultCommConfig\n"));

}

As always , thanks for your help.
AnswerRe: SetDefaultCommConfig does not control / save DTR / RTS parameters - why ? Pin
CPallini22-Nov-11 21:42
mveCPallini22-Nov-11 21:42 
GeneralRe: SetDefaultCommConfig does not control / save DTR / RTS parameters - why ? Pin
Vaclav_23-Nov-11 3:49
Vaclav_23-Nov-11 3:49 
Questionstring operation Pin
robin70022-Nov-11 9:40
robin70022-Nov-11 9:40 
AnswerRe: string operation Pin
Richard MacCutchan22-Nov-11 9:59
mveRichard MacCutchan22-Nov-11 9:59 
GeneralRe: string operation Pin
robin70022-Nov-11 10:13
robin70022-Nov-11 10:13 
GeneralRe: string operation Pin
Richard MacCutchan22-Nov-11 10:22
mveRichard MacCutchan22-Nov-11 10:22 
GeneralRe: string operation Pin
CPallini22-Nov-11 21:45
mveCPallini22-Nov-11 21:45 
GeneralRe: Here is simple loop to collect all the names Pin
Software_Developer22-Nov-11 22:09
Software_Developer22-Nov-11 22:09 
QuestionHow to grant access rights Pin
William Engberts22-Nov-11 2:07
William Engberts22-Nov-11 2:07 
AnswerRe: How to grant access rights Pin
Chris Meech22-Nov-11 3:02
Chris Meech22-Nov-11 3:02 
GeneralRe: How to grant access rights Pin
William Engberts22-Nov-11 3:09
William Engberts22-Nov-11 3:09 
GeneralRe: How to grant access rights Pin
Chris Meech22-Nov-11 3:13
Chris Meech22-Nov-11 3:13 
QuestionHow to create 2 tree view in one window Pin
akash chourasia22-Nov-11 1:15
akash chourasia22-Nov-11 1:15 
AnswerRe: How to create 2 tree view in one window Pin
_AnsHUMAN_ 22-Nov-11 1:40
_AnsHUMAN_ 22-Nov-11 1:40 
GeneralRe: How to create 2 tree view in one window Pin
akash chourasia22-Nov-11 17:54
akash chourasia22-Nov-11 17:54 
AnswerRe: How to create 2 tree view in one window Pin
Roger Allen22-Nov-11 2:10
Roger Allen22-Nov-11 2:10 
QuestionClose documents problem Pin
_Flaviu22-Nov-11 0:30
_Flaviu22-Nov-11 0:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.