get_printer("CURRENTDEVICE") question (OpenInsight 16-Bit Specific)
At 24 MAR 2010 08:03:27AM Sean Bartram wrote:
OS: Windows XP SP3
I am using the get_printer function to retrieve the windows default printer with perfect results on all my Win XP SP3 machines except one. Debugging the process on this machine reveals that the function is returning a null. My question is: Is there some windows .dll file that OI is using to pull this information, that may be missing or corrupt on this one machine?
Thank you!
At 24 MAR 2010 08:35AM Bob Orsini wrote:
Sean, the value is returned by the OIPI OCX vsprint7.ocx. However it depends on what version of OI you are using.
At 24 MAR 2010 09:10AM Sean Bartram wrote:
OI v. 7.2.1
I did a search for the vsprint7.ocx on a working system and did not find it. Is this on the server? And if it is, do you have any idea why would it not function on one machine, when I have identical machines working properly?
At 24 MAR 2010 05:17PM Bob Orsini wrote:
It would be in the OI root of OI. Are you using the get_printer command after doing the set_printer('init'.
At 25 MAR 2010 06:37AM Bill Caisley wrote:
I apologise if I am stating the obvious here.
OCX registration can be a minefield. Let us say that the working stations have the OCXs registered to the server path and point to the files in your OI directory there. Then letÂ’s say that on the non-working station the OCXs are registered pointing to somewhere else that also contains OCX files, there is a possibility that the OCXs could be out of date or not there anymore. I have come across instances where the OCXs are registered locally on the workstation so that updated OCXs on the server are never utilised.
So on a working station and the non-working station you Run ] Regedit ] Edit ] Find note the path. Do this for all OCXs on both working and non-working stations and ensure that they are the same.
At 29 MAR 2010 11:02AM Sean Bartram wrote:
I am not doing a set_printer before the get_printer and it works perfectly on all the machines except this one. Going to look at the registry entries for the OCXs and update this thread. Thanks!
At 29 MAR 2010 12:50PM Sean Bartram wrote:
Ok, turns out that this machine was not cloned like all the rest, so it did not have the OI install on it, hence, no .ocx files. Installed OI on the machine and pointed the registry entries to the server (like the working machines) and voila! get_printer function works! Thanks!!