Click here to Skip to main content
14,696,999 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Unicode and codeproject article Pin
Daniel Pfeffer28-Feb-15 23:19
professionalDaniel Pfeffer28-Feb-15 23:19 
GeneralRe: Unicode and codeproject article Pin
Richard MacCutchan1-Mar-15 2:42
mveRichard MacCutchan1-Mar-15 2:42 
GeneralRe: Unicode and codeproject article Pin
bkelly131-Mar-15 6:39
Memberbkelly131-Mar-15 6:39 
GeneralRe: Unicode and codeproject article Pin
Richard MacCutchan1-Mar-15 7:13
mveRichard MacCutchan1-Mar-15 7:13 
GeneralRe: Unicode and codeproject article Pin
bkelly131-Mar-15 16:51
Memberbkelly131-Mar-15 16:51 
GeneralRe: Unicode and codeproject article Pin
Theo Buys13-Apr-15 5:27
MemberTheo Buys13-Apr-15 5:27 
QuestionCAsyncSocket::Connect( (LPCTSTR) m_address, m_port_number ) Pin
bkelly1324-Feb-15 11:50
Memberbkelly1324-Feb-15 11:50 
AnswerRe: CAsyncSocket::Connect( (LPCTSTR) m_address, m_port_number ) Pin
Richard MacCutchan24-Feb-15 23:30
mveRichard MacCutchan24-Feb-15 23:30 
LPCTSTR is a typedef which will be generated as LPCWSTR (which is really WCHAR*), or LPCSTR (which is really char*), depending on whether your project defines UNICODE or not. In the Connect call, no conversion is required, the definition is merely telling you that m_address must be a pointer to a string in the appropriate character set. So if your project is generating Unicode it should be something like:
WCHAR m_address[] = L"128.56.22.8";
// or
LPCWSTR m_address = L"128.56.22.8";

BOOL result = Connect(m_address, nPort);

And if non-Unicode
char m_address[] = "128.56.22.8";
// or
LPCSTR m_address = "128.56.22.8";

BOOL result = Connect(m_address, nPort);

And if you wish to cater for the possibility that you may wish to build it for either type
TCHAR m_address[] = TEXT("128.56.22.8");
// or
LPCTSTR m_address = TEXT("128.56.22.8");

BOOL result = Connect(m_address, nPort);

GeneralRe: CAsyncSocket::Connect( (LPCTSTR) m_address, m_port_number ) Pin
bkelly1325-Feb-15 5:32
Memberbkelly1325-Feb-15 5:32 
GeneralRe: CAsyncSocket::Connect( (LPCTSTR) m_address, m_port_number ) Pin
Richard MacCutchan25-Feb-15 6:02
mveRichard MacCutchan25-Feb-15 6:02 
GeneralRe: CAsyncSocket::Connect( (LPCTSTR) m_address, m_port_number ) Pin
bkelly1325-Feb-15 6:07
Memberbkelly1325-Feb-15 6:07 
Questionis DLL appropriate Pin
bkelly1313-Dec-14 16:02
Memberbkelly1313-Dec-14 16:02 
AnswerRe: is DLL appropriate Pin
Garth J Lancaster13-Dec-14 18:08
professionalGarth J Lancaster13-Dec-14 18:08 
AnswerRe: is DLL appropriate Pin
Richard MacCutchan13-Dec-14 22:24
mveRichard MacCutchan13-Dec-14 22:24 
GeneralRe: is DLL appropriate Pin
bkelly1314-Dec-14 6:04
Memberbkelly1314-Dec-14 6:04 
AnswerRe: is DLL appropriate Pin
Albert Holguin5-Jan-15 7:55
professionalAlbert Holguin5-Jan-15 7:55 
QuestionIssue with CHTMLEditView in CDHTMLDialog Pin
Member 1101896712-Dec-14 4:53
MemberMember 1101896712-Dec-14 4:53 
SuggestionRe: Issue with CHTMLEditView in CDHTMLDialog Pin
Richard MacCutchan14-Dec-14 4:04
mveRichard MacCutchan14-Dec-14 4:04 
GeneralRe: Issue with CHTMLEditView in CDHTMLDialog Pin
Member 110189678-Jan-15 0:22
MemberMember 110189678-Jan-15 0:22 
GeneralRe: Issue with CHTMLEditView in CDHTMLDialog Pin
Richard MacCutchan8-Jan-15 1:07
mveRichard MacCutchan8-Jan-15 1:07 
Questionusing friend Pin
bkelly139-Dec-14 8:29
Memberbkelly139-Dec-14 8:29 
AnswerRe: using friend Pin
Richard MacCutchan10-Dec-14 6:22
mveRichard MacCutchan10-Dec-14 6:22 
GeneralRe: using friend Pin
bkelly1311-Dec-14 11:24
Memberbkelly1311-Dec-14 11:24 
GeneralRe: using friend Pin
Richard MacCutchan12-Dec-14 0:07
mveRichard MacCutchan12-Dec-14 0:07 
GeneralRe: using friend Pin
Aescleal12-Dec-14 0:52
MemberAescleal12-Dec-14 0:52 

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.