Dymo System.Exception: 'Error getting printers' win 10/11

Rinaldo 396 Reputation points
2024-02-26T18:48:17.29+00:00

When running and init the Dymo labelwrtiter i get an error in DYMOSDK.Init() I hope that someone know how to rus this without problems. I was whole weekend busy with it and took my sleep. EntryPointNotFoundException: Kan ingangspunt met de naam SpoolMon_AddListener niet vinden in DLL PrintingSupportLibrary.dll. DYMO.LabelAPI.Windows.Printers.SpoolerMonitorGateway.SpoolerMonitorGateway() in SpoolerMonitorGateway.cs DYMO.LabelAPI.Windows.PrinterDiscovery.WindowsDeviceDiscoveryAgent.CreateNewSpoolerMonitorGateway() in WindowsDeviceDiscoveryAgent.cs DYMO.LabelAPI.Windows.PrinterDiscovery.WindowsDeviceDiscoveryAgent.WindowsDeviceDiscoveryAgent() in WindowsDeviceDiscoveryAgent Stacktrace: DymoSDK.dll!DymoSDK.Implementations.DymoPrinter.GetPrinters() Unknown

VoorraadBeheer.exe!VoorraadBeheer.Classes.DymoPrinters.Initialize() Line 22 C#

VoorraadBeheer.exe!VoorraadBeheer.DymoBarcodePrinter.DymoBarcodePrinter_Load(object sender, System.EventArgs e) Line 51	C#
```the class:

```csharp
using DymoSDK.Implementations;
using DymoSDK.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VoorraadBeheer.Classes
{
    public class DymoPrinters
    {
        public List<IPrinter> DymoPrinterList;
        private IDymoPrinter tmpIDymoPrinter;
        private IDymoLabel tmpIDymoLabel;
        public void Initialize()
        {
            DymoSDK.App.Init();
            tmpIDymoPrinter = DymoPrinter.Instance;
            tmpIDymoLabel = DymoLabel.Instance;
            DymoPrinterList = tmpIDymoPrinter.GetPrinters().Result.ToList();
        }
        public string LoadLabelXml(string LabelPath)
        {
            tmpIDymoLabel.LoadLabelFromFilePath(LabelPath);
            return tmpIDymoLabel.XMLContent;
        }
        public IDymoLabel MakeLabelFromXml(string LabelXml)
        {
            tmpIDymoLabel.LoadLabelFromXML(LabelXml);
            return tmpIDymoLabel;
        }
        public bool PrintLabel(IDymoLabel label, string PrinterName, int amount = 1)
        {
            return tmpIDymoPrinter.PrintLabel(label, PrinterName, amount).Result;
        }
    }
}

I hope this qeustion is not deleted as previous 
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,659 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Rinaldo 396 Reputation points
    2024-02-27T08:28:42.7566667+00:00

    error throw here: in SDK

    	public Task<IEnumerable<DymoSDK.Interfaces.IPrinter>> GetPrinters()
    	{
    		List<Printer> list = new List<Printer>();
    		try
    		{
    			RefreshPrinters();
    			if (_printFactInstance?.Printers != null)
    			{
    				foreach (DYMO.LabelAPI.Interfaces.IPrinter printer in _printFactInstance.Printers)
    				{
    					if (list.FirstOrDefault((Printer f) => f.Name == printer.Name) != null)
    					{
    						continue;
    					}
    					bool isConnected = false;
    					bool isLocal = false;
    					if (Environment.OSVersion.VersionString.Contains("Windows"))
    					{
    						isConnected = SdkPrinterStatusHelper.CheckPrinterIsConnected(printer.Name);
    						isLocal = !SdkPrinterStatusHelper.CheckPrinterIsNetwork(printer.Name);
    					}
    					else
    					{
    						SdkPrinter sdkPrinterForMac = GetSdkPrinterForMac(printer.Name);
    						if (sdkPrinterForMac != null)
    						{
    							isConnected = SdkPrinterStatusHelper.CheckPrinterIsConnected(sdkPrinterForMac);
    							isLocal = !SdkPrinterStatusHelper.CheckPrinterIsNetwork(sdkPrinterForMac);
    						}
    					}
    					list.Add(new Printer
    					{
    						Name = printer.Name,
    						DriverName = printer.DriverName,
    						IsTwinTurbo = (printer.PrinterCommunication is IRollSelection),
    						IsLocal = isLocal,
    						IsAutoCutSupported = printer.IsAutoCutterSupported(),
    						IsConnected = isConnected,
    						PrinterType = ((printer.PrinterFamily == EPrinterFamily.LabelManager || printer.DriverName.Contains("DUO Tape")) ? "TapePrinter" : "LabelWriterPrinter")
    					});
    				}
    			}
    		}
    		catch (Exception ex)
    		{
    			SaveLog("Error getting printers: " + ex.ToString());
    			throw new Exception("Error getting printers", ex);
    		}
    		_printersModelList = list;
    		return Task.FromResult((IEnumerable<DymoSDK.Interfaces.IPrinter>)list);
    	}
    
    
    0 comments No comments

  2. Rinaldo 396 Reputation points
    2024-02-27T18:23:29.7566667+00:00

    Hi, I finally got it working, how?: Copy PrintingSupportLibrary.DLL from DymoConnect folder x86 to root of program
    Copy DYMOPrinting.DLL from x86 folder to root of program The existing DLL where old versions which where from NuGet I saw in de error dialog of visual studio which DLL where missing or entry point could not find I hope it will help others Rinaldo


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.