Hey... i'm getting pretty desperate at this. After the file is loaded into the richedit control it gets lock and can't do any input. Any ideas why. The file was opened with GENERIC_READ ..._WRITE and FILE_SHARE_READ ..._WRITE. I'm getting pretty disgusted with my lowly skills...thanks in advance
Quote from: xandaz on November 30, 2020, 04:48:49 AM
Hey... i'm getting pretty desperate at this. After the file is loaded into the richedit control it gets lock and can't do any input. Any ideas why. The file was opened with GENERIC_READ ..._WRITE and FILE_SHARE_READ ..._WRITE. I'm getting pretty disgusted with my lowly skills...thanks in advance
Post the code you are doing so other can help. :thumbsup:
the code is kinda wide... thanks for helping out. i've been trying UnlockFile among other things...
And we have to guess what all this code does???
loop_3:
push ecx
invoke SendMessage,hMdi,WM_MDIGETACTIVE,0,0
mov hCurrentWindow,eax
.if kc_flag==IDYES
invoke GetWindowLong,hCurrentWindow,GWL_USERDATA
mov edi,eax
.if [eax.MdiStruct.hFile]!=0
invoke hFilePositive
.endif
.endif
invoke SendMessage,hMdi,WM_MDIDESTROY,hCurrentWindow,0
dec noMdiChild
dec MdiId
dec RichEditId
dec ToolbarId
pop ecx
loop loop_3
Sorry for being so lowly gifted. Don't Bother peeking into the code. It has become too complex. Thanks anyway
That has nothing to do with "lowly gifted". It has a lot to do with the total absence of comments. A few months from now, you will not be able to understand your own code.
Jochen mentioned about a very important principle of coding. Commenting can even take precedence over algorithm design as nobody can keep in my mind all the details of coding sessions.
Remember to CloseHandle() after streaming.
should i close handle right after. Can't i do it when session ends? Thanks
After streaming file handle is useless.
i thought i should keep the handle opened for future operations. Isn't that the standard procedure?
Hey guys. Actually closing the handles simplified my task. ty guys. you're the best