dll

Can I use a *.tlb file without using Regasm to register it on the computer

孤者浪人 提交于 2020-01-02 12:09:43
问题 We are supporting an aging VB6 system that we have written new code for in .Net, put the code into assemblies and then exported *.tlb files for use with the VB6 codebase. My question is, on every computer I wish to run the code on, do I have to use Regasm to register the type libraries? I ask because it gets difficult to keep track of type library installations as computers break, new computers get added etc. Also, if we update the .Net code, we need to go around every computer and re

getting libstruct to work in matlab for dll pointer argument

风格不统一 提交于 2020-01-02 10:25:37
问题 I'm trying to call a dll function in matlab. I have a C++ struct as shown in sixense.h: typedef struct _sixenseControllerData { float pos[3]; float rot_mat[3][3]; float joystick_x; float joystick_y; float trigger; ... } sixenseControllerData; and functions I could call: SIXENSE_EXPORT int sixenseInit( void ); SIXENSE_EXPORT int sixenseGetAllNewestData( sixenseAllControllerData * ); I can easily get this to work with calllib('sixense','sixenseInit') since there is no input, but for the

Unable to reference microsoft.xna.framework.media.phoneextensions.dll

心不动则不痛 提交于 2020-01-02 10:17:49
问题 I am trying to follow this answer to add some audio files to the windows phone emulator's media library. But I get the error The type or namespace name 'PhoneExtensions' does not exist in the namespace 'Microsoft.Xna.Framework.Media' (are you missing an assembly reference?)` I am unable to reference microsoft.xna.framework.media.phoneextensions.dll as it is not present at the location C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71 I installed

Unable to reference microsoft.xna.framework.media.phoneextensions.dll

房东的猫 提交于 2020-01-02 10:17:43
问题 I am trying to follow this answer to add some audio files to the windows phone emulator's media library. But I get the error The type or namespace name 'PhoneExtensions' does not exist in the namespace 'Microsoft.Xna.Framework.Media' (are you missing an assembly reference?)` I am unable to reference microsoft.xna.framework.media.phoneextensions.dll as it is not present at the location C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71 I installed

Distributing (native C++) libraries on windows

本秂侑毒 提交于 2020-01-02 09:38:14
问题 I would like to share a library I've written in native C++ with a third party. By that I mean I'd like to share a library providing functionality I've developed with someone who is using windows, whom I do not wish to share source code with. We can assume the same CPU architecture here. I've only ever shared source code directly, and mostly on linux. So the standard process of ensuring I can provide a binary that is as versatile as possible is a mystery to me. And I find documentation online

Is there a wsprintf()-type function from a low-level library such as kernel32.dll or ntdll.dll?

让人想犯罪 __ 提交于 2020-01-02 09:28:12
问题 I'm writing a low-level logger function that appends text string to the end of a text (log) file. The requirement is that this function should not invoke any WinAPIs from DLLs that may not be yet available for the process -- such as when it's called from a DllMain handler. In other words, it can't use any libraries other than the ones that are guaranteed to be loaded into any user-mode process, i.e. kernel32.dll or ntdll.dll . I was able to get by quite nicely with just CreateFile , WriteFile

WinDbg says “.dll” was not found in the image list

允我心安 提交于 2020-01-02 09:25:26
问题 I'm trying to load a dll in WinDbg and got this error. Here goes the detail. Build A.dll using VisualC++ express. Place A.pdb and A.dll in d:\test\ directory. Set the image path and symbol path to d:\test .sympath gives OK D:\test try loading by using the following command .reload /f A.dll and it gives "A.dll" was not found in the image list. Debugger will attempt to load "A.dll" at given base 00000000. Please provide the full image name, including the extension (i.e. kernel32.dll) for more

Methods of sharing class instances between processes

試著忘記壹切 提交于 2020-01-02 09:11:24
问题 I have written a C++ class that I need to share an instance of between at least two windows processes. What are the various ways to do this? Initially I looked into #pragma data_seg only to be disappointed when I realised that it will not work on classes or with anything that allocates on the heap. The instance of the class must be accessible via a dll because existing, complete applications already use this dll. 回答1: You can potentially use memory-mapped files to share data between processes

Methods of sharing class instances between processes

我的梦境 提交于 2020-01-02 09:11:14
问题 I have written a C++ class that I need to share an instance of between at least two windows processes. What are the various ways to do this? Initially I looked into #pragma data_seg only to be disappointed when I realised that it will not work on classes or with anything that allocates on the heap. The instance of the class must be accessible via a dll because existing, complete applications already use this dll. 回答1: You can potentially use memory-mapped files to share data between processes

calling a c++ code from C# in x64 all arguments shift by one

浪尽此生 提交于 2020-01-02 08:12:07
问题 my c++ dll: int test2::CallMe(int y) { return y; } c# code: [DllImport("test2.dll",CharSet = CharSet.Anci)] private static extern int CallMe(int y); Console.WriteLine(CallMe(7)); if the dll and the test program are compiled in x86 i get a print: 7 but if i compile them at X64 for c++ and X64 or any CPU for c# the print is: 0 Any suggestion? edit: the problem is the call, because in debugger i see that the CPP receives 0 , or null in case of struct. edit 2: the functions are exported using a