串列埠通訊之控制項註冊

2021-05-24 09:56:14 字數 1285 閱讀 1974

摘自-----http://www.cnblogs.com/edward259/archive/2009/08/21/1551463.html

#include

#include

#include

void cpfile(char file);

void regsted();

void regocx();

void cpfile(char file,char tarpath) //將三個檔案拷貝到系統目錄

*p = '/0';

p=strchr(path,'/0');

q=file;

strcpy(p,q);

p=strchr(tempsys,'/0');

*p = '//';

p++;

q=file;

strcpy(p,q);

copyfile(path,tempsys,false);

}void regsted() //將相關資訊寫入登錄檔

}void regocx()//呼叫新程序註冊元件

;char ocxfile[50]="/mscomm32.ocx ";

char regfile[50]="/regsvr32.exe ";

char *p,*q;

getsystemdirectory(windowsdir, 256);

p=commandline;

q=windowsdir;

strcpy(p,q);

p=strchr(commandline,'/0');

q=ocxfile;

strcpy(p,q);

p=strchr(windowsdir,'/0');

q=regfile;

strcpy(p,q);

p=commandline;

q=&lastcommandline[1];

strcpy(q,p);

lastcommandline[0]=' ';

// 啟動regsvr32.exe作為子程序

bool ret = createprocess(windowsdir, lastcommandline, null, null, false, 0, null, null, &si, &pi);

if(ret)

}int apientry winmain(hinstance hinstance,

hinstance hprevinstance,

lpstr lpcmdline,

int ncmdshow )

QT之串列埠通訊

qt串列埠通訊 qt串列埠資料接收不完整 串列埠通訊 serial communications 的概念非常簡單,串列埠按位 bit 傳送和接收位元組。儘管比按位元組 byte 的並行通訊慢,但是串列埠可以在使用一根線傳送資料的同時用另一根線接收資料。它很簡單並且能夠實現遠距離通訊。乙個衡量符號傳輸...

Qt之串列埠通訊

事實證明,在不知所措的時候,去google或者baidu一下,還是很明智的。當初本來準備照著書本一步步學c 然後再學qt,半途發現 這顯然是個相當漫長的計畫,但是,我卻迷失在密密麻麻的 裡,不能自拔。對於我來說,這簡直是最最低效率的學習方式。有個學習目標還是比較適合我的,比如,一點點看別人寫好的長長...

串列埠通訊 串列埠通訊原理

1 rs232介面 rs232 c介面聯結器一般使用型號為db 9的9芯插頭座,只需3條介面線,即 傳送資料 接收資料 和 訊號地 即可傳輸資料,其9個引腳的定義如圖11 3所示。圖11 3 rs232 c介面聯結器定義 在rs232的規範中,電壓值在 3v 15v 一般使用 6v 稱為 0 或 o...