Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionClipboard / Win32 Pin
Fareed Rizkalla7-May-10 8:39
Fareed Rizkalla7-May-10 8:39 
QuestionRe: Clipboard / Win32 Pin
David Crow7-May-10 9:06
David Crow7-May-10 9:06 
AnswerRe: Clipboard / Win32 Pin
Fareed Rizkalla7-May-10 10:18
Fareed Rizkalla7-May-10 10:18 
QuestionRe: Clipboard / Win32 Pin
David Crow7-May-10 10:30
David Crow7-May-10 10:30 
AnswerRe: Clipboard / Win32 Pin
Fareed Rizkalla7-May-10 14:12
Fareed Rizkalla7-May-10 14:12 
QuestionRe: Clipboard / Win32 Pin
David Crow7-May-10 17:02
David Crow7-May-10 17:02 
GeneralRe: Clipboard / Win32 Pin
Michael Dunn7-May-10 16:40
sitebuilderMichael Dunn7-May-10 16:40 
QuestionSend data to remote server from CString Pin
mesajflaviu7-May-10 8:25
mesajflaviu7-May-10 8:25 
It can be send data to remote server from CString ?
Here is "original code" :
bool CSmtp::SendData()
{
	int idx = 0,res,nLeft = strlen(SendBuf);

	assert(SendBuf);

	if(RecvBuf == NULL)
		return false;

	while(nLeft > 0)
	{
		if( res = send(hSocket,&SendBuf[idx],nLeft,0) == SOCKET_ERROR)
		{
			m_oError = CSMTP_WSA_SEND;
			return false;
		}
		if(!res)
			break;
		nLeft -= res;
		idx += res;
	}
	return true;
}

which I want to convert into :
BOOL CSmtp::SendData()
{
	if(send(m_hSocket,m_sSendBuf,1024,0) == == SOCKET_ERROR)
	{
		m_nError = CSMTP_WSA_SEND;
		return FALSE;
	}

	return TRUE;
}


m_sSendBuf is CString data member
AnswerRe: Send data to remote server from CString Pin
CPallini7-May-10 8:41
mveCPallini7-May-10 8:41 
AnswerRe: Send data to remote server from CString Pin
«_Superman_»7-May-10 8:48
professional«_Superman_»7-May-10 8:48 
GeneralRe: Send data to remote server from CString Pin
mesajflaviu7-May-10 9:08
mesajflaviu7-May-10 9:08 
QuestionGet resource ID from icon index Pin
cryptoknight177-May-10 7:49
cryptoknight177-May-10 7:49 
QuestionTimeout problem in CHttpFile::SendRequest() Pin
m_code7-May-10 7:49
m_code7-May-10 7:49 
QuestionWhat device context methods are available to Crichedit Pin
ForNow7-May-10 7:10
ForNow7-May-10 7:10 
AnswerRe: What device context methods are available to Crichedit Pin
karle7-May-10 9:43
karle7-May-10 9:43 
GeneralRe: What device context methods are available to Crichedit Pin
ForNow7-May-10 11:21
ForNow7-May-10 11:21 
GeneralRe: What device context methods are available to Crichedit Pin
karle8-May-10 4:00
karle8-May-10 4:00 
GeneralRe: What device context methods are available to Crichedit Pin
ForNow8-May-10 15:38
ForNow8-May-10 15:38 
QuestionReceive data from server into CString Pin
mesajflaviu7-May-10 6:14
mesajflaviu7-May-10 6:14 
AnswerRe: Receive data from server into CString Pin
CPallini7-May-10 7:13
mveCPallini7-May-10 7:13 
GeneralRe: Receive data from server into CString Pin
mesajflaviu7-May-10 7:16
mesajflaviu7-May-10 7:16 
GeneralRe: Receive data from server into CString Pin
CPallini7-May-10 7:19
mveCPallini7-May-10 7:19 
GeneralRe: Receive data from server into CString Pin
mesajflaviu7-May-10 8:05
mesajflaviu7-May-10 8:05 
QuestionHow to locate the code which was "Detected memory leaks!" Pin
transoft7-May-10 3:19
transoft7-May-10 3:19 
AnswerRe: How to locate the code which was "Detected memory leaks!" Pin
Electron Shepherd7-May-10 3:30
Electron Shepherd7-May-10 3: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.