flat assembler
Message board for the users of flat assembler.

Index > Windows > Win64 program problem!

Author
Thread Post new topic Reply to topic
pearlz



Joined: 07 Jun 2010
Posts: 55
Location: Viet Nam
pearlz
Some body can fix it for me?
Problem in comment.
thank's!


Description:
Download
Filename: win64W.asm
Filesize: 4.62 KB
Downloaded: 74 Time(s)


_________________
welcome to VietNam!
Post 28 Oct 2010, 13:53
View user's profile Send private message Reply with quote
semiono



Joined: 31 Aug 2007
Posts: 176
Location: section '.code' executable
semiono
sub rsp 8*4
Post 28 Oct 2010, 16:57
View user's profile Send private message ICQ Number Reply with quote
pearlz



Joined: 07 Jun 2010
Posts: 55
Location: Viet Nam
pearlz
Thank's, but it not true
this my problem.
Code:
  .Command:

    cmp  r9,[hOK]
    jz   .ok
    cmp  r9,[hExit]
    jz   .quit
    jmp  .exit
    .ok:
        invoke  SendMessage,[hEdit],WM_GETTEXTLENGTH,0,0
        add     eax,1
        mov     [nSize],rax
        invoke  VirtualAlloc,0,rax,MEM_COMMIT,PAGE_READWRITE
        mov     [hBuff],rax
        invoke  SendMessage,[hEdit],WM_GETTEXT,[nSize],hBuff
        ;
        ;mov     rcx,0    ;<- like this it run ok but not use
        mov     rcx,[hWnd_]  ;<- like this if not type in textbox it can run
                             ;if type any charector (>7 char)it can't run
                             ; Why
        ; hWnd_ store handle of mainWindow
        invoke  MessageBox,rcx,hBuff,szTitle,MB_ICONINFORMATION
        xor     rax,rax
        jmp     .exit
    .quit:
        invoke  PostQuitMessage,0
        xor     eax,eax
    

_________________
welcome to VietNam!
Post 28 Oct 2010, 17:46
View user's profile Send private message Reply with quote
mindcooler



Joined: 01 Dec 2009
Posts: 423
Location: Västerås, Sweden
mindcooler
Window is an ANSI window?
Post 28 Oct 2010, 18:03
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
pearlz



Joined: 07 Jun 2010
Posts: 55
Location: Viet Nam
pearlz
in header. include 'win64wx.inc'. it's an unicode program.

_________________
welcome to VietNam!
Post 29 Oct 2010, 02:41
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 713
Location: Adelaide
sinsi
Note the square brackets around hBuff
Code:
        invoke  SendMessage,[hEdit],WM_GETTEXT,[nSize],[hBuff] ; <<<
        ;
        ;mov     rcx,0    ;<- like this it run ok but not use
        mov     rcx,[hWnd_]  ;<- like this if not type in textbox it can run
                             ;if type any charector it can't run
                             ; Why
        invoke  MessageBox,rcx,[hBuff],szTitle,MB_ICONINFORMATION ;<<<
    

Your code was reading into hBuff, not the memory pointer stored in [hBuff].
It worked until the edit contained 8 characters...
Post 29 Oct 2010, 03:54
View user's profile Send private message Reply with quote
pearlz



Joined: 07 Jun 2010
Posts: 55
Location: Viet Nam
pearlz
Oh, it's really worked
but if like this
Code:
        invoke  SendMessage,[hEdit],WM_GETTEXT,[nSize],hBuff ; <<<  
        mov     rcx,0 
        invoke  MessageBox,rcx,hBuff,szTitle,MB_ICONINFORMATION ;<<< 
    

it's work too. So i'm not think that.
thank's ! Very Happy

_________________
welcome to VietNam!
Post 29 Oct 2010, 07:39
View user's profile Send private message Reply with quote
pearlz



Joined: 07 Jun 2010
Posts: 55
Location: Viet Nam
pearlz
in this case hBuff = char**
ok. Very Happy

_________________
welcome to VietNam!
Post 29 Oct 2010, 07:40
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.