/*draven*/ wrote:
> but for the pointer that's certainly my problem
> this is the sourcecode of my function. I drive a digital to analogue
> converter and I want to select the exit (There is 4 exit 0x00,01,10,11
> )and a voltage (0 to 255 in décimal):
> void __stdcall dac_sortie_tension (int sortie, int tension)
> {
> outp(LPT1+0x000,4); /* not important*/
> outp(LPT1+0x400,sortie);
> outp(LPT1+0x000,2); /* ecriture de l'adresse2*/
> outp(LPT1+0x400,0x00); /* not important*/
> outp(LPT1+0x000,3); /* not important*/
> outp(LPT1+0x400,tension);/*write voltage*/
> }
Unless you run on Windows 9x or ME you cannot use outp or inp at all. An
application is not allowed to access hardware directly under any Windows
NT type version as well as Lin
ux and other modern OSes. It will simply
generate a general protection fault error and in LabVIEW 6.1 and higher
this will result in a LabVIEW dialog telling you to shutdown LabVIEW.
Before LabVIEW 6.1 you get a Windows dialog not even giving you the
chance to choose if you want to restart LabVIEw.
If you try to do this under Windows NT/2000/XP/2003 you need a device
driver to access those ports. LabVIEW comes already with the according
functions called InPort and OutPort in the Advanced function palatte.
Rolf Kalbermatter
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390