
还没用过2009版,只用过8.5版的,build->distributions->manage distributions,加入需要打包的程序
文件,一般就选你整个
工程下的所有文件就可以了主要软件修正版本: N/A次要软件: N/A解答: 如果想在程序执行中调用指定的DLL
函数,而不将任何DLL加入工程文件,你需要使用Windows SDK函数“LoadLibrary”和“GetProcAddress”。以下是一段例子代码:// File: RUNTIME.C// Sample code that uses LoadLibrary and GetProcAddress to access myFunction from MYDLL.DLL.// You will need to include stdio.h and windows.h in your project to use this code#include #include typedef VOID (*MYPROC)(LPTSTR)VOID main(VOID){HINSTANCE hinstLibMYPROC ProcAddBOOL fFreeResult, fRunTimeLinkSuccess = FALSE// Get a handle to the DLL module.hinstLib = LoadLibrary("mydll")// If the handle is valid, try to get the function address.if (hinstLib != NULL){ProcAdd = (MYPROC) GetProcAddress(hinstLib, "myFunction")// If the function address is valid, call the function.if (fRunTimeLinkSuccess = (ProcAdd != NULL))(ProcAdd) ("message via DLL function\n")// Free the DLL module.fFreeResult = FreeLibrary(hinstLib)}// If unable to call the DLL function, use an alternative.if (! fRunTimeLinkSuccess)printf("message via alternative method\n")}注意:在LabWindows/CVI中,所有的SDK函数都是以DLL的形式存在的。LabWindows/CVI与其外部编译器都包含了部分SDK函数的DLL引导库。大部分常用的SDK函数都包含在以下四个引导库中:kernel32.libgdi32.libuser32.libadvapi.libLabWindows/CVI 在启动时会自动加载这四个库,并在链接时进行搜索以解析引用内容。因此,你不必将这些引导库加入工程文件。如果LabWindows/CVI 链接器报告SDK函数引用失败,你就必须将相关引导库加入工程文件。参考SDK具体函数的帮助,判断是否要将引导库加入工程文件。引导库文件都在cvi\sdk\lib目录下。更多关于使用Windows SDK函数的信息可以到Microsoft Developer Network(见相关链接)寻找。可以。不知你用的CVI哪个版本?举个例子,细节可能因版本有所差别。
在工程窗口中,选择【Build】/【Creat Distribution Kit】,d出生成软件包对话框。
设置安装程序的默认目录、生成的安装程序所在的目录、设置安装程序是否安装Run-Time Engine(这个通常一定要安装)等等。
再把程序所需所有文件添加进去。
评论列表(0条)