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.