views:

52

answers:

1

Hi,

I am trying to develop a DirectShow filter with internet access.

When I try to use Winsock,

1) In TCP, I wait connections but cannot access to server (try with Telnet) and

2) In UDP in data wait step (recvfrom(...)) program breaks.

Is it not possible? Or do I have to change library settings for the filter?

A: 

Do you remember to call WSAStartup before creating sockets?

Also do you check your return values from calls such as "socket"? Its definitely not returning an INVALID_SOCKET?

Goz
Yes, I call WSAstartup and int returns non zero, and yes socket() does not return INVALID_SOCKET
paul simmons
When you say it "breaks" how exactly does it break? Does it give any errors in the output window?
Goz
Well, if I debug the program, the debug ends at the specified line without an output.
paul simmons
Any chance of an update to your question with some code? Cos i've had no troubles using winsock from a DShow filter ...
Goz
have you tried the filter in graphedit?
paul simmons