none
Windows Registered I/O supported on Windows 8.1 Enterprise? RRS feed

  • Question

  • Hi All,

    I am seeing something odd here. It seems that Rio works on Windows Server 2012 but does not work with Windows 8.1.

    After reading the RIOCreateRequestQueue msdn reference (site does not allow me to directly link to page) it states minimum desktop client is Windows 8.

    Output from the below code in Windows 8.1 Enterprise:

    "RIOCreateRequestQueue failed 10045!"

    Output from Windows Server 2012 R2 Standard:

    "Succeeded!"

    Any ideas why Windows 8.1 is failing?  Please see reproducible code below. Any help would be greatly appreciated.

    #include "stdafx.h"

    #pragma comment(lib, "ws2_32.lib")

    #include <WinSock2.h>

    #include <MSWsock.h>

    int _tmain(int argc, _TCHAR* argv[])

    {

           WSADATA data;

           WORD wVersionRequested = 0x202;

           if ( 0 != ::WSAStartup( wVersionRequested, &data ) )

           {

                  printf( "WSAStartup failed!\n" );

                  return -1;

           }

           SOCKET s = ::WSASocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 0, WSA_FLAG_REGISTERED_IO);

           if ( s == INVALID_SOCKET)

           {

                  printf( "WSASocket failed %d!\n", ::WSAGetLastError() );

                  return -1;

           }

           const unsigned short sPort = 50005;

           sockaddr_in addr;

           addr.sin_family = AF_INET;

           addr.sin_port = htons( sPort );

           addr.sin_addr.s_addr = INADDR_ANY;

           if ( SOCKET_ERROR == ::bind( s, reinterpret_cast<struct sockaddr *>(&addr) , sizeof( addr ) ) )

           {

                  printf( "bind failed %d!\n", ::WSAGetLastError() );

                  return -1;

           }

           HANDLE hIoPort = ::CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, 0);

           if ( NULL == hIoPort )

           {

                  printf( "CreateIoCompletionPort failed %d!\n", ::GetLastError() );

                  return -1;

           }

           RIO_EXTENSION_FUNCTION_TABLE rioFuncs;

           GUID guidRio = WSAID_MULTIPLE_RIO;

           DWORD dwBytes = 0;

           if ( 0 != WSAIoctl( s,

                                             SIO_GET_MULTIPLE_EXTENSION_FUNCTION_POINTER,

                                             &guidRio,

                                             sizeof( guidRio ),

                                             (void**)&rioFuncs,

                                             sizeof( rioFuncs ),

                                             &dwBytes,

                                             0,

                                             0 ) )

           {

                  printf( "WSAIoctl failed %d!\n", ::WSAGetLastError() );

                  return -1;

           }

           OVERLAPPED ov;

           RIO_NOTIFICATION_COMPLETION rioCompletion;

           rioCompletion.Type = RIO_IOCP_COMPLETION;

           rioCompletion.Iocp.Overlapped = &ov;

           rioCompletion.Iocp.IocpHandle = hIoPort;

           rioCompletion.Iocp.CompletionKey = (void*)-1;

           DWORD dwMaxRecv = 100;

           RIO_CQ completionQueue = rioFuncs.RIOCreateCompletionQueue( dwMaxRecv, &rioCompletion );

           if ( completionQueue == RIO_INVALID_CQ )

           {

                  printf( "RIOCreateCompletionQueue failed %d!\n", ::WSAGetLastError() );

                  return -1;

           }

           RIO_RQ requestQueue = rioFuncs.RIOCreateRequestQueue( s, dwMaxRecv, 1, 0, 1, completionQueue, completionQueue, 0 );

           if ( requestQueue == RIO_INVALID_RQ )

           {

                  printf( "RIOCreateRequestQueue failed %d!\n", ::WSAGetLastError() );

                  return -1;

           }

           printf( "Succeeded!\n" );

           return 0;


    Tuesday, May 13, 2014 5:52 PM

All replies

  • I've tried at least 4 RIO examples that I've downloaded plus this example on Win 8.1 and I get error 10045 with all on RioCreateRequestQueue().

    Does anyone have a solution to this problem?

    TIA

    Wednesday, September 10, 2014 12:50 AM
  • The reason my use case from above was failing was because there was a TDX/TDI filter installed. TDI is an older interface that is being deprecated per Microsoft. 

    Search for Transport Driver Interface

    The culprit is most likely anti-virus software (Trend Micro unfortunately using this type of filter) or 3rd party VPN drivers.

    This is what I received back from Microsoft:

    "RIO doesn’t use TDI/TDX itself. The problem occurs when 3rd party application use it and it gets enabled. Some things, like RIO, just aren’t compatible with it. There isn’t any way to pass RIO through the TDI/TDX driver, the 3rd party software needs to be re-written to use a newer interface."

    It would be great if Microsoft made it easier to to find out exactly why 10045 is being returned but it is what it is :(

    My recommendation is for you to do a fresh install of Windows 8.1 and try running the code I provided to see if it works.


    Monday, September 15, 2014 3:27 PM