Reference to ImageMagickObject.dll could not be added

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
cweger

Reference to ImageMagickObject.dll could not be added

Post by cweger »

Hi,

Total newbie to ImageMagick. Trying to install and test on Windows 7 using Visual Studio 2010, Visual Basic.

Downloaded the recommended installer "ImageMagick-6.6.2-6-Q16-windows-dll.exe", which ran OK. Tested from command line, and it works.

However, when I try to add a reference to the ImageMagicObject DLL in Visual Basic, it complains "A reference to C:\Program Files\k-6.6.2-Q16\ImageMagickObject.dll could not be added. Please make sure the file is accessible, and that it is a valid assembly or COM component."

What am I doing wrong?

Thanks in advance for any help!

-Chuck
cweger

Re: Reference to ImageMagickObject.dll could not be added

Post by cweger »

Problem solved. Once again, this is Microsoft protecting us from ourselves.

I had to register the DLL manually, going the extra mile by running REGSVR32.EXE as Administrator.

NOTE that you can't just be logged on as an Admin in Windows 7, you have to do it THIS way (at least, this is the voodoo that worked for me):

1. Click the Start Button, then in the "Start Search" box type CMD but DO NOT press Enter yet.
2. Right-click on CMD that appears at the top, and choose "Run as Administrator", then "Continue"
3. In the command line window that appears, type this:
REGSVR32 C:\Program Files\ImageMagick-6.6.2-Q16\ImageMagickObject.DLL

Presto! Now Visual Studio can recognize the DLL when you Add Reference.

Every day that I use Windows, I wish I was using Mac or Linux.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Reference to ImageMagickObject.dll could not be added

Post by el_supremo »

Thanks for that info about registering the object yourself. I am the only user on this machine and had assumed that I didn't need to do this because when I install IM I have admin privileges anyway.
The only change I had to make was that the pathname must be in quotes because it contains a space character:

Code: Select all

REGSVR32 "C:\Program Files\ImageMagick-6.6.2-Q16\ImageMagickObject.DLL"
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Post Reply