[ create a new paste ] login | about

Link: http://codepad.org/gFLJ9RJd    [ raw code | fork ]

D, pasted on Apr 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Resolver
{
    IASIO that_;
    int init(void* sysHandle)
    {
        int result;
        int funcOffset = 12;
        void *this_ = &that_;                
        
        asm {                            
            mov     EAX, sysHandle        ;
            push    EAX                   ;
            mov     ECX, this_            ;
            mov     EAX, [ECX]            ;
            call    [EAX+funcOffset]      ;
            mov     result, EAX           ;
        }    
        
        return result;
    }  
}


Create a new paste based on this one


Comments: