简体   繁体   English

Windows注册的I / O Win 8.1 RioCreateRequestQueue错误10045

[英]Windows Registered I/O Win 8.1 RioCreateRequestQueue Error 10045

Using Win8.1 and Visual Studio 2013, I've tested every example of Windows Registered I/O that I can find (about 5). 使用Win8.1和Visual Studio 2013,我测试了我可以找到的每个Windows注册I / O示例(大约5个)。 All result in error 10045 on RioCreateRequestQueue() as shown below on one. 所有这些都会在RioCreateRequestQueue()上导致错误10045,如下图所示。

c:>rioServerTest.exe
InitialiseRio Start
InitialiseRio End
CreateCompletionQueue Start
CreateCompletionQueue End
CreateRequestQueue start
RIOCreateRequestQueue Error: 10045

Related code is : 相关代码是:

void *pContext = 0;

printf("CreateRequestQueue start\n");

g_requestQueue = g_rio.RIOCreateRequestQueue(
    g_socket,     // Socket
    (ULONG) 10,   // MaxOutstandingReceive,
    (ULONG) 1,    // maxReceiveDataBuffers,
    (ULONG) 10,   // MaxOutstandingSend,
    (ULONG) 1,    // MaxSendDataBuffers
    g_completionQueue,   // ReceiveCQ
    g_completionQueue,   // SendCQ
    pContext);                      // SocketContect

    if (g_requestQueue == RIO_INVALID_RQ) {
        printf_s("RIOCreateRequestQueue Error: %d\n", GetLastError());
        exit(1);
    }

    printf("CreateRequestQueue End\n");

According to the literature that I have read, Registered I/O is intended to work with Windows 8 and later and Windows Server 2012 and later. 根据我阅读的文献,注册I / O旨在与Windows 8和更高版本以及Windows Server 2012和更高版本一起使用。

Can anyone explain to me via an example how to get this to work on Win8.1? 谁能通过示例向我解释如何使其在Win8.1上运行? TIA TIA

10045 is WSAEOPNOTSUPP the description of which is "Operation not supported. The attempted operation is not supported for the type of object referenced. Usually this occurs when a socket descriptor to a socket that cannot support this operation is trying to accept a connection on a datagram socket." 10045WSAEOPNOTSUPP其描述为“不支持操作。所引用的对象类型不支持尝试的操作。通常,当无法支持此操作的套接字的套接字描述符尝试接受数据报上的连接时,会发生这种情况插座。”

So actually it's likely that the code we need to see is in fact where you create your socket. 因此,实际上,我们需要查看的代码实际上是在您创建套接字的位置。

Your socket creation code should look something like this: 您的套接字创建代码应如下所示:

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

I have some example articles (including a whole suite of RIO, UDP server designs with complete source code) here , all of these run on all operating systems that RIO supports. 我有一些例子文章(包括整个RIO,UDP服务器的设计与完整的源代码套件) 在这里 ,所有的这些对RIO支持所有操作系统上运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM