views:

47

answers:

3

Hi! I can't seem to find any walk-trough on how to create a MFC DLL using Visual Studio 2008. My problem is the following. I need to use wininet.h with my DLL and my solution to that was to use MFC DLL. Anyhow trying to link my project gives me 5 Link errors
I believe that the error is of a kind that I need to add Additional Library Directories. But which one should I add?

void ClearHandles(void) //close all open handlers if any
void SetClientCert(void) //try to set a cert if possible
void FindCertWithOUNITName(void) //This function performs a certificate contex search

All help would be appreciated! I would even appreciate links to tutorials or walk-throughs using a DLL with MFC.

+1  A: 

Add Crypt32.lib to your lib dependencies under Linker/Input - Additional dependencies:

alt text

Michael Goldshteyn
That gives me the following error http://bit.ly/9TKzwE
Java Dude
thank you very much... I've got it working now. The picture was great and easy to understand :)
Java Dude
+1  A: 

You need to add crypt32.lib to your list of dependencies for the DLL. You can find this in the MSDN page for the API, for example here.

Requirements

Minimum supported client Windows 2000 Professional

Minimum supported server Windows 2000 Server

Header Wincrypt.h

Library Crypt32.lib

DLL Crypt32.dll

Steve Townsend
now I get the following error http://bit.ly/9TKzwE
Java Dude
@Java Dude - do you have VS2008 SP1? See here : http://stackoverflow.com/questions/2001289/how-to-resolve-fatal-error-lnk1000-internal-error-during-incrbuildimage
Steve Townsend
thank you very much... I've got it working now. Your information was very helpful
Java Dude
A: 

The Linker IncrBuildImage error is described here:

http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/801ba6d7-a284-4b5d-a75b-3652138d6dff

Perhaps the hotfix would help

Jeff