dll

Convert Java class to DLL [duplicate]

泄露秘密 提交于 2019-12-25 17:45:14
问题 This question already has answers here : Is there any way to compile Java code into a DLL? (3 answers) Closed 6 years ago . I need to use Java code in .NET (C#) and am looking for a way to convert a Java class to a DLL file (which I can then reference in my .NET app). Is this a valid scenario? If yes, How can I do it? 回答1: You can use IKVM.NET to use Java classes and libraries from .NET. 回答2: Basically that is not a good idea. Since java emphasizes on platform independence, but dll is

After installing PyBluez on Windows8.1 I get DLL %1 not valid win32 app

送分小仙女□ 提交于 2019-12-25 17:37:21
问题 I have installed PyBluez-0.22.win32.exe on a 64bit machine with Python 2.7 (they didn't have a 64bit version). Then I get the following error: ImportError:DLL load failed:%1 is not valid Win32 application. Any idea how I could fix this? Here is the part of code that depends on bluetooth: from bluetooth import * import bluetooth._msbt as bt bt.initwinsock () 回答1: That error message occurs when you try to use a 64-bit Python interpreter and a 32-bit extension module. The same error message can

How to wrap C++ DLL in C# with pointers as parameters?

﹥>﹥吖頭↗ 提交于 2019-12-25 17:05:16
问题 I am trying to call some functions from a C++ DLL file in my C# program. But I got stuck when it comes to pointers. Could somebody point me to the right direction? Here's the C++ header file with the target functions: #pragma once #ifdef STCL_DEVICES_DLL #define STCL_DEVICES_EXPORT extern "C" _declspec(dllexport) #else #define STCL_DEVICES_EXPORT extern "C" _declspec(dllimport) #endif enum SD_ERR { SD_ERR_OK = 0, SD_ERR_FAIL, SD_ERR_DLL_NOT_OPEN, SD_ERR_INVALID_DEVICE, //device with such

Unable to load Win32 Native DLL file from C#.NET

血红的双手。 提交于 2019-12-25 16:58:47
问题 I have a C# winapp. I call a native .dll file (created in C++ by myself) from the C# app, and it works fine. But when I copy my application (.exe and .dll files) to another machine, I get an error that says: Unable to load DLL "c:\dllname.dll": The specified module could not be found. (Exception from HRESULT: 0x8007007E) Here is the C# code: class IsoMessageHelper { public const string ISO8583_DLL = "c:\\Hc8583.dll"; [DllImport(ISO8583_DLL, CallingConvention = CallingConvention.Cdecl)] public

How do I (or if I can't) use Variants on simple DLLs?

廉价感情. 提交于 2019-12-25 16:24:10
问题 I want to expose some functionality of a internal object as a DLL - but that functionality uses variants. But I need to know: I can export a function with Variant parameters and/or return - or is better to go to an string-only representation? What is better, from language-agnostic POV (the consumer is not made with Delphi - but all will run in Windows)? 回答1: You could use OleVariant, which is the variant value type that is used by COM. Make sure not to return it as a function result as

Qt Apps DLLs conflicts with QT Creator DLLs

时间秒杀一切 提交于 2019-12-25 14:05:54
问题 We have a Build server with a different QT version than my dev station. So if I install the software builded by the Build server on my dev station, I can not launch the application because the app looks first in my QT Creator directories. I have an error window telling this: This application failed to start because it could not find or load the QT platform plugin "windows". Available platform plugins are: minimal, offscreen, windows, windows. So I need to rename c:\QT to something like c:\QT

Accessing Web.Config from a separate solution

半城伤御伤魂 提交于 2019-12-25 12:35:09
问题 I have two solutions, one is a class library and the other is a web application, and I want to get the connection string from the web.config file to the class library as I am developing a custom membership provider. I am using Framework 4.0 and MS Visual Studio 2010. Thanks 回答1: You can put the configuration settings for any library in the main web.config. It's easy! Connection strings are especially easy. Just add your connection string to the connectionstrings section with the same name it

Java use JNA call dll error:Invalid memory access

落花浮王杯 提交于 2019-12-25 12:22:25
问题 I want to call dll to write/read from hardware.However, I get the error below: dll method: int NewKey(char *room,char *gate,char *stime,char *guestname,char *guestid, int overflag, int Breakfast, long *cardno,char * track1,char * track2); java method: int NewKey(String room, String gate,String time,String guestname,String guestid, int overflag, int Breakfast, NativeLongByReference cardno, String track1, String track2); The api document shows cardno as a out parameter and track1,track2 could

Java use JNA call dll error:Invalid memory access

时光总嘲笑我的痴心妄想 提交于 2019-12-25 12:22:12
问题 I want to call dll to write/read from hardware.However, I get the error below: dll method: int NewKey(char *room,char *gate,char *stime,char *guestname,char *guestid, int overflag, int Breakfast, long *cardno,char * track1,char * track2); java method: int NewKey(String room, String gate,String time,String guestname,String guestid, int overflag, int Breakfast, NativeLongByReference cardno, String track1, String track2); The api document shows cardno as a out parameter and track1,track2 could

ftd2xx static library link error

谁说我不能喝 提交于 2019-12-25 11:58:07
问题 I'm working on a DLL project in Visual Studio 2017. This library adds some functionality around the ftd2xx library from FTDI. I set up the project as described in this instruction. I'm linking against the static version of the ft2dxx library. The only difference between the instruction and my project is the selection of the Runtime Library. The instruction states (figure 2.16) that the Multi-threaded Debug Runtime library must be used. In my case, I selected the Multi-threaded Debug DLL (/MDd