Window Clippings 2.1.22 ... and Add-Ins!

I know I said I was going to start focusing on the upcoming 2.5 release but I needed to make some minor improvements to the way Window Clippings handles external add-ins as a few users have asked about this.

As usual, you can get the update via the “Check for Updates” button on the About tab. New users can download the latest version from http://www.windowclippings.com/.

 

There are a number of improvements to the way add-ins are handled.

Enable/disable external add-ins

You now have the option to enable or disable all external add-ins. External add-ins are disabled by default. Simply click the checkbox on the Add-Ins tab to tell Window Clippings that you’d like it to load external add-ins. Disabling external add-ins can improve performance as Window Clippings doesn’t have to search for any registered add-ins. The performance impact is particularly noticeable with .NET add-ins that need to be JIT-compiled as they are found and loaded.

Registering .NET add-ins with UAC turned off

Window Clippings will now properly register .NET add-ins if you have turned UAC off. The corresponding WindowClippings.dll version 2.1.22 is required to support this.

.NET add-in versioning

Add-ins developed using the 2.0 version of the Window Clippings assembly won’t load by default using Window Clippings 2.1 since the .NET Framework’s runtime (CLR) checks the version of the dependent assembly. Fortunately the CLR allows you to override this default behavior with a configuration file letting it know that a particular version should redirect to the newer version of the Window Clippings assembly. Here is what the configuration file should look like to map Window Clippings 2.0.28 to 2.1.22:

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="WindowClippings"
                          publicKeyToken="4fe954bdf3e14227"
                          culture="neutral" />
        <bindingRedirect oldVersion="2.0.28.0"
                         newVersion="2.1.22.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

The Send to FTP add-in

I’ve repackaged the Send to FTP add-in that Ari Glaizel developed. The zip file contains the original add-in plus the latest version of WindowClippings.dll as well as the configuration file described above. If you’d like to use this add-in simply copy all the files and paste them into the folder containing WindowClippings.exe and then register WC.Extension.SendToFtp.dll using the “Register Add-In” button.

The Add watermark add-in

Similarly I’ve repackaged the Add watermark add-in (that I wrote last year with source code as an example). The zip file contains the original add-in plus the latest version of WindowClippings.dll as well as the configuration file described above. If you’d like to use this add-in simply copy all the files and paste them into the folder containing WindowClippings.exe and then register Kerr.WindowClippings.FilterWatermark.dll using the “Register Add-In” button.

I hope you enjoy using Window Clippings!

© 2008 Kenny Kerr

Published Monday, April 07, 2008 11:32 PM by KennyKerr
Filed under:

Comments

# re: Window Clippings 2.1.22 ... and Add-Ins!

Thursday, May 08, 2008 7:32 AM by Inferis

Hey Kenny,

I can't get an addin I developed (or am trying to) to register. WindowClippings borks with "The Addin failed to register" and "The system cannot find the file specified".

I'm using version 2.1.28.0, might that be the problem. I tried using several combinations of the assembly versioning in windowclippings.config, to no avail.

Any ideas?

# re: Window Clippings 2.1.22 ... and Add-Ins!

Thursday, May 08, 2008 7:47 AM by KennyKerr

Inferis: Registering .NET add-ins can be challenging in the current release. Here are a few pointers that might help.

If you’re building your own add-in then just make sure you’re using the latest version of both WindowClippings.exe (currently 2.1.28) as well as the latest version of WindowClippings.dll (also currently 2.1.28). That way you don’t need a config file.

Registration requires in most cases (based on .NET COM interop rules) that all the files are in the same directory. For example WindowClippings.exe, WindowClippings.dll and “YourAddIn.dll” must all be in the same directory in order to register successfully. This isn’t strictly necessary but it does simplify things for the CLR loader.

When testing the registration be sure to close the Options window and open it again. This way the .NET Framework is reloaded as needed and any CCWs are unloaded.

Don’t forget to include the ComVisible attribute to allow COM to access your assembly types.

# re: Window Clippings 2.1.22 ... and Add-Ins!

Thursday, May 08, 2008 7:51 AM by Inferis

Never mind that, I missed the part that they had to be in the same directory.

I don't get an error anymore now (not with my own addin, but I do get a "failed to register" with the sample you provide), but the addin doesn't show up in the addins list. Nothing else happens (no feedback, ...).

# re: Window Clippings 2.1.22 ... and Add-Ins!

Thursday, May 08, 2008 7:58 AM by Inferis

Ah, great, it works. It seems I had the 2.1.22.0 dll, and not the 2.1.28.0 version.

You might want to update: www.windowclippings.com/developers, since it provides the 2.1.22.0 dll and not the 2.1.28.0.

Thanks for the help.

# re: Window Clippings 2.1.22 ... and Add-Ins!

Thursday, May 08, 2008 8:02 AM by KennyKerr

Inferis: Great I’m glad you got it working. Thanks for the heads up – I’ll get that web page updated.

# re: Window Clippings 2.1.22 ... and Add-Ins!

Thursday, May 08, 2008 8:37 AM by Inferis

Here's my plugin, in case you're interested: codedump.blergh.be/.../windowclippings-and-skitch

# re: Window Clippings 2.1.22 ... and Add-Ins!

Thursday, May 08, 2008 9:26 AM by KennyKerr

Inferis: Nice!