DLL Load Library – Error Code 126

Windows dll error 126 can have many root causes. The most useful methods I have found to debug this are: Use dependency walker to look for any obvious problems (which you have already done) Use the sysinternals utility Process Monitor https://learn.microsoft.com/en-us/sysinternals/downloads/procmon from Microsoft to trace all file access while your dll is trying to load. … Read more

Register comdlg32.dll gets Regsvr32: DllRegisterServer entry point was not found

comdlg32.dll is not a COM DLL and cannot be registered. One way to confirm this for yourself is to run this command: dumpbin /exports comdlg32.dll You’ll see that comdlg32.dll doesn’t contain a DllRegisterServer method. Hence RegSvr32.exe won’t work. That’s your answer. ComDlg32.dll is a a system component. (exists in both c:\windows\system32 and c:\windows\syswow64) Trying to … Read more

error Please #define _AFXDLL or do not use /MD[d] occurs even after making changes in Project Properties

On Visual Studio 2011, this worked for me: Project -> “project” Properties -> Configuration Properties -> General -> Project Defaults -> Use of MFC : Use MFC in a shared DLL (In Visual Studio 2019, the latter setting can be found in “Properties -> Configuration Properties -> Advanced -> Use of MFC“

Set Custom Path to Referenced DLL’s?

From this page (untested by me): Somewhere in your program’s initialization (before you access any classes from a referenced assembly) do this: AppDomain.CurrentDomain.AppendPrivatePath(@”bin\DLLs”); Edit: This article says AppendPrivatePath is considered obsolete, but also gives a workaround. Edit 2: Looks like the easiest and most kosher way to do this is in the app.config file (see … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)