LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write to port directly with visual C++ in Windows 2000

Hi,
My part of original program is in dll to write port directly in Win98. Now the OS is changed to Win2k, I downloaded the accessHW.zip, and the in port.vi and out port.vi could work. I want to change this to a dll file, can you tell me how to do it? which files should be included in the c header file? I noticed there are inp and outp functions in the accessHW.c. Do they exist in the utility.h? I didn't find the utility.h file in my PC. Thanks!
0 Kudos
Message 1 of 5
(2,509 Views)
You don't use Visual C++ to create a dll from a LabVIEW VI. You use the NI application builder. For help with C++, there's com.lang.c++.leda and comp.lang.c++.moderated.
0 Kudos
Message 2 of 5
(2,509 Views)
Hi Dennis,
Thank you for your reply! Maybe I should say clearly. To replace part of my LV software to dll file, I usually do in the usual way: use LV call library function to call the dll file edited by visual c++.
there are many disscussion about accessHW in the forum,but I didn't get a clue how to write a simple c file to read and write port directly. I do not want to use dig_in_prt() and dig_out_prt().
0 Kudos
Message 3 of 5
(2,509 Views)
The AccessHW DLL was written in LabWindows/CVI. CVI has built-in support for writing to a port directly becuase it places those calls down to the kernel level so that the functions have the correct access rights. If you want to call similar functions in VC++ yourself, you will need to create a kernel level process and call the functions from there. Or, you could create your project in LabWindows/CVI.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 4 of 5
(2,509 Views)
Hi, Randy,
Thanks! I solved the problem.
0 Kudos
Message 5 of 5
(2,509 Views)