To follow up on what jwf said, check out the LabVIEW Resource Library in the NI Developer Zone. Go to http://www.ni.com/zone and click the link for "Resource Library". Then go to LabVIEW >> Connectivity >> DLL Integration. This section of the library has a number of tutorials on creating DLLs with LabVIEW 6i. You will find example code there, too.
Dieter
Dieter Schweiss
Applications Engineer
National Instruments