This may or may not answer your question, but is more a piece of programming advice. Instead of using the code style you have, I suggest:
DCB dcb_ob = {sizeof(DCB)}; COMMTIMEOUTS ct_ob = {0};
dcb_ob...
...
ct_ob.WriteTotalTimeoutConstant = 1000;
which will properly initialize each of the structures to the value(s) you provide, with trailing 'zeroes'. This means for example that (following the initial size field in DCB), everything is zero and you don't need to set zero/false/NULL values, and your code still works in subsequent operating system versions when Microsoft changes the size of the structure.
For example, suppose that in Windows XP, Microsoft introduces a structure:
struct blorg {
int BlorgSize;
int BlorgData;
};
and you write code using it in XP using your style above. Then in Windows Vista they change the struct to:
struct blorg {
int BlorgSize;
int BlorgData;
void* pOtherBlorg;
};
and then in Windows 7, they change it again:
struct blorg {
int BlorgSize;
int BlorgData;
void* pOtherBlorg;
void* pOtherBlorgEx;
BOOL bImportantFlag;
};
When compiled in Vista (or later), my code suggestion works fine, but yours just broke (uninitialized pointer). Even if you fix for Vista, yours breaks again in 7.
[I refuse to acknowledge "8" (yuck) on principle.]