简体   繁体   中英

Windows Password Filter DLL not loading

I am attempting to implement a very basic windows password filter in C++ based on the examples in this devx article

However LSA is not loading the DLL (nothing in the loaded modules in msinfo32), despite the appropriate reg entry being set and the DLL being copied into system32 and reboot. this happens on 2003 x64 and 2008R2 (obviously also x64). I have searched stackoverflow and implemented all recommendations so far.

I am using VS2012. It is set to x64 and /MT (so I don't need the redist right?) and I have ensured the .def file is referenced correctly. In dependency walker I can see the three functions exported correctly, although it says "At least one module has an unresolved import due to a missing export function in an implicitly dependent module." and claims that kernel32.dll is missing some imports (not sure whether that is relevant).

How can I debug what is happening at the time the LSA should be loading the DLL? NB I am not a developer so some of the above is rather hazy, especially around the behaviour when compiling/linking and when exporting functions.

many thanks

After reviewing the info at: https://support.microsoft.com/en-us/kb/2686224

I found the information we were following to NOT specify the path and file extension was incorrect for server 2012. I updated the registry with this info, and put the x64 dll in the System32 folder, along with msvcp100.dll and msvcr100.dll (from the system32 dir of the machine i compiled the dll on). Reboot, test, BAM!

Check your system event logs, look for ERROR entries for Directory-Services-SAM It will either say: The password notification DLL C:\\Windows\\System32\\PasswordFilterRegEx.dll failed to load with error 126 -or- The password notification DLL C:\\Windows\\System32\\PasswordFilterRegEx.dll failed to load with error 193

126 means it couldnt find the dll itself (likely missing path in registry entry) or there are missing dependencies (msvcp100.dll and msvcr100.dll in my case)

193 means it cant load the dll due to architecture mismatch (eg you are running a 32 bit OS but trying to load a 64 bit dll, or vice versa)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM