0.0.0.0 is used for unspecified or any local address, but it isn't a valid destination for TCP or UDP.
I think it is only for binding & listening. Sending to it doesn't make sense, so Winsock returns an error.
In this case, 192.168.1.255 is the correct option for a subnet broadcast.
If you intend to send to your local machine, you could use 127.0.0.1.