dll

Can I compile DLLs without Visual Studio?

穿精又带淫゛_ 提交于 2020-01-14 09:32:12
问题 My intention is to take a C++ library, wrap it for C# with SWIG (alt. link), and compile both C++ and C# components as DLLs for Unity 5. (The C# DLL provides Unity with an interface to the C++ DLL.) To the best of my knowledge, compiling C++ and C# DLLs always requires Visual Studio (or tools like msbuild that come with VS). However, I am currently struggling to get VS installed, which has led me to question that assumption. Are there any other options for compiling Unity-ready DLLs on

Is it possible to link against a Windows .dll+.lib file combination using gcc/g++ under Cygwin?

爱⌒轻易说出口 提交于 2020-01-14 09:03:27
问题 I know how to link against libraries in Unix-ish contexts: If I'm working with .a or .so files, I specify the root search directory with -L/my/path/to/lib/ and for libMylib I add -lMyLib . But what if I have a .dll (e.g. in the Windows\System32 directory)? a .dll (in Windows\System32 ) and a .lib (someplace else)? These DLLs are by some other party; I don't have access to their sources - but do have access to the corresponding include files, against which I manage to compile. 回答1: If you can

How to get the filename of a DLL?

半世苍凉 提交于 2020-01-14 08:45:20
问题 I have a C++ Windows application myapp.exe which loads several plug-ins. Plug-ins need to find the path to their DLLs. I can use GetModuleFileName for this, but it need the handle for the plug-in DLL. I don't know where to get this handle. GetModuleHandle(NULL) returns the handle to the executable. One option is to use GetModuleHandle (GetModuleHandle("myplugin.dll") ) , but this requires the name of the plugin to be hardcoded which I want to avoid. Any help is appreciated. Paul 回答1: I don't

Can't add a reference to my project - it simply doesn't detect it

与世无争的帅哥 提交于 2020-01-14 07:32:29
问题 So I found this wonderful library called WatiN - and I've downloaded the latest version - v2.1. I've opened a Console Applications (obviously C#) and wrote my most simplest program: using WatiN.Core; ... FireFox browser = new FireFox(@".."); browser.Button("Send").Click(); browser.Dispose(); It's nothing much. I obviously added a reference to my project by right-clicking the project > Add Reference > browsed to C:\...\WatiN\bin\net40 , chose WatiN.Core.dll (like the Readme said) The VS was

C# Reflection: How to Emit a class

核能气质少年 提交于 2020-01-14 03:37:14
问题 I have a class, ReferenceObject, that I want Emitted into the dll I create. How do I do this without writing every method with Emit? I basically want this class added to the dll I generate. Here is the class: public class ReferenceObject { private readonly int value; public ReferenceObject(int pValue) { value = pValue; } public override string ToString() { return value.ToString(); } public int Value() { return value; } public int ID() { return value; } #region == Operator public static bool

Make a wrapper for cout?

血红的双手。 提交于 2020-01-14 02:12:30
问题 So here's an interesting question, How would I make something kinda like a wrapper for cout? I want to be able to add it into a dll so I can throw it into my programs. but the basic syntax of it should be Mything::mesage << "I'm some text" << im_an_int << someclass << mything::endl; or Mything::mesageandlog << "I'm going to print to console, and to a file!" << mything::endl; I can handle most of the internal logic but as to what I should put to even do this. kinda stumped. Possibly make a

How can I use a DLL with JNA that does not have an interface

南楼画角 提交于 2020-01-13 20:27:30
问题 After spending a lot of time learning Python to implement a series of DLL based function into Java via Jython - I forgot to read Jython's documentation, and the lack of ctypes support rendered most of my code useless. I didn't want to use JNI I'm trying to access some functions from a pcshll32.dll, from Personal Communications using its HLLAPI. I did manage to make it work with Python with almost no problems, it was really easy to find a lot of documentation and recipes on the web. Now I

Unhandled DivideByZero exception from an external DLL - C#

旧巷老猫 提交于 2020-01-13 19:20:09
问题 I have a C# (.net 4.0) program, whose main is calling methods from an external FTP library - a dll the project references. The logic is in a try-catch block, and the catch prints the error. The exception handler has a generic parameter: catch(Exception ex) . The IDE is VS. Sometimes the FTP library throws the following division by zero exception. The problem is it is not caught in the catch block, and the program crashes. Exceptions originated in my wrapper code are caught. Anyone has any

How to use a C++ dll in Windows Phone 8.1 XAML App within C++ Runtime Component

别来无恙 提交于 2020-01-13 18:01:28
问题 I want to use a C++ dll (compiled for arm, x86) within my C# windows phone 8.1 XAML visual studio project. I created a C++ runtime component to interact with my C++ code. This code needs a precompiled dll. I added my lib file to my project settings. The compilation is running fine. If I start my app with the windows phone 8.1 emulator I get: The specified module could not be found. (Exception from HRESULT: 0x8007007E) My Visual Studio Project Structure: c# Windows Phone Project Windows

Search path for a DLL referenced by a plug-in DLL

余生颓废 提交于 2020-01-13 14:36:10
问题 I'm writing a Windows application plug-in (as a DLL) in native C++. Let's call it myplugin.dll . My plug-in references another DLL which we'll call other.dll . My plug-in is installed in the myplugin subdirectory of the application's plugins directory: application.exe plugins\ myplugin\ myplugin.dll myplugin.dll links implicitly to other.dll . I cannot delay-load other.dll because it exposes classes with virtual methods, and virtual method tables being considered as data, they cannot be