LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: Windows 7 DLL call to turn off monitor message crashes LabVIEW 10.0f2

Solved!
Go to solution

Hi,

 

I wanted to log this bug on the forum. I have already logged this with NI UK Support: CAR# 286873

 

I was trying to find a way to turn off a laptop lcd monitor during measurements. I was trying to replicate this

 

http://codereflect.com/2009/04/03/how-to-programmatically-turn-onoff-your-monitor/

 

which uses windows messaging.

 

I found the attached Monitor-1.vi somewhere on the forum that seems to do the above. However when I run the VI it crashes LabVIEW 10.f2 on Windows 7 32-bit.

 

cheers

 

David

 

 

 

 

0 Kudos
Message 1 of 6
(3,329 Views)

If you delete la last frame, and replace "1" with "2" (the last input of DLL) it's working (i'm also in win7, labview 2010)

Message 2 of 6
(3,305 Views)

Hi cosmin,

 

Thats strange I just tried what you suggested but it still kills my LabVIEW. I admit the monitor did switch off however when it came back my LabVIEW was gone.

 

Have you installed LabVIEW 2010 SP1 or still running the original install of LabVIEW without any patches?

 

Many thanks for pitching in.

 

David

0 Kudos
Message 3 of 6
(3,301 Views)

Hi David,

I have 2010f4

0 Kudos
Message 4 of 6
(3,297 Views)
Solution
Accepted by topic author DavidJCrawford

change calling convention to stdcall

Message 5 of 6
(3,295 Views)

Hi Cosmin,

 

That was it! Thank you so much!

 

I will let NI UK support that you identified the issue and get them to close the CAR.

 

cheers

 

David

0 Kudos
Message 6 of 6
(3,293 Views)