이전에 만들었던 Code Generator의 일부 버그 수정

Ver 1.2.0.0
- 2차원 배열일때의 줄넘김 문제
- 일부 텍스트 변경
- 버튼을 아이콘 버튼으로 변경


[원문] http://digital.ni.com/public.nsf/allkb/70995EC2CA1B523386256DD4004F3DE6

Calling a LabVIEW DLL from a CVI or other C/C++ project

Primary Software: LabVIEW Development Systems
Primary Software Version: N/A
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem: I compiled a DLL in LabVIEW but I can't figure out how to call it from CVI, Visual C/C++, or other Windows development environment.

Solution: When you build a DLL in LabVIEW, three files are created: the DLL file, a LIB file, and an H file (the C/C++ header file). The DLL file contains the functionality that you programmed in LabVIEW, the LIB file contains a stub for loading and calling the DLL function, and the H file contains a function prototype for calling the function that is contained in the LIB file (which ultimately calls the DLL). To use the code in another environment, you can call the DLL directly using LoadLibrary() and GetProcAddress() functions in the Windows SDK or you can link your project with the LIB file and header file so that you simply call the function by name as though it were already in your project. The latter is the easiest and preferred method for most beginning programmers. To do this:

  • Add the LIB file to your C/C++ project.
  • Include the H file at the top of the source file where you want to call your DLL function by using the #include preprocessor directive.
  • Point your compiler to find other LabVIEW .h files like extcode.h, fundtypes.h, and platdefines.h in the C:\Program Files\National Instruments\LabVIEW\cintools subdirectory. These header files define certain types used by LabVIEW and sometimes passed in and out of LabVIEW code depending on your DLL. If LabVIEW is not installed on the development machine, you will need to copy these .h files from the cintools directory to a location where the development computer can find them.
  • Call the function by its name and parameters as specified in the header file.

Note that the LabVIEW runtime engine includes supporting functions that are required for any code built with LabVIEW and used on another computer. The appropriate version of the runtime engine is required to execute a DLL.

Related Links: KnowledgeBase 28185EQO: LabVIEW Run-Time Engine Requirments for DLL Execution

Attachments:

Report Date: 2003-11-04
Last Updated: 2005-11-05
Document ID: 3337DOV4
이전에 만들었던 프로그램 수정본..

프로그램에서 불러서 저장하기 전에 미리 ini 파일을 미리 만들어 볼수 있도록 추가..
ini파일 작성시 설명 부분과 변수 설정 부분을 추가로 만들수 있도록 함.



사용자 삽입 이미지


CODEGene.zip





'1.소프트웨어 이야기 > devkyy.My Develope Program' 카테고리의 다른 글

Virtual Tree Test 프로그램..  (1) 2008.01.11
GUI TEST  (0) 2007.12.27
간단한 TCP/IP 테스트  (0) 2007.12.06

+ Recent posts