07-10-2009 12:43 PM
Hi all,
I use the PrintTextFile function to print messages and would like to warn users if for whatever reason the printer does not print. I have some code that check for printer error but I have to use windows SDK.
I notice that CVI base does not come with Win32 API's. I have installed Windows SDK from Microsoft and linked the winspool.lib library to my code. The software works great on my machine, but when I install the software on another machine, it complained missing a function from dll library and quits. (Don't remember the exact error message now).
Is this a windows related error or CVI linking error? Can I link dll library from Windows SDK?
Thanks in advance,
YL
Solved! Go to Solution.
07-13-2009 05:01 PM
The code is already compiled, so it's not a linking error. What is the exact error message?
On the development machine, you can check which dependencies are being loaded by setting a breakpoint in your code and going to Window»Modules. Check if those DLLs exist on the target machine.
07-14-2009 09:59 AM
I get this error "The procedure entry point RegisterForPrintAsyncNoticifations could not be located in the dynamic link library WINSPOOL.DRV".
When I was checking for dependencies on my development machine, I did not see any other DLL loaded up other than my executable. I dig a little and found out that I added winspool.lib into my executable. When I removed this library from my executable, the error went away.
Thanks Mark.
YL