flat assembler
Message board for the users of flat assembler.

Index > Windows > Struct ?

Author
Thread Post new topic Reply to topic
iic2



Joined: 26 Jun 2008
Posts: 123
iic2
Hello everybody

How do I translate this to FASM code?

Code:
mov edx, [lParam]
add  edx, MOUSEHOOKSTRUCT[edx]
    
Post 17 Sep 2008, 08:30
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
Your code doesn't seem to make sense but try this:
Code:
mov edx, [lParam]
add edx, sizeof.MOUSEHOOKSTRUCT    
Post 17 Sep 2008, 08:30
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
Hey dude, you've posted it 4 times now, take it easy.
Post 17 Sep 2008, 08:36
View user's profile Send private message Visit poster's website Reply with quote
iic2



Joined: 26 Jun 2008
Posts: 123
iic2
I keep modifying my post because [/quote ... etc was messing it up. Each time I summit it gave new reply and I did not know it... Sorry, it did seem aggressive. But I am desperate for a solution. I been playing with this for over a week, first in MASM than in FASM... Anyway, it's MASM code. I got almost got rid of ASSUME that why it seem to make no since. Your suggest did not work correctly. It should be something near this for fasm. This give half results as your suggestion did. ASSUME does a lot more but FASM done not support it.

mov edx,[lParam]
add edx, [MOUSEHOOKSTRUCT + edx]


Code:
MouseProc proc nCode:DWORD,wParam:DWORD,lParam:DWORD

PUSH [lParam]
PUSH [wParam]
PUSH [nCode]
PUSH [hHook]
call [CallNextHookEx]

;       assume edx:PTR MOUSEHOOKSTRUCT
        mov edx,[lParam]
add  edx, MOUSEHOOKSTRUCT[edx]

......
......
......

        xor edx,edx  ; assume edx:nothing
        xor eax,eax
        ret
        
MouseProc endp
    
Post 17 Sep 2008, 09:10
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
So show us your MOUSEHOOKSTRUCT definition code. Like I said your code doesn't make sense because it looks like this:
Code:
mov edx,[lParam]
add edx, [MOUSEHOOKSTRUCT.MOUSEHOOKSTRUCT + edx]    


Are you trying access a member field of MOUSEHOOKSTRUCT?
Code:
add edx, [MOUSEHOOKSTRUCT.someMember + edx]    


Or are you trying to get the offset of a member field in the structure?
Code:
add edx, MOUSEHOOKSTRUCT.someMember    


Or do you want to point to the next set of fields in an array?
Code:
add edx, sizeof.MOUSEHOOKSTRUCT    
Post 17 Sep 2008, 09:19
View user's profile Send private message Visit poster's website Reply with quote
iic2



Joined: 26 Jun 2008
Posts: 123
iic2
I will post sample shortly, under new thread.
Post 17 Sep 2008, 09:34
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
I fixed the multiple posts thing. iic2, why you haven't used the edit button?
Post 17 Sep 2008, 13:53
View user's profile Send private message Reply with quote
iic2



Joined: 26 Jun 2008
Posts: 123
iic2
Sorry LocoDelAssembly,

I was working with a 14" dull screen under very little light last night and could not see. Worse of all *I know for a fact I now need GLASSES* . I keep clicking the wrong button but one thing for sure, I promise, those symbols were poping in for no rason at all. A bug must over there or on my machine. I don't know but I had seen this action a few times before.

I love to do titles, Hot off the Press. I wanted to save this for a thread call (The Real Dll) but I never could fix it for FASM and it finally drove me nuts and had to ask for help.

See ya
Post 17 Sep 2008, 15:49
View user's profile Send private message Reply with quote
iic2



Joined: 26 Jun 2008
Posts: 123
iic2
LocoDelAssembly, could you tell me what is the default font that this forum use and it size, so I can stop ajusting and set my editor to default same.
Post 17 Sep 2008, 17:32
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Code:
.smalltext, .mediumtext, .largetext
{
        font-family: Verdana, Helvetica, sans-serif;
        color: #000020
}
.largetext, TD.row1, TD.row2
{
        font-size : 13px;
}

.codetext
{
        font-family: Courier New, Courier, monospace;
        font-size : 13px;
}
    


But, why do you need to adjust?

[edit] In case is it is note clear, the post body is .largetext class.
Post 17 Sep 2008, 17:58
View user's profile Send private message Reply with quote
iic2



Joined: 26 Jun 2008
Posts: 123
iic2
Because I use WordPerfect to write nearly everything so I can correct my

bad spelling most of the time. I set difference default fonts to Arial, Swiss 721, Courier, etc depending on the bulk of what I am during for that week. I have so

much going on between school and work so I transfer text to notepad that
has it own font...sometime. I don't use
MAXIMIZED SCREEN for neither

and that throws of the appearance of the text when we post over the web (who have their own default fonts).
................................
................................
Why? I thinks it's got MORE to do with the size of the Window that we may be using than the font, MAYBE. So, whenever you see even one bad paragraphs like
this,
that is what the problem be.. This is my only guest since Window95.

Also, as you hear from others... things do go bad at times for some reason. We type good and it get twisted by stuff like this. There is no reason for me to type this, I knew nothing about this .... [quote="iic2"]

Bad HTML anchors is also my new guest as of today. First time ever., I'm on chapter 4 of Internet World Wide Web "How to Program" by Deitel. I am glad I'm taking this class. It's all about the WEB. So never worry about ASM programming school questions from me because I will never have to take a life time semester for ASM after experiencing MASM, POASM and my last stop ... FASM

Sorry for going into extensive details. It's ic2 way, beside, you got to know these things. Soon I'll document any bad bad bad and e-mail them to you for security reasons only. A field where I will be number 2 some day Smile

Thanks you and (Good night) Confused
Post 17 Sep 2008, 18:55
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.

Powered by rwasa.