Why is Visual Studio 2015 adding stdole.dll and Microsoft.AnalysisServices.AdomdClient.dll to my project?

As others indicated, stdole.dll is a Primary Interop Assembly for a bunch of Office COM interop components. You can determine why it’s getting included in your project by doing the following. In Visual Studio, go to Tools > Options > Projects and Solutions > Build and Run. Change the “MSBuild project build output verbosity” setting … Read more

How to determine whether a DLL is a managed assembly or native (prevent loading a native dll)?

Answer quoted by lubos hasko is good but it doesn’t work for 64-bit assemblies. Here’s a corrected version (inspired by http://apichange.codeplex.com/SourceControl/changeset/view/76c98b8c7311#ApiChange.Api/src/Introspection/CorFlagsReader.cs) public static bool IsManagedAssembly(string fileName) { using (Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read)) using (BinaryReader binaryReader = new BinaryReader(fileStream)) { if (fileStream.Length < 64) { return false; } //PE Header starts @ 0x3C … Read more

How to add external native dependency dll?

You may try this: Add/Existing Item, instead of Add Reference. Use Add As Link. Make sure the item is to be copied in build folder. In the property of the library in VS, set Build Action to Content and Copy to Output Directory to Copy if Newer. Done. Rebuild and test. Suggested in the link … Read more

Can a Windows dll retrieve its own filename?

I think you’re looking for GetModuleFileName. http://www.swissdelphicenter.ch/torry/showcode.php?id=143: { If you are working on a DLL and are interested in the filename of the DLL rather than the filename of the application, then you can use this function: } function GetModuleName: string; var szFileName: array[0..MAX_PATH] of Char; begin FillChar(szFileName, SizeOf(szFileName), #0); GetModuleFileName(hInstance, szFileName, MAX_PATH); Result := … Read more

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