LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Receiving windows messages from the Desktop

I am trying to edit the Windows Messages for Labview DLL provided here: http://zone.ni.com/devzone/cda/epd/p/id/4394 to receive messages from desktop rather than the labview window calling the functions.  I am not having much success, I suspect due to my lack of familiarity with the windows hook functions.  So far I've tried changing the thread ID value in the SetWindowsHookEx functions to 0 (which should apply the hooks to everything in local thread) and removing all the checks that pass messages originating from other windows, but I'm  no longer receiving any messages in labview.  Any help is appreciated.

0 Kudos
Message 1 of 3
(2,557 Views)

Hi,

 

It looks like this is a very old example and I can't even open up the example. It seems like this has to do with the windows api but we do not have a simple solution for this.

Carl W.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 3
(2,532 Views)

Intercepting Windows messages of a different process is a lot more difficult than simply installing a message hook. It requires debugging APIs that will only work with administrative priviliges and sometimes even elevated rights, meaning the process has to be started explicitedly as Administrator eventhough you are already logged in as a user with Administrator rights.

 

So what is this going to be used for? If it is for a production type application that will be used by normal users, it is basically not possible without creating a huge security hole in the systems you want to deploy this tool to.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 3
(2,513 Views)