10-23-2009 10:54 PM
Isn't that ancient technology?
If they were able to figure out how to use something that old, you'd think they'd be smart enough to find the real website, or at least know it exists.
10-24-2009 09:04 AM
<OT>
Ravens Fan wrote:
smercurio_fc wrote:
I think that poster is probably accessing the forums through a newsreader and not a web browser.
Isn't that ancient technology?
Indeed. If you think about it so is HTML, but it's so entrenched I don't know it it will ever go away.
</OT>
10-24-2009 05:11 PM
Jason,
You're right. I had skipped over Muks' reply. Thanks for calling my attention to it.
The zip file, Windows Message Library_8_5.zip, does not include
Windows Messages for LabVIEW.dll. I downloaded the zip file that contains the
DLL and extracted the DLL file. My antivirus software claims that it is infected with
the Trojan horse BackBoor.RBot.FM. I tried to compile the source code, but
Microsoft Visual C++ 6.0 reports:
error C2373: 'Occur' : redefinition; different type modifiers
c:\program files\national instruments\labview 8.5\cintools\extcode.h(854) : see declaration of 'Occur'
Also, this DLL appears to be able to receive messages, but not post them.
Thanks,
Hamilton Woods
10-24-2009 05:16 PM
Okay. I confess. I posted to a usenet news group. Then someone
thankfully directed me to this forum.
I'm not very smart. That's why I'm having to post my question. My
excuse is that I'm from Alabama.
Hamilton Woods
10-24-2009 08:38 PM
Hamilton Woods wrote:
I downloaded the zip file that contains the DLL and extracted the DLL file. My antivirus software claims that it is infected with the Trojan horse BackBoor.RBot.FM.
I do not get that with my antivirus software. I suspect you are seeing a false positive. You might want to try an online scanner from another company.
The DLL you have is limited to receiving messages. If you want to post messages then you need to modify the DLL or just write a new one. What you are asking to do is handled by the operating system, and you have to write your own interface for that since LabVIEW doesn't handle that.
10-25-2009 10:05 AM
Hamilton Woods wrote:Jason,
error C2373: 'Occur' : redefinition; different type modifiers
c:\program files\national instruments\labview 8.5\cintools\extcode.h(854) : see declaration of 'Occur'
Also, this DLL appears to be able to receive messages, but not post them.
Occur() was not defined in earlier extcode.h files so it is defined in the headers of the example DLL. Just remark that declaration out from the example DLL file and you should not see that error anymore
And yes this example won't do what you need. In fact it does the much more complicated thing of the two, hence the need for an external DLL.
For what you need you can simply use the Call Library node to call into the RegisterWindowMessageA() API to register your messages and then use SendMessageA() or PostMessageA()to send the message. You do need to find the window handle of your target application somehow to pass to Send/PostMessageA() but that should be obvious from your Delphi example how they suggest to do it. This could be for instance a call to the FindWindowA() API.
10-25-2009 11:07 AM
And here's where I have to admit I missed the part about posting messages rather than just receiving. The Windows API call is also something I hadn't thought of (palm slaps forehead). Thanks Rolf - I'll have to remember that one in the future...
Jason
10-25-2009 06:11 PM
Jason P wrote:The Windows API call is also something I hadn't thought of (palm slaps forehead). Thanks Rolf - I'll have to remember that one in the future...
Errr.... Those Windows messaging VIs that you looked at do precisely that. How do you think they worked? Rolf is suggesting to call the Windows API functions directly from LabVIEW using the Call Library Function Node, which you can easily do as well. Sometimes, though, the Windows API functions require complex parameters that cannot be easily handled in LabVIEW, which is why you must sometimes resort to using a wrapper DLL.
10-25-2009 07:21 PM
It's the direct call part that I hadn't thought of, which made me realize I had a bit of a blind spot in my thinking. My background is in physics, not programming - I got into LV long before I understood what was under the hood... and I still have a bad habit of using the crutches I used in the beginning. Getting stuck with DLLs that aren't strictly necessary is part of that. Speaking as someone who spends a significant amount time working on installers, I'm happy any time I can strip away extra parts.
Jason
10-25-2009 09:44 PM