loadlibrary

Attempt to call dll function from matlab causing crash

元气小坏坏 提交于 2019-12-12 22:18:25
问题 I'm trying to use a third-party external DLL (from usbmicro) within MATLAB, but it keeps crashing MATLAB. This is from the documentation indicating the syntax of the function call from within a C program: int USBm_About( char *about ); I tried this MATLAB script (yes it's very kludgy, I'm a MATLAB noob): >> loadlibrary('USBm.dll','USBmAPI.h') >> libfunctions('USBm') >> s='sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss'; >> st=strcat(s,s,s,s); >> vp = libpointer('voidPtr',

Loading a shared library with the System.loadLibrary call never returns

穿精又带淫゛_ 提交于 2019-12-12 17:13:31
问题 I have a problem loading a native library using System.loadLibrary("my_shared_lib"); The problem is that this call never returns. Here is the context : In my project I have several static libraries built using the nkd-build script. Building them works well using this Android.mk for each .a lib I need: **Android.mk used for static libs** LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := my_static_lib_1 # Include paths LOCAL_C_INCLUDES := \ $(PATH_TO_INCLUDES1) \ $(PATH_TO

C++ Loadlibrary() error 3765269347

别来无恙 提交于 2019-12-12 15:04:48
问题 I have got this Loadlibraty() error 3765269347 bothering me. I am implementing a C++ console application, built as x64, to load a x64 native C++ dll. Following is the code in the C++ console application to load the dll: bool InitDll() { HINSTANCE hInst = LoadLibrary(_T("C:\\TIS_Nick\\Hardware\\Devices\\ThorDetectorSwitch\\TDSTest\\TDSTest\\Debug\\Modules_Native\\ThorDetectorSwitch.dll")); if( hInst != NULL ) { FreeLibrary( hInst ); return true; } else { DWORD err = GetLastError(); return

LoadLibrary is failing with module not found error — possible dependency problems

陌路散爱 提交于 2019-12-12 11:19:58
问题 I have been trying to load a 32-bit dll using C++ (from a 32-bit application, on windows 7 64-bit). LoadLibrary returns NULL, and GetLastError returns 126 for "The specified module could not be found." I am passing in the complete address to the LoadLibrary function. I opened the dll in Dependency Walker, which said GPSVC.dll was a missing dependency. From the googling I've done, it looks like Dependency Walker often falsely shows this GPSVC.dll as a missing dependency, and there is no 32-bit

Have to do FreeLibrary 2 times although I have done LoadLibrary only 1 time. Also, after unloading DLL, when trying to load it again, error happens

偶尔善良 提交于 2019-12-12 07:02:02
问题 Have the following C# code for loading and unloading a C++ DLL. I load DLL only once, but code has to unload DLL 2 times. Also after unloading DLL, when I load it again, and I call DLL's exported function, I get the following error message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. DLL depends on other DLLs. /// //////////////handle of FDD DLL: System.IntPtr SystemIntPtr_handle_of_DLL=System.IntPtr.Zero; private void button4_Click

LoadLibrary fails with ERROR_SXS_CANT_GEN_ACTCTX (the dll depends on VS2005 CRT 8.0.50727.4053)

与世无争的帅哥 提交于 2019-12-12 06:36:56
问题 I have a third-party DLL that is built with Visual Studio 2005, which I use in a project that is built with Visual Studio 2008. This DLL depends on VS2005 CRT, version 8.0.50727.4053. On Windows 7 it works, but on Vista and XP LoadLibrary fails with a side by side error. The is from the Event Viewer: Activation context generation failed for "C:\MyLibrary.dll". Dependent Assembly Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727

Codeigniter google-url-master library

爷,独闯天下 提交于 2019-12-12 03:29:42
问题 I am having trouble using this (https://github.com/gsouf/google-url) library as a codeigniter library. I've downloaded the library from GitHub and placed it in this folder: application/libraries/google-url-master And created this file to setup the library as a codeigniter library: libraries/googleurl.php <?phpif (!defined('BASEPATH')) exit('No direct script access allowed');class GoogleUrl { private $g; function __construct() { require_once( APPPATH . 'third_party/google-url-master/autoload

Why LoadLibrary loads unrelated DLLs

纵饮孤独 提交于 2019-12-12 01:20:27
问题 This is about DLL injection. Let's say P.exe depends on A.dll, B.dll and C.dll (implicit linking), they're private modules of P.exe. Now I use CreateProcess with CREATE_SUSPENDED flag to launch P.exe, after that I use CreateRemoteThread to call LoadLibrary in target process to load Inject.dll, and in the same way call an initialize function of Inject.dll to do real work (things you can't do in DLLMain). It works. But I found that calling to LoadLibrary makes A.dll, B.dll and C.dll load too -

Suppressing errors in LoadLibrary

喜欢而已 提交于 2019-12-11 19:28:42
问题 I'm trying to get rid of the error messages Windows sometimes pops when loading a DLL. I tried to do the following: UINT oldErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS); SetErrorMode(oldErrorMode | SEM_FAILCRITICALERRORS); LoadLibrary(myDll); SetErrorMode(oldErrorMode); But I'm still getting the error windows, I tried to load several DLLs to make sure they don't remove the SerErrorMode() so that's not the case. Does anybody has an idea what else can I try? Thanks 来源: https://stackoverflow

In python how do I set the value of a LP_c_ubyte

一笑奈何 提交于 2019-12-11 15:49:43
问题 I am creating a Python wrapper for a C DLL using python ctypes. I am having trouble updating a pointer to value in memory with python. In this example I have a DLL that has a register callback function. A invoke callback function that creates unsigned char variable, passes a pointer to that variable to the callback function, then prints the updated value of that variable. What I expected to happen is that the python function callbackUpdateValue would update the value of foo , and the updated