问题描述
我们现在可以在我们的商店应用中使用很多遗留的Winsock代码(无需重写),这显然是个好消息,但是我们已经找到了一个区别,这意味着我们可能仍然需要重写代码,此时将增加
相当大的工作。
We have a lot of legacy Winsock code that we can now use (without having to rewrite) in our store app which is obviously fantastic news, however we have found a difference that means that we may still need to rewrite the code which at this point will add considerable work.
遗留代码使用依赖于合适的封闭套接字句柄在桌面环境中返回错误10038。 然而,这会导致"0xC0000008:指定了无效句柄"商店应用中的异常。
The legacy code uses closed socket handles relying on a suitable error being returned, 10038 in a desktop environment. However this leads to a "0xC0000008: An invalid handle was specified" exception in the store app.
这会被解决吗?也许我可以注册一个应用程序级别的异常处理程序?
Will this be fixed? Perhaps I can register a app-level exception handler?
感谢您的帮助。
推荐答案
在桌面上WSAGetLastError返回10038,而ioctlsocket在商店中抛出异常app。
In desktop WSAGetLastError returns 10038 whereas the ioctlsocket throws an exception in a store app.
这篇关于商店应用程序中的Winsock差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!