dll

Why do we need to link kernel32.dll, user32.dll, etc… in Windows C++?

。_饼干妹妹 提交于 2020-12-12 02:07:03
问题 Why does Visual Studio by default include Additional Dependencies of kernel32.dll, user32,dll, winspool.lib, etc...? Why do these resources need to be linked into C++ projects on Windows and are they actually turned into machine code and inserted directly into each executable or are they kept separate from the executable and a link is made between them at run-time? 回答1: In order for a C++ application to run under windows, it needs at least a few system services. For example, it needs to

Getting Version of already loaded DLL (Windows API)

╄→гoц情女王★ 提交于 2020-12-08 02:20:52
问题 ok, getting the file version of a dll before loading, is easy. im using GetFileVersionInfoSize + GetFileVersionInfo + VerQueryValue and it works like a charm. but what if the dll is already loaded? i know you can use LoadLibrary + IMAGE_DOS_HEADER + IMAGE_NT_HEADERS to retrieve certain information such as the function names etc. i noticed that IMAGE_OPTIONAL_HEADER has different version fields such as MajorImageVersion & MinorImageVersion etc. i tried pretty much everything, but those fields

Getting Version of already loaded DLL (Windows API)

柔情痞子 提交于 2020-12-08 02:20:23
问题 ok, getting the file version of a dll before loading, is easy. im using GetFileVersionInfoSize + GetFileVersionInfo + VerQueryValue and it works like a charm. but what if the dll is already loaded? i know you can use LoadLibrary + IMAGE_DOS_HEADER + IMAGE_NT_HEADERS to retrieve certain information such as the function names etc. i noticed that IMAGE_OPTIONAL_HEADER has different version fields such as MajorImageVersion & MinorImageVersion etc. i tried pretty much everything, but those fields

How to link a function declared as extern in .h file, to create a .dll file?

守給你的承諾、 提交于 2020-12-06 07:29:05
问题 I want to create a dynamic library(.dll) for one of the components written in C++, used in my work. Couple of functions are declared as extern in a .h file and being refernced in the corresponding .cpp file. While linking them i'm getting Unresolved symbol error. xxxx.obj : error LNK2019: unresolved external symbol "int __cdecl run_xxx(int,char * * const,struct st_xx *)" (?run_xxx@@YAHHQEAPEADPEAUst_xx@@@Z) referenced in function "int __cdecl start_xx(int,int,int,char * * const)" (?start_xx@

How to use DLLs with dependencies at install AND uninstall time in Inno Setup?

帅比萌擦擦* 提交于 2020-12-04 04:04:14
问题 I want to import two dlls in my .iss when uninstalled the app. I cannot find a way to do this. procedure Installed(); external 'Installed@files:StatisticInstallInfo.dll,adcore.dll cdecl setuponly '; procedure Uninstalled(); external 'Uninstalled@{app}\StatisticInstallInfo.dll cdecl uninstallonly'; I want import adcore.dll in procedure Uninstalled too. And it's failed as below shows; [Files] Source: {#MyDefaultPackDir}\adcore.dll; DestDir: "{app}" Source: {#MyDefaultPackDir}

Why is this NuGet dependency missing when compiling .NET Framework project depending on .NET Standard?

↘锁芯ラ 提交于 2020-12-02 18:56:59
问题 I have a Visual Studio solution, with 3 projects. The top level is a .NET Framework 4.6.1 Console App (Project A). It depends on a .NET Framework 4.6.1 Class Library (Project B). Project B depends on a .NET Standard 2.0 Class Library (Project C). I have some code in Project C that uses System.Data.SqlClient (NuGet package version 4.6.1). Due to the following known issue https://github.com/dotnet/sdk/issues/901 I have also added System.Data.SqlClient as a NuGet dependency to Project B (the

Why is this NuGet dependency missing when compiling .NET Framework project depending on .NET Standard?

筅森魡賤 提交于 2020-12-02 18:28:49
问题 I have a Visual Studio solution, with 3 projects. The top level is a .NET Framework 4.6.1 Console App (Project A). It depends on a .NET Framework 4.6.1 Class Library (Project B). Project B depends on a .NET Standard 2.0 Class Library (Project C). I have some code in Project C that uses System.Data.SqlClient (NuGet package version 4.6.1). Due to the following known issue https://github.com/dotnet/sdk/issues/901 I have also added System.Data.SqlClient as a NuGet dependency to Project B (the

Dynamically load DLL files in C# project - how?

拜拜、爱过 提交于 2020-11-30 05:31:50
问题 In my project I need to use plugins. But to use these in my project I need to import an reference of the plugin. Since I can't know how many or which plugins the project uses beforehand I would like to import them dynamically in my project. String path = Application.StartupPath; string[] pluginFiles = Directory.GetFiles(path, "*.dll"); ipi = new IPlugin[pluginFiles.Length]; Assembly asm; for (int i = 0; i < pluginFiles.Length; i++) { string args = pluginFiles[i].Substring( pluginFiles[i]

Dynamically load DLL files in C# project - how?

对着背影说爱祢 提交于 2020-11-30 05:29:43
问题 In my project I need to use plugins. But to use these in my project I need to import an reference of the plugin. Since I can't know how many or which plugins the project uses beforehand I would like to import them dynamically in my project. String path = Application.StartupPath; string[] pluginFiles = Directory.GetFiles(path, "*.dll"); ipi = new IPlugin[pluginFiles.Length]; Assembly asm; for (int i = 0; i < pluginFiles.Length; i++) { string args = pluginFiles[i].Substring( pluginFiles[i]

Dynamically load DLL files in C# project - how?

前提是你 提交于 2020-11-30 05:28:02
问题 In my project I need to use plugins. But to use these in my project I need to import an reference of the plugin. Since I can't know how many or which plugins the project uses beforehand I would like to import them dynamically in my project. String path = Application.StartupPath; string[] pluginFiles = Directory.GetFiles(path, "*.dll"); ipi = new IPlugin[pluginFiles.Length]; Assembly asm; for (int i = 0; i < pluginFiles.Length; i++) { string args = pluginFiles[i].Substring( pluginFiles[i]