dll

Need help using the Crypto++ library for AES256, their documentation isn't written all that well [closed]

时间秒杀一切 提交于 2020-03-18 10:22:15
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 9 days ago . so I have a project for a dll file already setup and everything, what I'm trying to do is create a function inside it that basically handles decrypting/encrypting the contents of several files. I'm currently pushing the file contents into the function as a const char*, file sizes

Need help using the Crypto++ library for AES256, their documentation isn't written all that well [closed]

本秂侑毒 提交于 2020-03-18 10:21:33
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 9 days ago . so I have a project for a dll file already setup and everything, what I'm trying to do is create a function inside it that basically handles decrypting/encrypting the contents of several files. I'm currently pushing the file contents into the function as a const char*, file sizes

Could not load file or assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=1.1.0.0' after upgrading to 1.1.0

心不动则不痛 提交于 2020-03-18 04:52:27
问题 I have a Asp.Net Core project targeting .NET 462 and it was working with Asp.Net Core version 1.0.1. After upgrading to "1.1.0" I got this error: FileLoadException: Could not load file or assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) project.json "dependencies": { "AspNet.Mvc

Using dllimport in place of dllexport

走远了吗. 提交于 2020-03-16 08:09:22
问题 I seem to be able to use __declspec(dllexport) and __declspec(dllimport) interchangeably when building my dll in Visual Studio 2015. I would have thought when making the DLL that the dllexport command would have been required but it seems either dllexport or dllimport is adequate.I have the following header file declaring a simple add() functions: add.h #pragma once #ifdef ADDDLL_EXPORTS #define ADDDLL_API __declspec(dllexport) #else #define ADDDLL_API __declspec(dllimport) #endif ADDDLL_API

How to pass multiple cv::Mat from c++ dll to opencvsharp Mat c# properly?

时间秒杀一切 提交于 2020-03-05 06:07:10
问题 I'm working on a project which required a dll file for another program written in c# to use (I'm not very familiar with the usage of C++/C#). For the very last step to complete my work, I have a problem with passing "multiple" cv::Mat from dll to C#. I've found some examples on the Internet about C# using OpenCvSharp to receive a cv::Mat from dll, and it worked well like this in my code (it's simplified): //original.hpp extern "C" LIB_API cv::Mat* inference(unsigned char* img_pointer, long

Python调用windows下DLL详解

一世执手 提交于 2020-03-01 13:09:48
作者:童磊(magictong) P.S. 之前的排版乱掉了,这里做一下排版,顺便改一下里面的一些用词错误。 2011-08-04 在python中某些时候需要C做效率上的补充,在实际应用中,需要做部分数据的交互。使用python中的ctypes模块可以很方便的调用windows的dll(也包括linux下的so等文件),下面将详细的讲解这个模块(以windows平台为例子),当然我假设你们已经对windows下怎么写一个DLL是没有问题的。 引入ctypes库 [python] view plain copy from ctypes import * 假设你已经有了一个的DLL(名字是add.dll),且该DLL有一个符合cdecl(这里强调调用约定是因为,stdcall调用约定和cdecl调用约定声明的导出函数,在使用python加载时使用的加载函数是不同的,后面会有说明)调用约定的导出函数Add。 建立一个Python文件DllCall.py测试: [python] view plain copy from ctypes import * dll = CDLL( "add.dll" ) print dll.Add( 1 , 102 ) 结果:103 上面是一个简单的例子。下面简单聊一下调用流程: 1、加载DLL 上面已经说过

用gcc编译成动态链接库的方法

末鹿安然 提交于 2020-02-29 03:14:52
通过一个例子来介绍如何生成一个动态库。假设有一个头文件so_test.h和三个C文件:test_a.c、test_b.c、test_c.c /* so_test.h */ #include <stdio.h> #include <stdlib.h> void test_a(); void test_b(); void test_c(); /* test_a.c */ #include "so_test.h" void test_a(){ printf("this is in test_a...\n"); } /* test_b.c */ #include "so_test.h" void test_b(){ printf("this is in test_b...\n"); } /* test_c.c */ #include "so_test.h" void test_c(){ printf("this is in test_c...\n"); } 将这几个文件编译成一个动态库:libtest.so gcc test_a.c test_b.c test_c.c -fPIC -shared -o libtest.so 参数说明: -shared 该选项指定生成动态连接库(让连接器生成T类型的导出符号表,有时候也生成弱连接W类型的导出符号),不用该标志外部程序无法连接

Debugger does not step into native code when debugging a static lib wrapped in a C++/CLI DLL

旧城冷巷雨未停 提交于 2020-02-25 00:51:46
问题 In a C# app, I'm referencing a native C static lib, that I wrapped in a C++/CLI DLL. I chose a static lib versus a DLL because I have other constraints related to the release process of the app to the user. Among the many topics available on this forum I found the following implementation. Main : { MyCLRDLL test = new MyCLRDLL(); if(test.go()) Console.WriteLine("Hello, wrld"); } In the DLL project, the file MyCLRDLL.hpp #include "MyNativeLib.h" #pragma comment(lib, "MyNativeLib.lib")

Debugger does not step into native code when debugging a static lib wrapped in a C++/CLI DLL

百般思念 提交于 2020-02-25 00:51:07
问题 In a C# app, I'm referencing a native C static lib, that I wrapped in a C++/CLI DLL. I chose a static lib versus a DLL because I have other constraints related to the release process of the app to the user. Among the many topics available on this forum I found the following implementation. Main : { MyCLRDLL test = new MyCLRDLL(); if(test.go()) Console.WriteLine("Hello, wrld"); } In the DLL project, the file MyCLRDLL.hpp #include "MyNativeLib.h" #pragma comment(lib, "MyNativeLib.lib")

VSIX Extension uses 3rd party DLLs unable to load one of the dependency

ぐ巨炮叔叔 提交于 2020-02-24 12:09:30
问题 I am developing an extension to VS2013. Since it will be installed through MSI, I am changing the base directory to installation folder using ProvideBindingPath attribute to package class. But the 3rd party dll reference which will be loaded in runtime is not picking dll from the probed path. Its always looking into Visual studio devenv.exe folder. Is there any way to force the dll to look into my installation folder. using MD=Microsoft.VisualStudio.Modeling.Shell; MD.ProvideBindingPath