Author Topic: Problems with EM_STREAMOUT  (Read 280 times)

xandaz

  • Member
  • ***
  • Posts: 468
  • I luv you babe
    • My asm examples
Problems with EM_STREAMOUT
« on: October 16, 2021, 04:30:15 AM »
   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.
« Last Edit: October 27, 2021, 09:16:45 AM by hutch-- »

jj2007

  • Member
  • *****
  • Posts: 11768
  • Assembler is fun ;-)
    • MasmBasic
Re: Problems with EM_STERAMOUT
« Reply #1 on: October 16, 2021, 06:15:09 AM »
No source? And the exe doesn't send any EM_STREAM* message.

xandaz

  • Member
  • ***
  • Posts: 468
  • I luv you babe
    • My asm examples
Re: Problems with EM_STERAMOUT
« Reply #2 on: October 16, 2021, 06:44:30 AM »
    Thanks JJ. You're the man.

xandaz

  • Member
  • ***
  • Posts: 468
  • I luv you babe
    • My asm examples
Re: Problems with EM_STERAMOUT
« Reply #3 on: October 16, 2021, 06:50:26 AM »
    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

  • Member
  • ***
  • Posts: 468
  • I luv you babe
    • My asm examples
Re: Problems with EM_STERAMOUT
« Reply #4 on: October 16, 2021, 06:53:28 AM »
   Shit. Sorry, my bad. I must have had built the zip file wrong.

xandaz

  • Member
  • ***
  • Posts: 468
  • I luv you babe
    • My asm examples
Re: Problems with EM_STERAMOUT
« Reply #5 on: October 16, 2021, 06:54:55 AM »
    here it goes! Sorry man.

jj2007

  • Member
  • *****
  • Posts: 11768
  • Assembler is fun ;-)
    • MasmBasic
Re: Problems with EM_STERAMOUT
« Reply #6 on: October 16, 2021, 09:50:48 AM »
How is dwCookie being used...?

Code: [Select]
            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

  • Member
  • ***
  • Posts: 468
  • I luv you babe
    • My asm examples
Re: Problems with EM_STERAMOUT
« Reply #7 on: October 16, 2021, 05:53:56 PM »
    Oh yeah. I forgot to remove that. But still doesn't work. Thanks.

xandaz

  • Member
  • ***
  • Posts: 468
  • I luv you babe
    • My asm examples
Re: Problems with EM_STERAMOUT
« Reply #8 on: October 16, 2021, 05:57:57 PM »
    here it goes without the messagebox.

xandaz

  • Member
  • ***
  • Posts: 468
  • I luv you babe
    • My asm examples
Re: Problems with EM_STERAMOUT
« Reply #9 on: October 16, 2021, 08:27:15 PM »
    Thanks JJ. Problem solved. I was using only FILE_SHARE_READ when opening the file so i got access violation.

xandaz

  • Member
  • ***
  • Posts: 468
  • I luv you babe
    • My asm examples
Re: Problems with EM_STERAMOUT
« Reply #10 on: October 16, 2021, 10:27:54 PM »
    Hey. Decided to just CloseHandle the file and open and save them with the need requests. Working fine! Thanks!