Jun 172013
 

Hello everyone,

Today I wanted to talk a little bit about a common problem a lot of our SDK developers run into involving Internet Explorer’s Protected Mode. Protected Mode was introduced in IE 7 alongside Windows Vista and was designed to prevent malicious code from being executed in an IE process. Protected mode essentially forces the IE process to run with very restricted privileges, preventing any unwanted executables or code from being run. Any operation from loading an ActiveX control to writing to the registry could potentially be blocked by Protected Mode.

So, what does all this mean to a DYMO SDK developer? A lot of our developers load our SDK in their web applications by using ActiveX controls. As mentioned earlier, if IE is running in Protected Mode and a web application attempts to load an ActiveX control, this operation will be blocked. Luckily, Microsoft has provided a way to securely allow web apps to load ActiveX controls: Trusted Sites.

Any site that is marked as “trusted” will have more privileges than one that does not. To allow a site to load ActiveX controls, users must specifically add a site to the trusted zone. This ensures that the user is in full control of what is allowed to run in their browser. If you are using ActiveX controls and your users are having troubles running your DYMO SDK application, your first step should be to ensure your site has been added to the trusted zone. Below are a couple of links to information about Internet Explorer’s Protected Mode and also a walk through on how to add a site to the trusted zone.

Understanding Protected Mode

Adding a site to the trusted zone

Jun 252010
 

If you are using the DYMO SDK from a .NET application you might run into a problem where the application throws an exception when trying to instantiate DymoAddin or DymoLabels objects. The error message is like this:

System.Runtime.InteropServices.COMException (0x80040154). Retrieving the COM class factory for component xxxx failed due to the following error: 80040154

To fix this try the following:

  • make sure you have the latest DYMO Label v.8 installed. The latest version is always available from the download section on dymo.com. currently the latest version is 8.2.2.996
  • if you are running on 64-bit Windows make sure you compile your application as 32-bit (switch TargetPlatform from default AnyCpu to x86). See this and this. If you can’t change the TargetPlatform, try the beta SDK that adds 64-bit support
  • reimport interop references to SDK libraries. Remove Interop.Dymo.dll from the project settings; add reference to “DLS7 Compatibility COM Type Library 1.0” COM library; recompile your application.