ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

kernel32.dll

Hi all,

I'm trying to use the Call Library Function VI to call GetKeyboardState
from kernel32.dll as suggested below. I put the VI on my diagram and
right click to configure. Then I pick the dll from the
c:\windows\system directory. It gives me a list of functions in the dll
to choose from but GetKeyboardState is not one of them. I'm using
Windows95 and the version of kernel32.dll is version: 4.03.1212. Do I
have an old version of the dll?

Has anyone had success using this function call from this dll? Also, if
this is a result of an older version of the dll, is it possible to just
copy the dll from a Windows98 box? Will that screw other things up?


Thanks,
stephen




>Hi,
>
>You could use de windows dll GetKeyboardState (kernel32.d
ll) to monitor
if
>ALT+key is pressed. It is not ideal, because it requires a while loop
to
>call this dll all the time. If a key, mouse button, or combination, is
>pressed, you can trigger a boolean, or whatever you want.
>
>To call the dll, use a numeric 8 bit as output, stdcall(WINAPI) as
calling
>convention and a 8 bit array as first (and only) argument (with Array
Data
>Pointer as Array Format). Wire a 8 bit array to argument1, filled with
256
>dummy values. If a value is pressed, the corresponding array element
changes
>to 128.
>
>Regards,
>
>Wiebe Walstra.
>
>--
>AIR technical Automation
>www.air.nl
>"Stephen Gray" wrote in message
>news:39F735F4.2BD9EA8A@swri.org...
>Does anyone know of a way that I can attach the keyboard sequence
>F10 to a control in Labview. I've used the key navigation
>successfully to make use of the Control and shift modifiers, but I
>REALLY need to use the modifier. Anyone know of a work around?
>BTW - I'm using Labview 6i u
nder Windows95.
>
>Thanks,
>Stephen
0 Kudos
Message 1 of 5
(4,500 Views)
According to the MS Site, getkeyboardstate is in user32.dll, not
kernel32.dll. I'm not in a postition to check who's right, at the
moment...

Stephen Gray wrote:
>
> Hi all,
>
> I'm trying to use the Call Library Function VI to call GetKeyboardState
> from kernel32.dll as suggested below. I put the VI on my diagram and
> right click to configure. Then I pick the dll from the
> c:\windows\system directory. It gives me a list of functions in the dll
> to choose from but GetKeyboardState is not one of them. I'm using
> Windows95 and the version of kernel32.dll is version: 4.03.1212. Do I
> have an old version of the dll?
>
> Has anyone had success using this function call from this dll? Also, if
> this is a result of an older version of the dll, is it possible to just
> copy the dll from a Windows98 box? Will that screw other things up?
>
> Thanks,
> stephen
>
> >Hi,
> >
> >You could use de windows dll GetKeyboardState (kernel32.dll) to monitor
> if
> >ALT+key is pressed. It is not ideal, because it requires a while loop
> to
> >call this dll all the time. If a key, mouse button, or combination, is
> >pressed, you can trigger a boolean, or whatever you want.
> >
> >To call the dll, use a numeric 8 bit as output, stdcall(WINAPI) as
> calling
> >convention and a 8 bit array as first (and only) argument (with Array
> Data
> >Pointer as Array Format). Wire a 8 bit array to argument1, filled with
> 256
> >dummy values. If a value is pressed, the corresponding array element
> changes
> >to 128.
> >
> >Regards,
> >
> >Wiebe Walstra.
> >
> >--
> >AIR technical Automation
> >www.air.nl
> >"Stephen Gray" wrote in message
> >news:39F735F4.2BD9EA8A@swri.org...
> >Does anyone know of a way that I can attach the keyboard sequence
> >F10 to a control in Labview. I've used the key navigation
> >successfully to make use of the Control and shift modifiers, but I
> >REALLY need to use the modifier. Anyone know of a work around?
> >BTW - I'm using Labview 6i under Windows95.
> >
> >Thanks,
> >Stephen
0 Kudos
Message 2 of 5
(4,500 Views)
I'm terribly sorry, it is User32.dll. I'll mail you (Stephan) our
implementation to make it up...

Regards,

Wiebe Walstra.

--
AIR technical Automation
www.air.nl
"Bruce Bowler" wrote in message
news:3A01D868.A0B6348E@bigelow.org...
According to the MS Site, getkeyboardstate is in user32.dll, not
kernel32.dll. I'm not in a postition to check who's right, at the
moment...

Stephen Gray wrote:
>
> Hi all,
>
> I'm trying to use the Call Library Function VI to call GetKeyboardState
> from kernel32.dll as suggested below. I put the VI on my diagram and
> right click to configure. Then I pick the dll from the
> c:\windows\system directory. It gives me a list of functions in the dll
> to choose from but GetKeyboardState is not one of them. I'm using
> Windows95 and the version of kernel32.dll is version: 4.03.1212. Do I
> have an old version of the dll?
>
> Has anyone had success using this function call from this dll? Also, if
> this is a result of an older version of the dll, is it possible to just
> copy the dll from a Windows98 box? Will that screw other things up?
>
> Thanks,
> stephen
>
> >Hi,
> >
> >You could use de windows dll GetKeyboardState (kernel32.dll) to monitor
> if
> >ALT+key is pressed. It is not ideal, because it requires a while loop
> to
> >call this dll all the time. If a key, mouse button, or combination, is
> >pressed, you can trigger a boolean, or whatever you want.
> >
> >To call the dll, use a numeric 8 bit as output, stdcall(WINAPI) as
> calling
> >convention and a 8 bit array as first (and only) argument (with Array
> Data
> >Pointer as Array Format). Wire a 8 bit array to argument1, filled with
> 256
> >dummy values. If a value is pressed, the corresponding array element
> changes
> >to 128.
> >
> >Regards,
> >
> >Wiebe Walstra.
> >
> >--
> >AIR technical Automation
> >www.air.nl
> >"Stephen Gray" wrote in message
> >news:39F735F4.2BD9EA8A@swri.org...
> >Does anyone know of a way that I can attach the keyboard sequence
> >F10 to a control in Labview. I've used the key navigation
> >successfully to make use of the Control and shift modifiers, but I
> >REALLY need to use the modifier. Anyone know of a work around?
> >BTW - I'm using Labview 6i under Windows95.
> >
> >Thanks,
> >Stephen
0 Kudos
Message 3 of 5
(4,500 Views)
Hi,

We've added GetKeys.vi to our library. If anyone's interrested, feel free to
download it...

Regards,

Wiebe Walstra.
0 Kudos
Message 4 of 5
(4,500 Views)
Bruce Bowler wrote:

> According to the MS Site, getkeyboardstate is in user32.dll, not
> kernel32.dll. I'm not in a postition to check who's right, at the
> moment...
>

Could you post the URL to the place on the MS Site? I have not been able to
find it.

Ed
0 Kudos
Message 5 of 5
(4,500 Views)