|
-
September 9th, 2002, 10:20 AM
#1
NetMessageBufferSend
I'm having trouble with the LPBYTE param of this API.
I want to move text from my dialog based application to this api to send.
CString buffer;
m_cSendText.GetWindowText(buffer);
nasStatus = NetMessageBufferSend(NULL,
awcToNameW,
awcFromNameW,
(LPBYTE)&buffer,
m_cSendText.GetLength());
But I'm getting junk in the message box. Any suggestions?
Thanks
Tom Wright
-
September 9th, 2002, 11:11 AM
#2
Hi:
CString buffer;
m_cSendText.GetWindowText(buffer);
nasStatus = NetMessageBufferSend(NULL,
awcToNameW,
awcFromNameW,
(LPBYTE)&buffer, ,
m_cSendText.GetLength());
maybe
nasStatus = NetMessageBufferSend(NULL,
awcToNameW,
awcFromNameW,
(LPBYTE)buffer.c_str(), ,
m_cSendText.GetLength());
-
September 9th, 2002, 11:14 AM
#3
Thanks for the help but c_str is not a member of the CString class.
Thanks
Tom Wright
-
September 9th, 2002, 12:04 PM
#4
Hi:
sorry , I 'm not familiar with CString .
I look up the MSDN .found the function CString::GetString()
is do the same work as the std::string::c_str(); so you should use
nasStatus = NetMessageBufferSend(NULL,
awcToNameW,
awcFromNameW,
(LPBYTE)buffer.GetString(),
m_cSendText.GetLength());
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|