資源簡介
LabVIEW調用第三方采集卡板,必須調用DLL庫文件才可以驅動板卡采集數據,該資源內包含其調用的所有例程

代碼片段和文件信息
/*
This?program?is?designed?to?be?built?into?a?DLL?and?called?from?LabVIEW.??Each?function
that?is?marked?DLLEXPORT?can?be?called?from?third?party?code.??These?functions?are
identical?to?the?generate?and?sort?example.??
*/
#include? //?includes?the?ansi_c?and?windows?libraries
#include?
int?__stdcall?DllMain?(HINSTANCE?hinstDLL?DWORD?fdwReason?LPVOID?lpvReserved)
{ ?//?main?DLL?function
return?TRUE;
}
/*
The?purpose?of?this?function?is?to?generate?an?array?of?random?numbers?of?the?size
ARRAYSIZE.??Each?number?will?be?an?integer?between?0?and?100.??The?numbers?are?seeded?
by?time?plus?an?offset.??The?array?is?passed?into?this?function?by?reference
*/
void?DLLEXPORT?generateRand(int?*iArray?int?ARRAYSIZE)
{
int?i?sTime;
time(&sTime);??//?gets?time?to?seed?the?random?number
?? for?(i=0;i ?? {
?? srand(sTime*100+i*10);??//?seeds?each?random?from?an?offset?of?the?time
?? iArray[i]=rand()*100/RAND_MAX;??//?inserts?the?random?number?into?the?array
?? }
}
/*
The?purpose?of?this?function?is?to?sort?an?array?of?random?numbers.??This?function
uses?the?bubblesort?algorithm?which?has?the?time?complexity?O(n^2).??The?array
is?passed?into?this?function?by?reference.
*/
void?DLLEXPORT?bubbleSort(int?*iArray?int?ARRAYSIZE)
{
int?holder?x?y;
for(x?=?0;?x?????{
???? for(y?=?0;?y??????? {
?????? if(iArray[y]?>?iArray[y+1])??
?????? { //?compares?neighboring?elements?and?swaps?if?necessary
???????? holder?=?iArray[y+1];
???????? iArray[y+1]?=?iArray[y];
???????? iArray[y]?=?holder;
?????? }
}
}
} ?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????206848??2008-04-09?15:51??調用C-動態數據庫\LabVIEW_code_and_DLL\GenSort.dll
?????文件???????2648??2008-04-09?15:51??調用C-動態數據庫\LabVIEW_code_and_DLL\GenSort.lib
?????文件??????18228??2008-04-09?15:57??調用C-動態數據庫\LabVIEW_code_and_DLL\GenSortRandC.vi
?????文件???????1279??2008-04-04?10:47??調用C-動態數據庫\readme.txt
?????文件?????206848??2008-04-09?15:51??調用C-動態數據庫\Source_code_for_dll\CVI?Stuff\GenSort.dll
?????文件???????2648??2008-04-09?15:51??調用C-動態數據庫\Source_code_for_dll\CVI?Stuff\GenSort.lib
?????文件???????1665??2004-01-12?12:07??調用C-動態數據庫\Source_code_for_dll\CVI?Stuff\GenSortRand.c
?????文件???????2866??2008-04-09?16:15??調用C-動態數據庫\Source_code_for_dll\CVI?Stuff\GenSortRand.cws
?????文件???????3904??2008-04-04?10:50??調用C-動態數據庫\Source_code_for_dll\CVI?Stuff\GenSortRand.prj
?????文件???????1699??2004-04-01?20:00??調用C-動態數據庫\Source_code_for_dll\Visual?C++?Stuff\GenSort.cpp
?????文件???????4309??2004-04-01?17:35??調用C-動態數據庫\Source_code_for_dll\Visual?C++?Stuff\GenSort.dsp
?????文件????????539??2004-04-01?20:39??調用C-動態數據庫\Source_code_for_dll\Visual?C++?Stuff\GenSort.dsw
?????文件??????50176??2004-04-02?00:30??調用C-動態數據庫\Source_code_for_dll\Visual?C++?Stuff\GenSort.ncb
?????文件??????48640??2004-04-02?00:30??調用C-動態數據庫\Source_code_for_dll\Visual?C++?Stuff\GenSort.opt
?????文件???????1739??2004-04-01?20:06??調用C-動態數據庫\Source_code_for_dll\Visual?C++?Stuff\GenSort.plg
?????文件???????1619??2004-04-01?17:35??調用C-動態數據庫\Source_code_for_dll\Visual?C++?Stuff\MSVSReadMe.txt
?????文件????????294??2004-04-01?17:35??調用C-動態數據庫\Source_code_for_dll\Visual?C++?Stuff\StdAfx.cpp
?????文件????????802??2004-04-01?17:35??調用C-動態數據庫\Source_code_for_dll\Visual?C++?Stuff\StdAfx.h
?????文件???????1722??2008-04-09?16:12??調用C-動態數據庫\Source_code_for_dll\VS2008\GenSort.cpp
?????文件????????884??2008-04-09?16:07??調用C-動態數據庫\Source_code_for_dll\VS2008\GenSort.sln
?????文件???????8704??2008-04-09?16:54??調用C-動態數據庫\Source_code_for_dll\VS2008\GenSort.suo
?????文件???????6257??2008-04-09?16:06??調用C-動態數據庫\Source_code_for_dll\VS2008\GenSort.vcproj
?????文件????????294??2004-04-01?17:35??調用C-動態數據庫\Source_code_for_dll\VS2008\StdAfx.cpp
?????文件????????802??2004-04-01?17:35??調用C-動態數據庫\Source_code_for_dll\VS2008\StdAfx.h
?????目錄??????????0??2013-12-21?16:09??調用C-動態數據庫\Source_code_for_dll\CVI?Stuff
?????目錄??????????0??2013-12-21?16:09??調用C-動態數據庫\Source_code_for_dll\Visual?C++?Stuff
?????目錄??????????0??2013-12-21?16:09??調用C-動態數據庫\Source_code_for_dll\VS2008
?????目錄??????????0??2013-12-21?16:09??調用C-動態數據庫\LabVIEW_code_and_DLL
?????目錄??????????0??2013-12-21?16:09??調用C-動態數據庫\Source_code_for_dll
?????目錄??????????0??2013-12-21?16:09??調用C-動態數據庫
............此處省略3個文件信息
評論
共有 條評論