title: WsKSendTo returns STATUS_INVALID_DEVICE_STATE: what does it mean?
body: <p>I am calling WsKSendTo on an opened socket (irp returns success in callback). But WskSendTo on that socket returns c0000184, what is referenced to as STATUS_INVALID_DEVICE_STATE. What kind of errors are addressed by this? </p>
  
  <p>Did I miss something in the send routine?</p>
  
  <pre><code>    psc-&gt;dstaddr.sin_family = AF_INET;
  psc-&gt;dstaddr.sin_port = 0x6973;  // big endian
  psc-&gt;dstaddr.sin_addr.S_un.S_un_b.s_b1 = 0x02;
  psc-&gt;dstaddr.sin_addr.S_un.S_un_b.s_b2 = 
      psc-&gt;dstaddr.sin_addr.S_un.S_un_b.s_b3 = 0x17;
  psc-&gt;dstaddr.sin_addr.S_un.S_un_b.s_b4 = 0x0a;
  
  // create IRP
  psc-&gt;pirp = IoAllocateIrp(1, FALSE);
  if(!psc-&gt;pirp){
      DbgPrint("ShoutShout: IRP not allocated\n");
      FreeShoutContext(psc);
      return STATUS_UNSUCCESSFUL;
  }
  IoSetCompletionRoutine(
      psc-&gt;pirp,
      ShoutShoutComplete,
      psc,
      TRUE,
      TRUE,
      TRUE
      );
  
  // initiate send
  const WSK_PROVIDER_DATAGRAM_DISPATCH *dispatch = 
      (PWSK_PROVIDER_DATAGRAM_DISPATCH)sockContext-&gt;socket-&gt;Dispatch;
  status = dispatch-&gt;WskSendTo(  
      sockContext-&gt;socket,       //PWSK_SOCKET
      &amp;psc-&gt;buf,                 //__in PWSK_BUF
      NULL,                      // undocumented IN ULONG  Flags,   
      (PSOCKADDR)&amp;psc-&gt;dstaddr,  // IN PSOCKADDR  RemoteAddress OPTIONAL, 
      0,             //  IN SIZE_T  ControlInfoLength, 
      0,             //  IN PCMSGHDR  ControlInfo OPTIONAL,  
      psc-&gt;pirp);        //  IN PIRP  Irp    );
  </code></pre>
  
  <p>Afterwards status and pirp->IoStatus->Status contain afore mentioned error code and nothing is sent (or reaching the destination). Any suggestions?</p>