I have an executable built on windows xp sp3, with labview 2011 and the Vision Development Module that I run on a Windows 7 64 bit machine.
Under some mysterious circumstances the combination of IMAQ WindSetup, IMAQ WindZoom 2, IMAQ WindDraw (and the maybe unecessary) IMAQ WindShow, fails to display my image on the screen.
I've added log messages and the code executes fine, the window (acquired through a DLL) has proper dimensions and then gets stuck on IMAQ Construct ROI, as I can't see the window to construct the ROI and hit the OK button. The same combination in apparently very similar execution sequences works fine. The code has worked fine under LV 7 development, LV 7 executables, etc. Not sure where to look ...
When you say the window was acquired through a DLL does that mean you are acquiring a window handle using the user32.dll or are you using an IMAQ dll? The windows dll may behave differently depending on what operating system you are using. Also, are you using LabVIEW or text based to do your coding? Posting a small portion of your code that reproduces this error may be helpful.
Does this error also occur on windows 7 32 bit? Post a ready to run version and I run it on my 32 bit Windows 7 system to see if the same error occurs.
Image is aqcuired through a custom DLL (written in C) that interfaces to the camera vendor's 32 bit API then I pass the image pointer to Labview using an IMAQ mapping call. This code works fine with XP32 bits, both under development or as an executable, and the image grabbing part sill works fine with the 32 bit executable under Win 7 64.
Eventually that image (or part of the image, or a processed image) is displayed using an IMAQ wind draw call (and wind show, which may not be needed), which is supposed to map a window and show the image, and it does all the time under XP, but with the 32 bit exec running under Win 7 64, most of the time it doesn't. I know it executes fine as I added log output after each call, the code gets there with no error.
It's like LabVIEW runtime thinks the window is already mapped when it isn't. I added a close all (IMAQ image display) windows call before the wind draw and then it seems to work more often, but not always. This was not needed before.
Would you be able to post a sample of code that utilizes IMAQ wind draw but does not behave as expected? I've done some searches and am not seeing any known compatibility issues with this function and windows 7.
Sample image attached (hopefully), but note that I'm not sure this is strictly "this function and windows 7". I have LabVIEW 2011 64 bits installed on this machine, a Windows 7 64 bit machine but the code below runs on an executable that was created on another Windows XP 32 bits machine, with LabVIEW 2011 32 bits and the Vision Dev Module 2011 (probably 32 bits). That VI/function works properly in LV7/Windows XP 32 bits, be it as an executable or development.
Let me add that I instrumented that VI to make sure that the image was valid (had the proper dimensions) and that the AutoZoom function returns -2 for the window zoom, so a proper zoom for the 2048x1536 image to fit in my display.
I tried building a VI and executable based on the example you posted and ran it on a Windows 7 64bit machine that had LV 64 bit installed. Both the VI and the executable ran as expected. I've tried a few different permutations but nothing behaves unexpectedly. Would you want to run the executable in the zip file to see if runs on your system?