当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 看了“我对C++中THUNK一种实现技术的分析”一文,有点不同的想法。
 

 

 ·vc++的链接错误lnk2001    »显示摘要«
    摘要: vc++的链接错误lnk2001......
 ·消息与消息队列    »显示摘要«
    摘要: about messages and message queues 基于windows的应用程序是事件驱动的。它们不进行明确的函数调用(比如调用c运行库)来获得输入。取而代之的是他们等待操作系统将输入传递给他们。 操作系统传递所有的输入给各种应用程序。每个window有一个函数叫做窗口过程,只要有输入操作系统就调用他们。窗口过程处理输入后,将控制返回给操作系统。详细资料请看窗口过程。 m......


也谈C++中THUNK的一种实现技术

看了“我对c++中thunk一种实现技术的分析”一文,有点不同的想法.

#pragma pack(push,1) 【程序编程相关:指针的爱情

原代码如下: 【推荐阅读:禁止/启用屏幕保护及系统热键等

struct thunk 【扩展信息:深入浅出 CPropertySheet

// structure to store the machine code

{

    char    m_jmp;          // op code of jmp instruction

    unsigned long   m_relproc;      // relative jmp

};

#pragma pack(pop)

//this type of structure can contain then thunk code, which can be executed on the fly. lets take a look at the simple case in which we are going to execute our required function by thunk.

//program 77

#include <iostream>

#include <windows.h>

using namespace std;

class c;

c* g_pc = null;

typedef void(*pfun)();

class c

{

public:

 int a;

 int b;

 float bbj;

    thunk    m_thunk;

       //virtual void g(){};


...   下一页
 ·接触vc    »显示摘要«
    摘要: 预设目录: 第一部分:winsdk 第二部分:mfc类基础,c++程序编写规范介绍 第三部分:mfc基于对话框程序 第四部分:dll动态链接库 第五部分:com组件基础 第六部分:com组件几个常用技术:idispatch,可连接对象. 第七部分:com组件的应用,以及mfc的com编写 第一部分:winsdk 学习vc已近一年了,回顾我的学习历史真是相当的艰苦。既没......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE