Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C2065 'IUrlHistoryStg2Ptr': undeclared identifier Pin
CPallini29-Apr-21 0:20
mveCPallini29-Apr-21 0:20 
GeneralRe: C2065 'IUrlHistoryStg2Ptr': undeclared identifier Pin
Victor Nijegorodov29-Apr-21 1:51
Victor Nijegorodov29-Apr-21 1:51 
AnswerRe: C2065 'IUrlHistoryStg2Ptr': undeclared identifier Pin
Richard MacCutchan29-Apr-21 2:18
mveRichard MacCutchan29-Apr-21 2:18 
QuestionMessage Closed Pin
28-Apr-21 4:41
Member 1496877128-Apr-21 4:41 
AnswerRe: How to "link" two C++ applications ? Pin
Richard MacCutchan28-Apr-21 5:41
mveRichard MacCutchan28-Apr-21 5:41 
AnswerRe: How to "link" two C++ applications ? Pin
Sean Ewington28-Apr-21 5:45
staffSean Ewington28-Apr-21 5:45 
QuestionWSARecv question Pin
ForNow25-Apr-21 17:17
ForNow25-Apr-21 17:17 
QuestionCAyncSocket::Detach Fails _AFX_SOCK_THREAD_STATE* pState-> m_hSocketWindow == NULL Pin
ForNow25-Apr-21 3:57
ForNow25-Apr-21 3:57 
hI
I create four CAsynSocket Classes in four CwinThread classes When I first create them Socket (with notification events) bind ioctl, setsockopt. I follow the CASynSocket::Socket call to sockcore.cpp and
C++
pState-> m_hSocketWindow
has a valid Hwnd Value. The context of the creation of sockets in the CwinApp after my main CFrameWnd has been created.

I then start a conversation with the server (connect send and then receive). It is at a point that I would like to give the work over to a modeless dialog. this is where things go wrong. After getting a message
from the server I try to do a detach which goes to
C++
CAsyncSocket::AsyncSelect(long lEvent)
however at this point

C++
_AFX_SOCK_THREAD_STATE* pState-> m_hSocketWindow == NULL
is NULL

Since I was debugging this in release mode I never got the subsequent assert on this.

First off in the documentation for CAsynSocket there is no mention that i need a Hwnd to process the class when I first did the CAsynSocket::Socket call with the event notification that I wanted to be informed on
I did notice that
C++
pState-> m_hSocketWindow 

had a valid window

When I first started using CAsyncSocket I know very little about TCPI/IP or OO

at this point looking at Winscok API it has much more flexability so much so it seem I dont necessary need a valid Hwnd but a kernel object such as that from CreateEvent will do
more so It seems if I want to pass notification to a different windows I just do another call to
WSAAsyncSelect

with a new HWND

Still I am wondering why
C++
pState-> m_hSocketWindow
went to NULL
AnswerRe: CAyncSocket::Detach Fails _AFX_SOCK_THREAD_STATE* pState-> m_hSocketWindow == NULL Pin
Mircea Neacsu25-Apr-21 5:38
Mircea Neacsu25-Apr-21 5:38 
GeneralRe: CAyncSocket::Detach Fails _AFX_SOCK_THREAD_STATE* pState-> m_hSocketWindow == NULL Pin
ForNow25-Apr-21 5:52
ForNow25-Apr-21 5:52 
AnswerRe: CAyncSocket::Detach Fails _AFX_SOCK_THREAD_STATE* pState-> m_hSocketWindow == NULL Pin
Victor Nijegorodov25-Apr-21 5:49
Victor Nijegorodov25-Apr-21 5:49 
GeneralRe: CAyncSocket::Detach Fails _AFX_SOCK_THREAD_STATE* pState-> m_hSocketWindow == NULL Pin
ForNow25-Apr-21 6:01
ForNow25-Apr-21 6:01 
QuestionPlz solve it Pin
SARKER MD KAWSER ALOM24-Apr-21 13:11
SARKER MD KAWSER ALOM24-Apr-21 13:11 
AnswerRe: Plz solve it Pin
k505424-Apr-21 13:26
mvek505424-Apr-21 13:26 
AnswerRe: Plz solve it Pin
Dave Kreskowiak24-Apr-21 15:13
mveDave Kreskowiak24-Apr-21 15:13 
AnswerRe: Plz solve it Pin
Aghast (nj)24-Apr-21 21:15
Aghast (nj)24-Apr-21 21:15 
AnswerRe: Plz solve it Pin
Victor Nijegorodov24-Apr-21 22:08
Victor Nijegorodov24-Apr-21 22:08 
AnswerRe: Plz solve it Pin
Jerry Jeremiah4-May-21 19:41
Jerry Jeremiah4-May-21 19:41 
QuestionDLL he11 - multiple versions of Visual Studio - professional guidance needed - management of SDKs. Pin
charlieg20-Apr-21 12:17
charlieg20-Apr-21 12:17 
AnswerRe: DLL he11 - multiple versions of Visual Studio - professional guidance needed - management of SDKs. Pin
Mircea Neacsu20-Apr-21 13:28
Mircea Neacsu20-Apr-21 13:28 
GeneralRe: DLL he11 - multiple versions of Visual Studio - professional guidance needed - management of SDKs. Pin
Daniel Pfeffer20-Apr-21 21:07
professionalDaniel Pfeffer20-Apr-21 21:07 
GeneralRe: DLL he11 - multiple versions of Visual Studio - professional guidance needed - management of SDKs. Pin
charlieg21-Apr-21 1:38
charlieg21-Apr-21 1:38 
GeneralRe: DLL he11 - multiple versions of Visual Studio - professional guidance needed - management of SDKs. Pin
charlieg21-Apr-21 1:36
charlieg21-Apr-21 1:36 
AnswerRe: DLL he11 - multiple versions of Visual Studio - professional guidance needed - management of SDKs. Pin
Richard MacCutchan20-Apr-21 21:25
mveRichard MacCutchan20-Apr-21 21:25 
GeneralRe: DLL he11 - multiple versions of Visual Studio - professional guidance needed - management of SDKs. Pin
Mircea Neacsu21-Apr-21 0:57
Mircea Neacsu21-Apr-21 0:57 

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.