Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RIOSendEx get error 10022 but connect + RIOSend works well #1

Open
yanrk opened this issue Jan 7, 2019 · 4 comments
Open

RIOSendEx get error 10022 but connect + RIOSend works well #1

yanrk opened this issue Jan 7, 2019 · 4 comments

Comments

@yanrk
Copy link

yanrk commented Jan 7, 2019

Hello,Can you help me to solve my question? https://stackoverflow.com/questions/53776414/riosendex-get-error-10022-but-connect-riosend-works-well
RIOSendEx get error 10022 but connect + RIOSend works well

@scriptorian
Copy link
Contributor

It's an invalid argument and the main difference between the two calls is the address buffer.
I can't see anything obvious in your code but in mine I use sizeof(SOCKADDR_INET) as the variable you call ADDR_BUFFER_SIZE. This is 28 bytes for me. Seems like your 64 bytes shouldn't be a problem but it might be worth a try?

@yanrk
Copy link
Author

yanrk commented Jan 8, 2019

It get the same error 10022 at the same place, but thanks for your help

@scriptorian
Copy link
Contributor

One more guess - in my code I allocate buffers for RIORegisterBuffer using VirtualAlloc with NULL as the first parameter:
PVOID buf = VirtualAlloc(NULL, bufferBytes, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
This means that the buffers returned are page aligned. I don't remember having a problem but it is unlikely that I would have gone to the trouble without needing to...

@yanrk
Copy link
Author

yanrk commented Jan 8, 2019

I have try it, but still get error 10022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants