Questions tagged [mfc-networking]
7 questions
7
votes
3 answers
Using MFC in Windows service?
I'm starting to develop a Windows service. I want to use some classes from my own, that has little dependencies to some MFC classes like CString, CSocket, CArchive, CMemFile and CObject. MSDN says you need to be very careful about which pieces of…

mem64k
- 748
- 1
- 11
- 25
3
votes
1 answer
How to create C# Event to handle MFC Windows message from PostMessage()
I have a managed C++ DLL using WINSOCK. On receive it sends a custom message to a CWnd * via PostMessage(). This works fine when called from unmanaged C++. The target CWnd * is registered with the C++ class after construction using this code: …

JonN
- 2,498
- 5
- 33
- 49
1
vote
2 answers
MFC CSocket keepalive packets not sending
I am trying to find a way for my application to detect disconnects via TCP when I am connecting to a remote server. I was thinking the obvious way to do this was to use the TCP keepalive option. This is an MFC C++ application and the MySock class…

ThePosey
- 2,734
- 2
- 19
- 20
1
vote
3 answers
Getting the list of shares connected to a machine
Consider that i have connected to multiple shares of a remote machine( \\machineA\share1, \\machineA\share2....) along with shares on other remote machines.
Now my question is how to find only those shares which are connected to a particular…

Raghu
- 190
- 1
- 4
- 10
0
votes
1 answer
CAsyncSocket and threading
I'm using a MFC CAsyncSocket to do some network communication in a multi-threaded environment. After several hours of trying to get the accepted sockets to accept incoming data I came across a page that states that for a CAsyncSocket's OnReceive…

Noaki
- 1,673
- 2
- 14
- 16
0
votes
1 answer
Why won't MFC::CHttpFile 'PUT' for me?
My code talks to a little Java application provided by a vendor. This Java app sets up a web server at localhost:57000 which is used to control the state of 'the machine'. For the purpose of this question, I need to change the state of 'the…

Jim In Texas
- 1,524
- 4
- 20
- 31
0
votes
1 answer
Access a socket that has been passed to thread
I am new to MFC's CWinThread and CAsyncSocket, and trying to learn them myself with dialog based application.
Here is what I want to do: make a server/multi-client model: when the number clients connect to server, the server will make threads…

Trung Nguyen
- 177
- 1
- 12