⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 morevxdwraps.cpp

📁 可以实现对邮件的加密解密以及签名
💻 CPP
字号:
/*____________________________________________________________________________
		Copyright (C) 2002 PGP Corporation
        All rights reserved.

        $Id: MoreVxdWraps.cpp,v 1.2 2002/08/06 20:10:50 dallen Exp $
____________________________________________________________________________*/

#include "pgpClassesConfig.h"
#include "MoreVxdWraps.h"

_USING_PGP

// Wrappers

void 
Exec_VxD_Int(UINT interrupt, VxdIntRegs *pRegs)
{
	pgpAssertAddrValid(pRegs, VxdIntRegs);

	_asm
	{
		pushad							; save current regs

		mov	edx, pRegs					; get address of input regs

		push	[edx].flags				; prepare input flags
		popfd

		mov	eax, [edx].eax				; prepare the input regs
		mov	ebx, [edx].ebx
		mov	ecx, [edx].ecx
		mov	edi, [edx].edi
		mov	esi, [edx].esi
		mov	edx, [edx].edx

		push	interrupt				; push interrupt number
		VMMCall(Exec_VxD_Int)			; execute the interrupt

		push	edx						; save edx
		mov	edx, pRegs					; load regs structure into edx
		pop	[edx].edx					; store the saved edx

		pushfd							; push the flags
		pop [edx].flags					; store the pushed flags

		mov	[edx].eax, eax				; store the altered regs
		mov	[edx].ebx, ebx
		mov	[edx].ecx, ecx
		mov	[edx].esi, esi
		mov	[edx].edi, edi

		popad							; restore current regs
	}
}

void 
NAKED 
_cdecl 
_GlobalTimeoutCallback()
{
	_asm
	{
		push	ecx
		push	[edx]GlobalTimeoutThunk.refData
		push	ebp
		push	ebx
		call	[edx]GlobalTimeoutThunk.callback
		add		esp, 16
		ret
	}
}

void 
NAKED 
_cdecl 
_RestrictedEventCallback()
{
	_asm
	{
		push	ecx
		push	[edx]RestrictedEventThunk.refData
		push	ebp
		push	ebx
		call	[edx]RestrictedEventThunk.callback
		add		esp, 16
		cld
		ret
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -