dll

How to implement a class counter in DLL?

旧巷老猫 提交于 2019-12-25 03:24:40
问题 So far I have: // TypeCounter.h template <typename Base> class Counter : public Base { protected: static int typeIndexCounter; }; template <typename T, typename Base> class Bridge : public Counter<Base> { public: virtual ~Bridge() {} virtual int GetTypeIndex() const { return TypeIndex(); } static int TypeIndex() { static int typeIndex = typeIndexCounter++; return typeIndex; } }; // static variable definition template <typename Base> int Counter<Base>::typeIndexCounter; Use case is like: class

Static Libraries and the statically-linked MSVC++ runtime

*爱你&永不变心* 提交于 2019-12-25 03:23:47
问题 For building a static library , is the static C runtime statically linked at compile time (of the library) or at final EXE compile time? 回答1: According to Hans, the CRT (C Runtime) is not linked while compiling a static LIB using MSVC. It is linked at final EXE compile time. However, even though this is true. You still cannot mix C runtimes in static libraries. They all must use the same exact runtime (or the system runtime MSVCRT.dll) 来源: https://stackoverflow.com/questions/9578388/static

Calling C++ dll from C# returns junk characters

回眸只為那壹抹淺笑 提交于 2019-12-25 03:08:18
问题 I am new to C++. And I am developing a just simple dll. I have to C++ function from C# with a file location information which should be string. And C++ returns some string to C#. Here are my codes.. extern "C" __declspec(dllexport) const char* ParseData(char *filePath) { string _retValue(filePath); printf(_retValue.c_str()); //--> this prints ok return _retValue.c_str(); } [DllImport("D:\\Temp\\chelper.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr ParseData

build project visual c++ failing - missing files

只愿长相守 提交于 2019-12-25 02:55:51
问题 I'm trying to build the itunnel_mux project here: https://code.google.com/p/iphonetunnel-usbmuxconnectbyport/ The source for the project build is here - http://iphonetunnel-usbmuxconnectbyport.googlecode.com/svn/trunk/itnl/win32_project/ However, for some reason there are missing files that it's looking for. CoreFoundation.lib, iTunesMobileDevice and libMobiledevice.lib. I'm wondering how I can obtain these? According to their help section someone was able to build the lib files from dll's

How to setup delegate/callback from DLL (interop between C and C#)

和自甴很熟 提交于 2019-12-25 02:52:14
问题 I have a static library (*.a for iOS) that contains some functions that I need to assign to a callback from C#. The code works fine without the callback, but when I add the delegate to the structure, it fails with the following error: ArgumentException: The specified structure must be blittable or have layout information. Parameter name: structure at FMOD_Listener.LoadPlugins () [0x00000] in <filename unknown>:0 at FMOD_Listener.Initialize () [0x00000] in <filename unknown>:0 (Filename:

Deploying application using SQL CE 4.0 to work both in 32 and 64 bit PC

半世苍凉 提交于 2019-12-25 02:46:42
问题 I am planning to create an application which uses SQL CE 4.0. I saw like there are two types of deployment central and private. So now i am planning to use private deployment. So all the dll must be included in the project as explained here. But I tried just adding all dll from my XP PC(32 bit) and not added any 64 bit dlls(but it was mentioned to add 64 bit dlls). Then i set platform to x86. After building application i tried running my application in a 64 bit PC and it worked properly. I

Deploying Qt Qml app to Windows 8 shows me a blank window

空扰寡人 提交于 2019-12-25 02:46:17
问题 I'm trying to deploy a QML app, but I keep getting a blank small window instead of my qml based window. The things I've tried: I added my qml in the resources, in Mac the deployment now works... but even if I copy the qml dir to my .exe dir, it doesn't work I've copied the qwindows.dll to the platforms dir in my .exe dir I've copied all the dependencies dll: icudt51.dll, icuin51.dll, icuuc51.dll, libEGL.dll, libGLESv2.dll, Qt5Core.dll, Qt5Gui.dll, Qt5Network.dll, Qt5Qml.dll, Qt5Quick.dll I've

Using a DLL with C interface in Java (for Android)

本秂侑毒 提交于 2019-12-25 02:23:07
问题 I was looking into writing an app for Android platform that would (hopefully) use a DLL with a C interface. The only way to grab information from the server is through this API. Is this even possible? If so, could anyone give me a point in the right direction? Thanks 回答1: I was looking into writing an app for Android platform that would (hopefully) use a DLL with a C interface. "DLL" is a Windows term. You cannot use a Windows DLL on Android. You will need C code that can work on Linux, as

Cannot install MySQL UDF

醉酒当歌 提交于 2019-12-25 02:08:19
问题 I have created a MySQL UDF that calls Java functions using JNI. MS Visual Studio compiles my code without any problems and generates a DLL for my 64bit MySQL Server (v.5.5). Here is what the C/C++ code looks like: #ifdef STANDARD /* STANDARD is defined, don't use any mysql functions */ #include <stdlib.h> #include <stdio.h> #include <string.h> #ifdef __WIN__ typedef unsigned __int64 ulonglong;/* Microsofts 64 bit types */ typedef __int64 longlong; #else typedef unsigned long long ulonglong;

How to install .NET4.0, .NET4.5, x86, AnyCPU DLLs side by side in Visual Studio Reference Manager

只愿长相守 提交于 2019-12-25 01:53:45
问题 Related to this question here, I am trying to create an installer which installs DLLs on the target user's PC and makes them available to the Visual Studio Reference Manager (Project > Add References) I have figured out that to make an assembly visible to the .NET4.0 Reference Manager, I need to add this Registry Key Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\MyAsm Value: <Directory on target PC of .NET4.0 assembly> And for .NET4.5, I need this key