发明名称 Replacement of virtual functions
摘要 Techniques are described for replacement of virtual functions. In one or more implementations, a call to a virtual function is intercepted and redirected to a shim module associated with a replacement function. The shim module is configured to adjust a pointer (e.g., a “this” pointer) for the virtual function. In at least some embodiments, the pointer can be adjusted based on information retrieved from symbol data for the virtual function. The replacement function can utilize the adjusted pointer to access an object instance associated with the virtual function. For example, the replacement function can use the adjusted pointer to access data and/or functionalities of the object instance.
申请公布号 US9348610(B2) 申请公布日期 2016.05.24
申请号 US201514628436 申请日期 2015.02.23
申请人 Microsoft Technology Licensing, LLC 发明人 Henderson Jared E.;Schofield Mark T.
分类号 G06F9/455;G06F9/44;G06F9/46 主分类号 G06F9/455
代理机构 代理人 Churna Timothy;Yee Judy;Minhas Micky
主权项 1. A computer-implemented method comprising: locating, by a computer device, symbol data for a target virtual function; determining, by the computer device, a memory offset value for the target virtual function from the symbol data; and passing the memory offset value to a shim functionality associated with a replacement function, the shim functionality being configured to use the memory offset value to adjust a pointer associated with the target virtual function such that the replacement function uses the pointer to interact with an object instance associated with the target virtual function and the shim functionality being further configured to receive a redirected call to the target virtual function and jump to the replacement function with the pointer.
地址 Redmond WA US