> I'm trying to call the Microsoft image-processing function AlphaBlend() in
> my
> Visual C++ application. My software compiles okay, but gets a link error
> (details below) that says it cannot find the symbol AlphaBlend().
OK.
> The MS documentation says that AlphaBlend is in msimg32.dll. I have this
> file, in folder C:\Windows\System32.
That's good.
> I tried to add file msimg32.dll to my Visual C++ link (using "Additional
> Dependencies") but VIs C__ rejects msimg32.dll as a "invalid or corrupt
[quoted text clipped - 3 lines]
> 1) Why is the linker not finding AlphaBlend() when it is able to find all
> the other MS functions I call, including BitBlt() and many others?
Well, it is the job of the linker to statically add object modules to the
executable, or to leave information for the loader to patch the references
in your code to function at runtime. To perform the latter function it needs
what is called an "import" library.
You need to add msimg32.lib to your project.
> 2) Assuming that AlphaBlend is inside msimg32.dll, how can I tell Visual
> C++
> linker do use that DLL to resolve the missing symbol?
Enter the name of the import library msimg32.lib in the edit box
Project->Properties->Linker->Input->Additional Dependencies
The folder that contains the library will need to be one of the folders that
the linker searches for libraries.
Tools->Options->Projects->VC++ Directories
FWIW, I don't do much GDI, but on this box that folder is below a part of
the Platform SDK tree and not VS.Net 2003 tree.
Regards,
Will
noleander - 30 Jun 2005 02:55 GMT
Thanks for the tip.
I tried it and it works.
> > I'm trying to call the Microsoft image-processing function AlphaBlend() in
> > my
[quoted text clipped - 41 lines]
> Regards,
> Will