|
-
Nov 18th, 2000, 12:03 PM
#1
Thread Starter
Member
I have an MFC Dll that I developed. It uses Windows Sockets to create a connection to a server, and send data. Everything works, but the OnReceive event.
The only time I can get the OnReceive event to fire is when the application that is calling the Dll is an MFC application.
I can make the connection and send and receive data when using a console app, the event just won't fire. I can manually receive data, but I need an event.
The application that I am building to interface with this is going to be in C, and I have no choice between C and C++, so I need the event to fire from a non-MFC app. Is this possible, or is there something that I am overlooking.
Thanks for any help.
-
Nov 18th, 2000, 12:15 PM
#2
Monday Morning Lunatic
Try using a function callback. When you set up the MFC DLL from your console app, the DLL should store the callback function for that thread, and instead of an event, call the function with the required values.
However, the best is always to create non-MFC DLLs, because they aren't the most reliable things
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 18th, 2000, 01:04 PM
#3
Thread Starter
Member
The problem isn't that the dll can't communicate back to the application, the problem is that the socket's OnReceive event isn't triggered. I guess I used an MFC Dll for simplicity? Should I look into another way?
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
|