Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11-04-2007, 10:26
deroko's Avatar
deroko deroko is offline
cr4zyserb
 
Join Date: Nov 2005
Posts: 217
Rept. Given: 13
Rept. Rcvd 30 Times in 14 Posts
Thanks Given: 7
Thanks Rcvd at 33 Times in 16 Posts
deroko Reputation: 30
Code:
int main(){
        int size;
        __asm{
                mov eax, offset mylabel
                sub eax, offset main
                mov size, eax
        }
        printf("0x%.08X\n", size);

__asm{
        mylabel:
        }
        return 0;
}
smthing like this? If I remember correctly msvc will compile this without a problem even without asm code, so just put label at the end of procedure and calculate it's size... that should do the trick.
__________________
http://accessroot.com
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating relative jnz opcode sizes in a custom code generator redbull General Discussion 3 09-15-2005 23:54
Writing 4 bytes to COM Port AgentSmith General Discussion 3 04-08-2005 01:25
Damaged stolen bytes *RemedY* General Discussion 9 05-22-2004 16:58
22 stolen bytes? SvensK General Discussion 2 11-06-2003 17:13


All times are GMT +8. The time now is 03:40.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )