bellevt.cpp
来自「一个使用VtoolsD类库处理硬件中断的VxD应用」· C++ 代码 · 共 45 行
CPP
45 行
// BELLEVT.CPP - implementation of class BellEvent
// Copyright (c) 1995, Vireo Software, Inc.
//
// Class BellEvent provides a simple illustration of how to use class
// VGlobalEvent from the VtoolsD class library. Its purpose is to allow
// code that runs at interrupt level to sound a signal tone. An event
// is necessary to do this, because VSD_Bell cannot be called at interrupt
// level.
//
// To use this class, allocate an instance and call member function "call"
// or member function "schedule". Like all classes derived from VEvent, it
// is safe to use new at interrupt level, and the object is automatically
// deleted after the handler runs.
#include <vtoolscp.h> // Primary include file for VtoolsD classlib
#include <vsd.h> // Include file for Virtual Sound Device
#include "bellevt.h" // Include file for this class
// Function
// BellEvent::BellEvent - constructor
//
// Remarks
// Creates an instance of class BellEvent, which is derived from
// VGlobalEvent.
//
BellEvent::BellEvent(VOID) : VGlobalEvent(0) {}
// Function
// BellEvent::handler - handler for BellEvent
//
// Input
// hVM Handle of current virtual machine
// pRegs Pointer to client register structure
// refData not used
//
// Remarks
// Calls VSD_Bell to sound a half-second tone.
//
//
VOID BellEvent::handler(VMHANDLE hVM, CLIENT_STRUCT* pRegs, PVOID refData)
{
VSD_Bell(); // returns immediately
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?