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

📄 bthsagw_mdd.cpp

📁 CE下基于PXA255的蓝牙驱动
💻 CPP
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
#include "btagw_reg.h"
#include <initguid.h>
#include <bt_sdp.h>

DWORD RegisterBthDevice(BT_ADDR bta, HANDLE* phDevice)
{
	if (! phDevice) {
		return ERROR_INVALID_PARAMETER;
	}
	
	PORTEMUPortParams pp;
	memset (&pp, 0, sizeof(pp));
	pp.device = bta;
	pp.uuidService = HeadsetServiceClass_UUID;
	
	*phDevice = RegisterDevice (L"BSP", 1, L"btd.dll", (DWORD)&pp);
	if (*phDevice == 0) {
		return GetLastError();
	}
		
	return ERROR_SUCCESS;
}

DWORD DeregisterBthDevice(HANDLE hDevice)
{
	if (hDevice) {
		return DeregisterDevice(hDevice) ? ERROR_SUCCESS : GetLastError();
	}

	return ERROR_SUCCESS;
}

⌨️ 快捷键说明

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