News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Problems with EM_STREAMOUT

Started by xandaz, October 16, 2021, 04:30:15 AM

Previous topic - Next topic

xandaz

   Hi guys. I've been working on this little app for a very long time, but, then, i restored the system and forgot to backup. I got an old version from a previous post. I'm having trouble with the SAVE part of mdichild.asm. It doesn't streamout. Can someone look into it? Thanks in advance! You're the best!

Corrected the spelling in the title.

jj2007

No source? And the exe doesn't send any EM_STREAM* message.

xandaz


xandaz

    OOOps. What do you mean no EM_STERAMOUT? It's in mdichild.asm. Did you Unassemble it and it came out as this? Sorry for trouble.

xandaz

   Shit. Sorry, my bad. I must have had built the zip file wrong.

xandaz


jj2007

How is dwCookie being used...?

            invoke  CreateFile,gofn.lpstrFileTitle,GENERIC_WRITE+GENERIC_READ,\
                       FILE_SHARE_WRITE+FILE_SHARE_READ,0,CREATE_ALWAYS,\
                       FILE_ATTRIBUTE_NORMAL,0
            mov     [edi.MdiStruct.hFile],eax
            invoke  GetLastError
            invoke  MessageBoxA,0,str$(eax),0,MB_OK
            mov     EditStream.dwCookie,eax
            mov     EditStream.pfnCallback,offset StreamOutProc
            invoke  SendMessage,[edi.MdiStruct.hEdit],EM_STREAMOUT,SF_TEXT,addr EditStream

xandaz

    Oh yeah. I forgot to remove that. But still doesn't work. Thanks.

xandaz

    here it goes without the messagebox.

xandaz

    Thanks JJ. Problem solved. I was using only FILE_SHARE_READ when opening the file so i got access violation.

xandaz

    Hey. Decided to just CloseHandle the file and open and save them with the need requests. Working fine! Thanks!