15,796,738 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Python questions
View PHP questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by NoviceCoder871987 (Top 12 by date)
NoviceCoder871987
10-Sep-23 5:14am
View
Yes, I agree. It's really shame that Microsoft hard-coded the grid lines color to
COLOR_BTNFACE
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
LVN_ENDSCROLL
notification and accepted control slight flickering.
Thanks for your contribution.
NoviceCoder871987
9-Sep-23 20:45pm
View
@Richard MacCutchan
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
LVS_EX_GRIDLINES
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
LVS_EX_GRIDLINES
style, we must invalidate after
LVN_ENDSCROLL
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.
NoviceCoder871987
18-May-19 0:28am
View
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.
NoviceCoder871987
17-May-19 12:59pm
View
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.
NoviceCoder871987
17-May-19 5:05am
View
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.
NoviceCoder871987
13-Nov-17 13:07pm
View
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.
NoviceCoder871987
12-Nov-17 22:06pm
View
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.
https://www.codeproject.com/Questions/1214871/IOCP-sharing-completion-key-instances-between-each
NoviceCoder871987
13-Oct-17 20:06pm
View
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?
NoviceCoder871987
13-Oct-17 2:04am
View
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.
NoviceCoder871987
9-Oct-17 12:43pm
View
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?
NoviceCoder871987
22-Jun-13 12:20pm
View
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.
NoviceCoder871987
18-Jun-13 13:55pm
View
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.
Show More