c# asp.net是如何 获取外部设备的消息?
这几个消息在 asp.net 里如何获得吗?有一个录音电话耳机,在它提供的函数进行二次开发,
我已经可以从PC上发送指令到Phone,如果挂断电话的时候Phone会发送一个消息到PC,asp.net是如何获取此消息的,哪位大侠给指点以下!!!!!
以下是此设备的API 函数说明
#ifndef _USBDLL_H_
#define _USBDLL_H_
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the USBDLL_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// USBDLL_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef USBDLL_EXPORTS
#define USBDLL_API __declspec(dllexport)
#else
#define USBDLL_API __declspec(dllimport)
#endif
#include <wtypes.h>
#include <initguid.h>
#define RECORD_LOCAL 0
#define RECORD_TALK 1
#define RECORD_LY 2
// the following functions' definition and macros' definition are the APIs for USB protocol
//----from Phone to PC--------------------------
/*
//设备连接时发此消息(指USB线与PC和终端电话都连接好).
//参数wParam:(BYTE)序号; lParam: 0L.
*/
#define WM_DEVICECONNECT WM_USER+701
/*
//设备断开时发此消息(指USB线与PC或终端电话的任一方断开时发此消息).
//参数wParam:(BYTE)0L--全部断开; lParam: 0L.
// 1L--断开一台话机; lParam: (BYTE)序号
*/
#define WM_DEVICEDISCONNECT WM_USER+702
/*
//呼叫建立,即摘机时发送此消息.
//参数wParam:(BYTE)序号; lParam: 0L.
*/
#define WM_OFFHOOK WM_USER+703
/*
//呼叫断开,即挂机时发送此消息.
//参数wParam:(BYTE)序号; lParam: 0L--挂机,1L--终端在保留的状态下按免提键退出了保留.
*/
#define WM_ONHOOK WM_USER+704
/*
//来电时发送来电号码.
//参数wParam:(BYTE)序号; lParam:char*.
//普通的号码长度>1;如果长度是1,号码是2,那代表“出局”,号码是1,那代表“保密”。
*/
#define WM_CALLERID WM_USER+705
/*
//来电响铃发此消息.
//参数wParam:(BYTE)序号; lParam: (BYTE)0x01—表示一次铃声响;0x00—表示此次铃声结束
*/
#define WM_RING WM_USER+706
/*
//通话过程中,收到本端DTMF键值时,发此消息.
//参数wParam: (BYTE)序号; lParam: char.
*/
#define WM_KEY WM_USER+707
/*
//留言过程中,话机接听电话,停止留言,发此消息.
//参数wParam: (BYTE)序号; lParam: 0L.
*/
#define WM_STOPLY WM_USER+708
/*
//通话过程中,收到话机按“静音”键
//参数wParam: (BYTE)序号; lParam: (BYTE)0x01--静音开启;0x00--静音关闭.
*/
#define WM_MUTE WM_USER+709
extern "C" {
//---------from PC to Phone-------------------------
// 若无说明,则返回 0 代表成功
USBDLL_API int _stdcall InitDll(); //初始化,仅调用一次
USBDLL_API int _stdcall OffHookCtrl(int iDevIdx); //发送摘机命令
USBDLL_API int _stdcall HangUpCtrl(int iDevIdx); //发送挂机命令
USBDLL_API int