flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > Windows > GetOpenFileName wants to delete file :) | 
  
| Author | 
  | 
              
| 
                  
                   pete 24 Jun 2009, 12:07 
                  Two things:
 
                  
                First, when you use the proc macro to start a procedure, you should not forget to use the ret macro before closing a procedure with the macro endp. Second, inside your _openfile procedure you should use Code: m2m edi,[.ofs]  | 
              |||
                  
  | 
              
| 
                  
                   LocoDelAssembly 24 Jun 2009, 14:23 
                  Quote: 
 Or just "mov edi, [.ofs]". But, I suggest using EAX, ECX, or EDX (or at least saving EDI first), that way you don't destroy a register that is supposed to by non-volatile by the stdcall calling convention. (But remember that after calling GetOpenFileName those three registers will be destroyed after returning but in your code that doesn't matter).  | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.