|
Look up sockets/Winsock and RFC854[^] for good places to start.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I've seen what looks to be an excellent article at
http://www.codeproject.com/system/serial.asp
and I shall look at the source code, but what I want to know is if anyone has done any work with RS232 in just simple data reads from scientific equipment, e.g a digital electrometer. If someone has any examples or can point me to some, that would be great. Not even sure I need it to be that clever, it might just be a case of button driven "read data item X" from a dialog, i.e. wouldn't need to be constantly reading/updating.
|
|
|
|
|
Read this[^] article to get started.
I've done quite a few serial communication applications. :->
My approach is similar to the one mentioned in the article above, but I use one thread for writing and one thread for reading with two queues for data to send and data received.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Iam doing an application in VC++..
I want to know how the OS detects the memory drive inserted and loads the driver..
Can any one help me out for this..This is needed for my application...
Sample codes are more helpful..
Thanks in advance..
Regards
vijay
|
|
|
|
|
I beleive that the WM_DEVICECHANGE message is sent when a removable drive is inserted or removed.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
This is cool .
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
I want to know by seeing what, the particular driver is loaded..
Like every USB device have VID & PID, will it check those or anything else..
In my appliaction i want to detect only the pendrives..
So by knowing how the OS detects , i thoought that it will be help full to me..
Can u help in this aspect..
Thanks in advance
Regards
vijay
|
|
|
|
|
I am calling GetColumnInfo() function to get column (datatype - Text) information from the opened rowset. But ColumnSize should be less than 255 but i am getting values like 1162690894.
What may be the problem?
|
|
|
|
|
Can you post relevent code ?
|
|
|
|
|
DBORDINAL* pulColumns;
DBCOLUMNINFO** ppColumnInfo;
LPOLESTR* ppStrings;
HRESULT h = SomeTable.GetColumnInfo(&pulColumns, &ppColumnInfo, &ppStrings);
SomeTable is of CTable.
ppColumnInfo[index].ulColumnSize returns 1162690894
It should be less than or equal to 255.
|
|
|
|
|
Ordinal wrote: DBORDINAL* pulColumns;
DBCOLUMNINFO** ppColumnInfo;
LPOLESTR* ppStrings;
HRESULT h = SomeTable.GetColumnInfo(&pulColumns, &ppColumnInfo, &ppStrings);
How this code is compiling ?
Shouldn't this be like this ?
UINT pulColumns;
DBCOLUMNINFO* ppColumnInfo = NULL;
LPOLESTR ppStrings = NULL;
HRESULT h = SomeTable.GetColumnInfo(&pulColumns, &ppColumnInfo, &ppStrings);
|
|
|
|
|
I am sorry. U r right.
Anyways what may be the problem?
|
|
|
|
|
From your original post
HRESULT h = SomeTable.GetColumnInfo(&pulColumns, &ppColumnInfo, &ppStrings);
SomeTable is of CTable.
ppColumnInfo[index].ulColumnSize returns 1162690894
Are you sure index value is less than no. of columns returned ?
You should have used this loop,
for (ULONG iCol=0; iCol < cCol; iCol++)
{
|
|
|
|
|
Hi all,
How would one go about achiving the following:
Lets say you use printf and you want to display a message with a counter, but the message must not repeat itself but the counter must. The same question for achiving this in a messagebox.
It it possible?
Thanx agian
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
sorry, i don't really understand. can you provide a bit more detailed infos on your need ?
|
|
|
|
|
Sure,
Something like:
int x=0;
while (x<10)
{
printf("Value of x: %d",x);
with only x changing, the message must be static
(only displaying once and x changing)
x++;
}
Makes sense ?
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
you mean, all the text remains on the same line ?
use the escapment character '\b' to remove the last character (and then to overwrite it)
|
|
|
|
|
Thanx toxcct never heard of the escapment character '\b' before. But now I do ..
Thanx again.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: ...never heard of the escapment character '\b' before.
Probably because it's called a backspace.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
LMAO ...
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: use printf and you want to display a message with a counter
I guess you want to do something like this:
<br />
int i, j, charCount;<br />
<br />
for(int i=0; i<100; ++i)<br />
{<br />
charCount = printf("Progress: %d %%...", i);<br />
<br />
for(j=0; j<charCount; ++j)<br />
printf("\b");<br />
<br />
for(j=0; j<charCount; ++j)<br />
printf(" ");<br />
<br />
for(j=0; j<charCount; ++j)<br />
printf("\b");<br />
<br />
}<br />
Programm3r wrote: The same question for achiving this in a messagebox.
You will have to create your own Dialog box for that. The common MessageBox wont do.
"Do first things first, and second things not at all."
— Peter Drucker.
|
|
|
|
|
YES, thanx alot ... exactly what I wanted ...
int i, j, charCount;
for(int i=0; i<100; ++i)
{
charCount = printf("Progress: %d %%...", i);
for(j=0; j<charCount; ++j)
printf("\b");
}
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: Lets say you use printf and you want to display a message with a counter, but the message must not repeat itself but the counter must. The same question for achiving this in a messagebox.
Na.. you can't do that! unless you implement your own MessageBox, which support Formatted Output!
|
|
|
|
|
Thanx for the input ThatsAlok and reply ..
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: The same question for achiving this in a messagebox.
To add to previous replies, you need customized message box for that.
Have a look at this article by Michael P. Mehl [^].
He has explained similar thing.
|
|
|
|