經驗證,可通過下述函式獲取藍芽虛擬串口號。
int getdevicecom(void)
tchar szbuf[max_path];
sp_devinfo_data spdevinfodata = ;
// 開始列舉裝置
dword i = 0;
cstring str1,str2;
for( i = 0;setupdienumdeviceinfo(hdevinfo,i,&spdevinfodata);i++)
// 得到裝置例項的唯一標識id(由登錄檔路徑組成)
if(setupdigetdeviceinstanceid(hdevinfo,&spdevinfodata,szbuf,max_path,null))
*/ // 得到裝置名稱
if(setupdigetdeviceregistryproperty(hdevinfo,&spdevinfodata,spdrp_devicedesc,null,(pbyte)szbuf,max_path,null))
// 得到裝置型號
if(setupdigetdeviceregistryproperty(hdevinfo,&spdevinfodata,spdrp_friendlyname,null,(pbyte)szbuf,max_path,null))
}
/*// 得到裝置在登錄檔中的子路徑
if(setupdigetdeviceregistryproperty(hdevinfo,&spdevinfodata,spdrp_driver,null,(pbyte)szbuf,max_path,null))*/}
//printf("/nport count = %d/n",i);
//getchar();
return iportnum;
}
vs2008環境下使用zlib庫
2.工程裡 編寫 include pragma comment lib,zdll.lib 即可開始呼叫zlib的api函式 3.1 int compress bytef dest,ulongf destlen,const bytef source,ulong sourcelen 把源緩衝壓縮成目的緩...
NTL使用方法(VS2008環境下)
首先必須要有ntl.lib,這是我們通過源 手動生成的,具體方法參考前一篇部落格 vs2008生成 lib檔案 接著我們測試ntl是否能用,具體步驟如下 檔案 新建 專案 空專案,專案名為ntl test,然後將winntl 5 5 2 include的整個目錄,winntl 5 5 2 tests...
VS2008下OpenCV 2 3環境的搭建
1 2 檔名 cmake 2.8.6.zip 1 解壓opencv2.3 到目錄d development opencv 2.3 1 安裝 cmake 軟體,並依次配置如下 1 配置路經 路經不能存在中文,否則會生成失敗。where is the souce code opencv2.3解壓目錄 w...