From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why receive error C2365: 'Occur' : redefinition; previous definition was 'function' while trying to programm like the ni example windows_messaging_que.zip

Hello,

 

I try to detect WM like I saw it in a ni example (windows_messaging_que.zip). When I compile my code I always receive error C2365. I declare Occure as FARPROC like the examplecode too. In the extcode.h is Occur already defined as a function TH_PROTECTED MgErr _FUNCC Occur(Occurrence o); .

 

This part is from the example:

FARPROC Occur; //A function pointer to the Occur function inside LabVIEW.exe

 

Has anyone an idea to fix that problem?

 

Best regards, AndreasE

0 Kudos
Message 1 of 3
(4,479 Views)

I made a new test. I tried to build solution with the original code I found here: http://zone.ni.com/devzone/cda/epd/p/id/4394 Same error will be issued.

0 Kudos
Message 2 of 3
(4,461 Views)
Hello Andreas,

attached you’ll find the modified “Windows Messages for LabVIEW MT.cpp” file.
I was able to compile the file, after I modified it.
You can use your “Diff tool” in your IDE  to see the differences.

Kind regards
Ulrich
AE NICER

Message 3 of 3
(4,412 Views)