Forgot your password?
Sign in with
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Python questions
View PHP questions
All Message Boards...
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Design and Architecture
Internet of Things
C / C++ / MFC
ATL / WTL / STL
Objective-C and Swift
Hardware & Devices
Hosting and Servers
.NET (Core and Framework)
Site Bugs / Suggestions
Spam and Abuse Watch
The Insider Newsletter
The Daily Build Newsletter
Most Valuable Professionals
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
What is 'CodeProject'?
Ask a Question
Bugs and Suggestions
Article Help Forum
Comments by NoviceCoder871987 (Top 12 by date)
Yes, I agree. It's really shame that Microsoft hard-coded the grid lines color to
and left us with no control message to change their color. Simple stuff like that should really take no more than few seconds. I went with invalidating in response to
notification and accepted control slight flickering.
Thanks for your contribution.
Thanks for the link. That doesn't explain the behavior I'm getting.
After wrestling with this issue for a while, I found out that if we have
style set, this issue is completely fixed without the need to invalidate and therefore, no flickering. With that style set, one must ensure that the lines will be drawn exactly over the default ones. I don't like this solution as it seems hacky. Otherwise, without
style, we must invalidate after
notification and have some flickering.
Note that this issue only happens with scrolling with arrow icons of scroll/Max thumb click. Every other scrolling, like mouse wheel works fine.
I don't see other options here. Hopefully someone can come up with a better solution.
Yes thanks Rick. Very good method of adaptive timer interval. Did not think of it. You have very good imagination. I will accept your answer as the solution.
Thanks for your response. The load of items is not done at one go, meaning, its not loaded all in a single loop but rather from messages posted from worker threads. The impact of this without any kind of delay between posted message can be noticed in the listview control as the right click on this listview control never shows the menu up only if all items loaded. Each PostMessage/PostThreadMessage (Worker->GUI) will cause a load of a single listview item (LVM_INSERTITEM). Yes you have good answer, i prefer the responsive more than caring about how fast to load them.
The Listview control does not respond during the load of items. How can i relief the listview to be responsive during load of items? i only thought of delay. Did not find another fix for this.
Yes it's what i called unique connection identifier or key that will be used in all connections to differentiate the user. I think this is not good to use multiple sockets for same user as you can see it gives more complexity. So i think i will do only 1 socket instead and use multiple instances of per io data instead of multiple instances of context key. So this way i will have 1 socket for all operations but multiple buffers of per io data and de allocate them at each finish and allocate new at each start opf operation.
Thank you for your help. Which is very informative.
Jochen thanks for your help. Can you please check my other question and provide some info if you have some ideas that can help? i have been struggling for days without success.
Thank you for your advice. I created 2 overlapped structures now. Do i need to use Critical sections? i mean in buffer copying and totalbytesreceived modify memory values should i put them inside EnterCriticalSection LeaveCriticalSection? or its not needed? where should i use Critical section in IOCP?
Thank you for your help. I meant by multiple sockets is that if i want to send multiple files from client to server then the server has to create a dedicated socket for each file? or just use 1 socket for all operations of send? and when i add switch case after the call of GetQueuedCompletionStatus returns i use OP_WRITE , OP_READ to identify socket event. Now i don't understand how i am going to send and recv at the same time because if i am receiving i am setting this OP code to OP_READ then let's say i want to send something while that data read is still in progress so i set this OP code to OP_WRITE now what happens here is that the next OVERLAPPED structure returned from GetQueuedCompletionStatus call will have OP_WRITE code set so what will happen with the pending data that i want to receive? switch case only execute 1 block of statement so it's either read or write how to do both in switch? or i need to add this value OP_XXXX constants like OP_WRITE + OP_READ? I am not freeing OVERLAPPED structure on all IO Operations unless the client closed the connection.
Thank you. 0x1015 is not an error code it is lpNumberOfBytes returned by GetQueuedCompletionStatus. So actually it didnt read 0x2000 bytes first. Data got chunked. And i was also updating len but it's not a stable method.
Now i have made it allocate each time a receive is called through HeapReallocate API but after reading your answer i will make it fixed bufer then append to final received buffer. Can you suggest how many bytes should i receive for fast transfer? or the number of requested bytes to be received doesn't effect transfer speed?
Now i have one more question that i am really don't know how to handle.
I use a code to identify each IO Completion by setting this code to example OP_WRITE for sending. OP_READ for reading. This is all set in a structure of Per IO data.
In the first WSARecv to initiate IO Reading. I set this code to OP_READ
and upon returning from GetQueuedCompletionStatus i extract this key to know what is the current completed operation using switch case. But my question is what to do in case of sending and receiving at the same time? is the returning from GetQueuedCompletionStatus sequenced? I mean if i call WSASend and there were more data to be received is the next return IO Completion from GetQueuedCompletionStatus must be sending? or it just happens randomly?
How do i send and receive at the same time? this is confusing me. How to handle this situation after GetQueuedCompletionStatus returns?. Should i create more socket from the other client to use or 1 socket is enough for both sending and receiving at the same time?
Probably as you think. What i am trying to achieve is multiple unconditional branches. Not directly written in source code. But in the loader that will load the EXE file. It is a part of protection. But i am not sure how to do it.
What you mean not clear? i meant same tech used by Themida VM and VMProtect. lot's of jumps here and there. I can easily add forward branch but my problem is backward branch which if i choose randomly it can get inside a used code already. So to be more clear i choose random destination to jump to, add jmp then update code pointer to that destination so at that location continue code.
Last Updated 1 Jan 1900
All Rights Reserved.