SelectThreadIdealProcessor
I use the LW/CVI FDS 7.0. I have a programme of work to acquire data at the same time a data acquisition card and two serial devices. I now need to add another sensor that acts as a TCP/IP server. I have worked successfully with the new sensor that communicates via TCP/IP using a test program. In my data acquisition program, I will acquire new data the main thread sensor because it is intensive reminder for TCP/IP communications and use a second thread for the existing DAQ card and two serial ports. If the program is unable to obtain the data fast enough, I want to assign the second thread for the second processor on the computer. The white paper NOR 'Multithreading in LabWindows/CVI' says setting the preferred processor for a thread using the 'SetThreadIdealProcesssor' Win32 API function LW/CVI will automatically search the SDK Windows/for unresolved references after searching for the libraries of LW. When I try to compile the exe, I get an error in 'Unresolved Reference' linker for the function "SetThreadIdealProcesssor". By examining the NEITHER provided the files 'sdkfuncs.txt' and 'sdkfuncs_base.txt', no reference to the "SetThreadIdealProcesssor" is located. I found the function prototype in the file "winbase.h. I was unable to find "SetThreadIdealProcesssor" in any file where LW/CVI is installed with the exception of a .pdf on multithreading file and the file "winbase.h.
Is or is not the "SetThreadIdealProcesssor" included with LW/CVI FDS 7.0? If Yes, where and how I reference to bind. I have add "windows.h" and "winbase.h" as include files to try to resolve the problem without success.
I saw a forum a few years ago, but there was no resolution.
Are you sure that it is a mistake to link that you see and not a compilation error? The problem I see is that the function in winbase.h prototype has a guard preprocessor around it (probably because that feature was added only in Windows 2000). These guardians of preprocessor to protect against using the use inadvertently a function does not much sense, since what matters is the version of the operating system when you run your program, not the version with which you compile.
In all cases, you should be able to work around this problem by adding the following to the top of your source code (before include windows.h):
#define _WIN32_WINNT 0 x 0500
After that, you should get is no longer a link error. Let me know if this isn't the case.
Moreover, the implementatin function is in C:\Program NIUninstaller Instruments\CVI70\sdk\lib\msvc\kernel32.lib. You don't have to add this library to the project.
Luis
Tags: NI Software
Similar Questions
Maybe you are looking for
-
I just got 38.2.0 of Thunderbird and I want to be able to customize, as indicated in the subject of this question. I can find how to proceed for the toolbars, but, not for the context menus. Thanks for your help. BTW - I think I will like the new imp
-
My computer said that there a configuartion problem audio. Help!
My computer said that there a problem audio configuartion, Ive a re-intsalled itunes and quicktime. Ive been in the part of Device Manager and he said nothings wrong. Ive restared my computer about 4 times now, but it always happens. And it won't pla
-
Windows Vista will not stop or restart
When I try to quit or restart my computer, the screen indicates "SHUTTING DOWN", then the display shuts off, the power light goes off on the tower but increases the speed of the fan at maximum speed and the unit will continue to operate in this way u
-
Can I install Windows Journal on a Mac computer?
Can I install Windows Journal on a Mac computer? I currently use Windows Journal to teach by posting paper documents on a smart board. The administration requires me to switch to a Mac, but I don't want to lose the Journal and its capabilities. I