dll

Version resource in DLL not visible with right-click

谁说我不能喝 提交于 2019-12-28 15:26:39
问题 I'm trying to do something which is very easy to do in the regular MSVC, but not supported easily in VC++ Express. There is no resource editor in VC++ Express. So I added a file named version.rc into my DLL project. The file has the below content, which is compiled by the resource compiler and added to the final DLL. This resource is viewable in the DLL using reshacker, though not when right-clicking the DLL in Windows Explorer. What is missing from my RC file to make it appear when right

Version resource in DLL not visible with right-click

丶灬走出姿态 提交于 2019-12-28 15:25:05
问题 I'm trying to do something which is very easy to do in the regular MSVC, but not supported easily in VC++ Express. There is no resource editor in VC++ Express. So I added a file named version.rc into my DLL project. The file has the below content, which is compiled by the resource compiler and added to the final DLL. This resource is viewable in the DLL using reshacker, though not when right-clicking the DLL in Windows Explorer. What is missing from my RC file to make it appear when right

Import a DLL with C++ (Win32)

荒凉一梦 提交于 2019-12-28 13:21:17
问题 How do I import a DLL (minifmod.dll) in C++ ? I want to be able to call a function inside this DLL. I already know the argument list for the function but I don't know how to call it. Is there a way of declaring an imported function in C++ like in C# ? 回答1: The c# syntax for declaring an imported function is not available in c++. Here are some other SO questions on how to use DLLs: Explicit Loading of DLL Compile a DLL in C/C++, then call it from another program Calling functions in a DLL from

Using JNA to link to custom dll

 ̄綄美尐妖づ 提交于 2019-12-28 12:31:09
问题 how do I access custom .lib / .dll functions using JNA? Can someone provide an example? Thank you. 回答1: Example (from Wikipedia): import com.sun.jna.win32.StdCallLibrary; import com.sun.jna.Native; /** Simple example of Windows native library declaration and usage. */ public class BeepExample { public interface Kernel32 extends StdCallLibrary { // FREQUENCY is expressed in hertz and ranges from 37 to 32767 // DURATION is expressed in milliseconds public boolean Beep(int FREQUENCY, int

How to get the version information of a DLL file in C++

耗尽温柔 提交于 2019-12-28 12:28:14
问题 I need to get the version information of a DLL file I created in Visual Studio 2008 C++. How do I get it? 回答1: Thanks for the answers. This worked for me: WCHAR fileName[_MAX_PATH]; DWORD size = GetModuleFileName(g_dllHandle, fileName, _MAX_PATH); fileName[size] = NULL; DWORD handle = 0; size = GetFileVersionInfoSize(fileName, &handle); BYTE* versionInfo = new BYTE[size]; if (!GetFileVersionInfo(fileName, handle, size, versionInfo)) { delete[] versionInfo; return; } // we have version

Sequential GUIDs

假如想象 提交于 2019-12-28 12:04:48
问题 I hope someone can answer this question. How does the UuidCreateSequential method in the rpcrt4.dll class use to seed it's guids? I know this much: Microsoft changed the UuidCreate function so it no longer uses the machine's MAC address as part of the UUID. Since CoCreateGuid calls UuidCreate to get its GUID, its output also changed. If you still like the GUIDs to be generated in sequential order (helpful for keeping a related group of GUIDs together in the system registry), you can use the

How to fix DWMAPI.DLL delay-load dependency under WinXP?

自古美人都是妖i 提交于 2019-12-28 12:00:25
问题 I have built a .dll under WinXP that claims it can't find DWMAPI.DLL when it's loaded. The problem is that this DLL is a Vista DLL, and this a known issue for XP users that have IE7 installed. The recommendation is to uninstall IE7 or repair the .NET Framework via Add/Remove programs. I did the repair, and nothing changed. I'm not about to uninstall IE7 since there must be a better solution that's not the equivalent of "reinstall windows". I've read bad things about people who attempted to

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

末鹿安然 提交于 2019-12-28 11:51:21
问题 Original title: How can I prevent loading a native dll from a .NET app? Background: My C# application includes a plugin framework and generic plugin loader. The plugin loader enumerates the application directory in order to identify plugin dlls (essentially it searches for *.dll at this time). Within the same application directory is a native (Windows, non-.net) dll, which, indirectly, one of the plugin dlls depends upon. The plugin loader blindly assumes that the native.dll is a .NET

How to call a method in DLL in a Java program

随声附和 提交于 2019-12-28 08:11:25
问题 I am trying to call a method in a DLL using JNA. So far have loaded the DLL using Runtime.getRuntime().load("myworkspace/test.dll"); This dll contaings a method that I need to access. How can I execute the method present in DLL in my Java file. Do I create an object or something of the DLL and then get the method name after the dot operator. 回答1: From the source: package jnahelloworldtest; import com.sun.jna.Library; import com.sun.jna.Native; import com.sun.jna.NativeLong; import com.sun.jna

How to include libsodium.net on ASP.NET

懵懂的女人 提交于 2019-12-28 06:45:44
问题 I have an old webservice build on ASP.NET (using .asmx) files. I need to use sodium.net - unfortunately it fails while loading the dependent libsodium.dll file. Any ideas about what I make wrong? I have added libsodium.net through NuGet. I have renamed the 64 bit DLL to "libsodium.dll" (and other naming conventions too). I have tried to reference libsodium.dll directly but VS rejects it (not a valid DLL). So I have added it as "content" instead with "copy to output". After building I can see