|
The problem is as follows:
in a chat system.A and B are client ,C is server. There is only one tcp line between client and server.Client A send data to server C ,then server C transmit data to client B, but can B send data to client A throuth server C at the same time?I think there will be a problem,because B and C are sending Data to each other at the same time.There must be a conflict.My friends think there are no problem ,tcp can deal with it.
so can are a client and a server sending data on the same connection at the same time? or create establish two socket,one for receiving,the other for sending?
Thank you for helping me.
study
|
|
|
|
|
There should be no problem with this at the TCP/IP socket level. The application(s) involved being able to handle sending and receiving at the same time, well that is another issue.
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
|
|
|
|
|
Thank you for helping me
study
|
|
|
|
|
TCP can deal with your problem. What you call 'at the same time' is managed by the lower layers of the network system.
-- modified at 8:04 Wednesday 22nd August, 2007
|
|
|
|
|
Thank you for helping me !
study
|
|
|
|
|
I have to make an activex control through which i have to select multiples images files, zip them send to the server and again unzip them when dowloading from the server to the browser. All this is to be done through ActiveX control in vc++ and multiple files are to be selected through browse option.
Please help me out.
Thanks In Advance.
Dhiraj
Dhiraj
|
|
|
|
|
I am using CBitmapButton to display bitmap on the push button.
CBitmapButton m_bitmap;
m_bitmap.Create(NULL, WS_CHILD|WS_VISIBLE|BS_OWNERDRAW,
CRect(10,10,100,100), GetDc(), 1);
m_bitmap.LoadBitmap(IDB_PLAY,0,0,0);
This is not working
S.Yamini
|
|
|
|
|
If you are in VC++ try with create the CBitmapButton in your resource editor, set the Bitmap there, and then when you make click on the button set the property to visible as you want.
If not...
With your code you are creating the bitmap and loading in the button but, are u sure that your GetDC () is pointing where you need?
Take a look step by step with the debugger
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
thanks. It works now
S.Yamini
|
|
|
|
|
You are wellcome
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
yaminisridaran wrote: This is not working
See here for one that does.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
am a vb.net and java developer but i want to get back to my c++, but i dont understand why a small application should need a 50mb runtime install.
can an application developed with visual c++ 2005 , any kind run widout the .net frammwork? impossible huh?
phatkin
|
|
|
|
|
Simply start an unmanaged C++ project. Not a managed (CLR) one.
Use project type ATL, MFC or Win32.
prubyholl wrote: impossible huh?
Quite easy, huh?
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
thanks, and you can get all your forms and all the power of c++?????thanks
phatkin
|
|
|
|
|
You can get all the power of C++ and use MFC, qt, wxWidgets and WhatTheHeckElse as GUI Toolkit.
Windows forms are not possible - these are managed and require the installation of the .NET-Framework.
But you only need to install this once on a given PC. Like e.g. a Java VM.
Is this really a problem for you?
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
prubyholl wrote: can an application developed with visual c++ 2005 , any kind run widout the .net frammwork? impossible huh
As others have side, yup you can create native C++ apps without the .NET runtime. However, when you go to distribute your apps you will need to ship the updated C runtime Microsoft Visual C++ 2005 Redistributable Package (x86)[^] for older computers
With respect, I must disagree. A quick look at middle management in just about any corporation shows that the dodo not only survived, it's reproducing in record numbers. Christopher Duncan
|
|
|
|
|
S Douglas wrote: when you go to distribute your apps you will need to ship the updated C runtime Microsoft Visual C++ 2005 Redistributable Package (x86)[^] for older computers
Which is 2,5 MB in size, only needed once per Computer, plus you can use the link to Microsoft (and don't have to ship it yourself).
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
You will only need to do that if you link dynamically to MFC / CRT. If you link statically (not the default settings, by the way), you don't have to distribute anything but your exe.
|
|
|
|
|
Hi
Where is the data serialized in a activeX Control file or registery? Can we access that data?
Regards
The Best Religion is Science.
Once you understand it, you will know God.
|
|
|
|
|
Hi all,
I am using an ODBC class written by Carlos Antollini (A set of ODBC Classes) and making use of Oracle 10g Express Edition.
Basically what I'm trying to do, is perform a select statement on the database to determine if a certain
record exists. If the record exists I perform an UPDATE stament, and when the record doesn't exists,
I perform a INSERT. (I don't want to go the route of the Stored Procedures Thanks )
For instance:
pdb.m_nRowsAffected=0;
pdb.Execute(SELECT * FROM TABLE WHERE FIELDNAME = 'CONDITION';);
if (pdb.m_nRowsAffected>0)
{
UPDATE
}
else
{
INSERT
}
THE PROBLEM:
The variable m_nRowsAffected returns a code of -1, even if the record exists. After stepping into the
function I saw that the SQLRowCount sets the variable to -1. I have no idea what is going on . If I make
use of MySQL everything works. An example of the function Execute() is shown below. Can anyone please
assist me in this problem??
BOOL CODBCDatabase::Execute(CHAR *szSqlStr)
{
SQLRETURN ret;
SQLHSTMT hStmt = NULL;
SQLINTEGER nRowCount;
SQLAllocHandle(SQL_HANDLE_STMT, m_hDbc, &hStmt);
ret = SQLExecDirect(hStmt, (SQLCHAR*)szSqlStr, SQL_NTS);
SQLRowCount(hStmt, &nRowCount);
m_nRowsAffected = nRowCount;
return ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO;
}
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
It's not really my topic but I did once write a SQL parser prototype based on the Oracle 8 SQL spec only to find that Oracle 8 SQL and 'normal' SQL disagree about a lot of things, especially SELECT cleverness. I'd check your Oracle docs for how to do this their way. I don't know if 10 is any more standards compliant than 8. Can you see what SQL the ODBC driver is producing and compare the MySQL output with the Oracle by any chance. That might help.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Well, I believe that doing a SELECT * is less optimal that doing a SELECT 1 because less data has to be processed/returned if you are just testing for the existance of something. That aside, I would try using SELECT 1 and maybe even an EXISTS test to return a rowset:
SELECT 1 FROM TABLE WHERE FIELDNAME = 'CONDITION'
SELECT 1 FROM TABLE WHERE EXISTS( SELECT * FROM TABLE WHERE FIELDNAME = 'CONDITION' ) I have had the unfortunate experience of working with multiple RDBMSes and you sometimes have to do something obscure like the above in order to make things works everywhere. If even the above calls fail, try executing the query within an EXEC statement (this is a problem I have had with Sybase RDBMSes).
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
|
|
|
|
|
Hi James,
Thanks for the reply, I'll try it and see what I can do.
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Can anybody help me in solving my problem.....
i am using a CFileDialog class for accessing multiple files through browse.But depending up on the file path length the number of files that are getting selected varied
Is there anyway in solving this problem(i need to select a maximum of 20 files).
CFileDialog fileDialog(true,null,null,OFN_MULTISELECT | OFN_NODEREFERNCELINK |OFN_EXPLORER ,"Excel File(*.xls)|*.xls|AllTypes(*.*)|*.*");
||SnAkeBed||
|
|
|
|
|
I htink you need to change the buffer size used for the returned filenames if the OFM struct:
It has to be large enough to contain all the full paths etc for all the files selected.
So you probably need _MAX_PATH * 20 in length:
<br />
char buffer[4096] = "";
dlg.m_ofn.nMaxFile = 4096;<br />
dlg.m_ofn.lpstrFile = buffer;<br />
If you vote me down, my score will only get lower
|
|
|
|