dll

How to statically link to MSVCP120.dll in VS2013

时光怂恿深爱的人放手 提交于 2020-01-15 12:15:31
问题 When I launch .exe it gives error MSVCP120.dll is missing. How do I add statically link to project. Is it in Linker? Do I need to give path to MSVCP120.dll? 回答1: In general, you should not use static CRT linking as it creates a number of potential problems, security risks, and servicing concerns. You can require the VC++ REDIST package to be run (which requires admin rights) to install the 'system' version, you can use the VC++ MSM modules with your own MSI installer, or you can just use side

Inheritance between clr project dlls

五迷三道 提交于 2020-01-15 11:44:07
问题 I have an abstract base class which is written with c++/cli. This class is located in a project. And i have other projects which inherit the abtract base class. So, the structure is like the following. Base Project: public ref class Base abstract { // implementation virtual CommonFunc(); }; public delegate void Foo(); Derived Project A: public ref class A : public Base { // implementation }; Derived Project B: public ref class B : public Base { // implementation }; And, so on. I can call both

Python calling an SDK function in DLL of a sensor that takes pointer IP and port and return a void* (void* a handle to the profile sensor.)

邮差的信 提交于 2020-01-15 09:05:10
问题 I am just new in Python. I am trying to connect to a laser sensor through its DLL library. The SDK functions in this Library are compiled in C++ language. By using ctypes in python my first try is to call the EthernetScanner_Connect function. The function parameters are as follow: void* EthernetScanner_Connect(char *chIP, char *chPort, int iTimeOut) According to the function discription in c++ it should return NULL pointer if a failure in connection occurs, otherwise it should return the

Setting a directory path to a dynamically linked library in an R package

北战南征 提交于 2020-01-15 08:11:27
问题 What is the proper way to load in a dynamically linked library (i.e., a .so file) when writing an R package? The only solution that has worked for me so far has been to specify the full path to the .so file, e.g.: dyn.load('/FULL/PATH/TO/MY/R_PACKAGE/src/my_file.so') Obviously, this approach will not work for a CRAN/Bioconductor submission since the .so file will not be located. As such, I have (unsuccessfully) tried the following alternatives: 1) library.dynam() 2) library.dynam('my_file.so'

CMake generated VS project expecting lib instead of dll

邮差的信 提交于 2020-01-15 07:19:32
问题 Here is my minimal example of below: https://www.dropbox.com/s/7fwsr3sigb60rtw/leveling-test.zip?dl=0 My current project folder structure and relevant CMakeLists content: leveling ├── CMakeLists.txt: add_subdirectory(deps) └── deps ├── CMakeLists.txt: add_subdirectory(xml-reading) └── xml-reading ├── CMakeLists.txt: add_subdirectory(deps) │ add_library(xml-reading ...) │ target_include_directories(xml-reading PUBLIC ${CMAKE_CURRENT_LIST_DIR}/deps/tinyxml2) │ target_link_libraries(xml-reading

Why is it necessary to add new events to the *end* of an IDL interface?

旧街凉风 提交于 2020-01-15 05:38:40
问题 I have found that when I add new events to an existing COM/IDL interface, I sometimes run into strange issues unless they are added to the end of the interface. For example, say I have the following interface: interface IMyEvents { HRESULT FooCallback( [in] long MyParam1, [in] long MyParam2, [in] long MyParam3); HRESULT BarCallback( [in] long MyParam1, [in] BSTR MyParam2, [in] BSTR MyParam3); }; Now let's say I want to add a new callback event, NewCallback . If I add it like this, I tend not

Use a dll from a c++ program. (borland c++ builder and in general)

风流意气都作罢 提交于 2020-01-15 05:26:10
问题 I'm trying to use a dll, namely libcurl, with my program, but, it's not linking. Libcurl comes with .h files that I can include (takes care of dllimport), but then I guess I must specify which dll to actually use when linking somehow... How do I do that? I'm compiling with Borland C++ builder, but I really want to know how these things work in general... EDIT: This is the code (straight c/p from curl homepage) bool FTPGetFile::ConnectToFTP(string ftpServer){ CURL *curl; CURLcode res; curl =

Oracle DataAccess related: “The invoked member is not supported in a dynamic assembly.”

跟風遠走 提交于 2020-01-15 04:26:47
问题 I understand that such an error has been discussed multiple times on SO. Some turned that was a bug in DLL file, some resolved by changing DLL version, other didn't seem to have a clue. Anyway I just post to try my luck: My application crashed when selecting a row in a grid on a C# GUI. The stackTrace looks like: System.NotSupportedException: The invoked member is not supported in a dynamic assembly. at Oracle.DataAccess.Types.OracleUdt.GetAllReferencedAssemblies() at Oracle.DataAccess.Client

reading content of an config file into the dll associated with it

a 夏天 提交于 2020-01-15 03:50:37
问题 I have saved strings in a dll application's setting. I want to retireve them. Here is the configuration file for my dll: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxxxxxxx" > <section name="Search.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture

C++ struct two dimension array into C# [duplicate]

痴心易碎 提交于 2020-01-15 03:44:29
问题 This question already has an answer here : Closed 8 years ago . Possible Duplicate: What does “Invalid managed/unmanaged type combination.” mean? how we will code these structures(Written in C++) in C# typedef struct tagBIRDMATRIX { short n[3][3]; // array of matrix elements }BIRDMATRIX; 回答1: The size should be the number of elements in your cross product. struct BIRDMATRIX { [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9)] short[,] n; } 来源: https://stackoverflow.com/questions/6197504/c