+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

LL12: LlSetPrinterInPrinterFile() issue when in VMWare

(Guest) #1

When printing from DLL following code fails in LL12 running XP in VMware seession.
ln_ret := LlSetPrinterInPrinterFile(ln_job, LL_PROJECT_LIST, lc_name, -1, cRemPrPort, cDevMode)
ln_ret := LlPrintStart(ln_job, LL_PROJECT_LIST, lc_name, LL_PRINT_NORMAL)
the same code runs on PC w/o VMWare

Very same code works in LL9 in both scenarios.
here are the logs: LL12:
CMLL12 : 11:54:23.343 000007ec [XPPRT1.dll] LlSetPrinterDefaultsDir(1,‘C:\DOCUME~1\devteam\LOCALS~1\Temp’)
CMLL12 : 11:54:23.359 000007ec [XPPRT1.dll] =0
CMLL12 : 11:54:23.375 000007ec [XPPRT1.dll] LlSetPrinterInPrinterFile(1,2,‘CPC_DetailManifest.LST’,-1,’\DEVTEST03\HPLASERJ’,0x124f6390)
CMLL12 : 11:54:23.390 000007ec [XPPRT1.dll] OpenPrinter(\DEVTEST03\HPLASERJ) fails
CMLL12 : 11:54:23.390 000007ec [XPPRT1.dll] =-18
CMLL12 : 11:54:23.406 000007ec [XPPRT1.dll] LlPrintStart(1,2,‘CPC_DetailManifest.LST’,0x00000100,0)

CM32L9:30:28.046 @LlSetPrinterDefaultsDir(1,‘C:\DOCUME~1\devteam\LOCALS~1\Temp’)
CM32L9:30:28.046 =0
CM32L9:30:28.062 @LlSetPrinterInPrinterFile(1,2,‘CPC_DetailManifest.LST’,-1,\DEVTEST03\HPLASERJ,0x124f8958)
CM32L9:30:28.062 =0
CM32L9:30:28.078 @LlPrintStart(1,2,‘CPC_DetailManifest.LST’,0x00000100,0)

The printer is shared and all users have permissions to print, manage printers and manage documents.
List & Label : CMLL12.DLL [12,13,0,0 (07-06-20 16:54)]
Any advice what to try next.

(Guest) #2

Try opening a command shell and entering

“net use \devtest03”

If that succeeded, run your application again. Does it work now?


(Guest) #3

Thanks for reply,
net use \devtest03 succeeded but
still doesn’t work.

(Guest) #4

The Logs say "OpenPrinter() fails.

Assuming this is the Windows API “OpenPrinter()”, this means that the user(s) do NOT have access to use that resource in the VM.

Newer versions of List & Label do have much more detailed printer logging, so you should consider upgrading, at least to run a trial version to test whether you get more information, either about the reason of the failure, or that the current version does not fail.

You say “Printing from DLL” - you don’t run the DLL in IIS or as a service?


(Guest) #5

Passing the printer name instead of the UNC resolved the issue.
Thanks for the help.