c++ - How can I build the Windows 7 Credential Provider Samples using Visual Studio 2012? -
i'm working on creating custom credential provider wrapper. windows 7 sdk sample credential provider wrapper of want plan start , make modifications need to.
i have run small problem however. use visual studio 2012 development work. samples created using visual studio 2008. have been able build , use sample providers when using visual studio 2008. however, when attempt import project visual studio 2012, compile fine doesn't work when try use it.
i have been able validate using windbg credential provider loading when on lock/login screen nothing displays. unfortunately don't know more windbg able trace down problem using tool.
i have seen suggestion come elsewhere while researching problem regarding problems occur when compile credential provider 64-bit machine using win32 platform. using 64-bit machine , have made sure i'm compiling using x64 platform in both versions of visual studio.
also worth mentioning, after doing vs2008 vs2012 conversion seemed take place no issues, had change "runtime library" setting "multi-threaded dll (/md)" "multi-threaded (/mt)". original setting in vs2008 project. possible credential provider "work" (aka not throw error missing dll dependency) without making change, had first install visual c++ redistributable visual studio 2012. making change removes dependency.
any suggestions on how can resolve problem , compile credential provider samples in vs2012?
update
after getting vs2008 , vs2012 installed on same machine able change "platform toolset" property "visual studio 2012 (v110)" "visual studio 2008 (v90)". once change made compilation worked , credential provider worked had when compiling using vs2008 directly. no other settings changed test. can work solution seems though should able work using vs2012 platform toolset i'd prefer not settle on yet because vs2008 linker can buggy.
it turns out release of windows 8 , subsequent change credential providers, starting visual studio 2012, constant clsid_passwordcredentialprovider began point v2 password credential provider rather v1 password credential provider (the version windows 7 uses). in order wrapped credential provider sample compile correctly, 1 testing, necessary change following line in csampleprovider.cpp:
hr = cocreateinstance(clsid_passwordcredentialprovider, null, clsctx_all, iid_ppv_args(&punknown));
to instead point v1 credential provider:
hr = cocreateinstance(clsid_v1passwordcredentialprovider, null, clsctx_all, iid_ppv_args(&punknown));
once done , project recompiled , installed worked expected.
additional information problem can found at: http://social.msdn.microsoft.com/forums/windowsdesktop/en-us/376d6eb6-1a40-4721-abdc-27870966a1da/how-can-i-build-the-windows-7-credential-provider-samples-using-visual-studio-2012?forum=windowsgeneraldevelopmentissues
Comments
Post a Comment