Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2005

Tip: Looking for answers? Try searching our database.

Link error: missing function AlphaBlend from msimg.dll

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
noleander - 30 Jun 2005 01:25 GMT
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().  

I'm calling dozens of other Microsoft bitmap and imagery functions without
error.  

The MS documentation says that AlphaBlend is in msimg32.dll.   I have this
file, in folder C:\Windows\System32.

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 file".

Two questions:
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?

2) Assuming that AlphaBlend is inside msimg32.dll, how can I tell Visual C++
linker do use that DLL to resolve the missing symbol?

Thanks in advance for any help,
 neal

=== HERE is the original linker error ==============
TestPlugIn error LNK2019: unresolved external symbol __imp__AlphaBlend@44
referenced in function "void __cdecl drawMemoryImageIntoWindow(unsigned char
*,unsigned int,unsigned int,class VSTGUI::CFrame *,unsigned int,unsigned
int,unsigned char)"
(?drawMemoryImageIntoWindow@@YAXPAEIIPAVCFrame@VSTGUI@@IIE@Z)
William DePalo [MVP VC++] - 30 Jun 2005 02:32 GMT
> 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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.