unmanaged

Windows Azure not finding DLL of C++/CLI project

*爱你&永不变心* 提交于 2019-12-17 19:54:17
问题 I have a C++/CLI project that wraps around an unmanaged C compression library, and this project is referenced by an MVC3 project that calls the C++ Compress function. Everything works fine locally, but when I publish the solution to the Azure cloud, I get an error saying it could not find the module/dll: Could not load file or assembly 'LZGEncoder.DLL' or one of its dependencies. The specified module could not be found. Why can't it find the DLL file? is it going to the wrong place or being

Swift UnsafeMutablePointer<Unmanaged<CFString>?> allocation and print

ぃ、小莉子 提交于 2019-12-17 18:59:31
问题 I'm new to swift and I have some difficulties to deal with pointers of unmanaged CFString (or NSString). I'm working on a CoreMIDI project that implies usage of UnsafeMutablePointer?> as you can see in this function : func MIDIObjectGetStringProperty(_ obj: MIDIObjectRef, _ propertyID: CFString!, _ str: UnsafeMutablePointer<Unmanaged<CFString>?>) -> OSStatus My problem is that I want to allocate a buffer to receive the content of the property (_str) then call the function above, and finally

calling managed code from unmanaged code

时光怂恿深爱的人放手 提交于 2019-12-17 09:43:54
问题 I want to call my .NET code from unmanaged C++. My process entrypoint is .NET based, so I don't have to worry about hosting the CLR. I know it can be done using COM wrappers for .NET objects, but I would like to access individual static methods of managed classes, so COM isn't my shortest/easiest route. Thanks! 回答1: Assuming you are talking about real unmanaged code - not just native C++ running in a mixed-mode assembly compiled with /clr - the easiest way is to create a wrapper to your .NET

What exactly are unmanaged resources?

让人想犯罪 __ 提交于 2019-12-17 02:17:25
问题 I want to know about unmanaged resources. Can anyone please give me a basic idea? 回答1: Managed resources basically means "managed memory" that is managed by the garbage collector. When you no longer have any references to a managed object (which uses managed memory), the garbage collector will (eventually) release that memory for you. Unmanaged resources are then everything that the garbage collector does not know about. For example: Open files Open network connections Unmanaged memory In XNA

How can I pass an empty string buffer that can be written to from native to c#?

柔情痞子 提交于 2019-12-14 02:18:52
问题 I'm trying to get a string from my managed code into my unmanaged code: unmanaged dll: typedef int (__stdcall * GetNameFromDictionaryCallback)(ULONGLONG id, WCHAR * name); declspec(dllexport) void __stdcall UnmanagedSetNameLookupCallback(GetNameFromDictionaryCallback fn) { GetNameFromDictionaryCallback GetNameFromDictionary = fn; WCHAR * value = new WCHAR[256]; ULONGLONG key = 0x250000000DA44785; GetNameFromDictionary(key, value); // reverse P/Invoke call to C# function wprintf_s("%ls", value

Neo4J server startup error after enabling the unmanaged extension configuration

三世轮回 提交于 2019-12-14 00:35:39
问题 I am using Neo4J community edition 2.3.0 on windows OS 10. Everything works well until I changed the configuration at neo4j-server.properties files as: org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.examples.server.unmanaged=/examples/unmanaged The error at server startup is: Starting Neo4j failed: org.neo4j.server.web.NeoServletContainer-5b85e832@73766070==org.neo4j.server.web.NeoServletContainer,-1,false If I disable this change then server starts very well. I am trying to run the

Dependency Walker Not Showing All the Depended Dll

和自甴很熟 提交于 2019-12-13 14:23:12
问题 I have a fortran dll, and I want to know the assemblies that it depends on for redistribution purpose. One thing I found out is that the dependency walker doesn't show all of the dependencies, i.e, there are some dlls that my assembly is dependent on, but dependency walker doesn't show it out. An example would be a dll that makes use of intel mkl LAPACK dlls, but the dependency walker doesn't show that dependency. Why this is so? And any idea how to fix this problem, or is there other more

Call to native DLL fails from a .NET Windows service

蓝咒 提交于 2019-12-13 14:03:07
问题 I have a 3rd party API in the form of a native dll that I call from C# using DllImport . This native dll depends on the 3rd party application being open. When I run the code normally the API does what is expected and drives the application. However, when I run the same code as a Windows service, even as myself, the API returns the same (undocumented) error code that I have seen when the application is closed; process explorer confirms that the native dll is correctly loaded from the

Managed and unmanaged code error C3699

有些话、适合烂在心里 提交于 2019-12-13 07:23:52
问题 I am working on a game which uses C# and C++. Classes for models are written in C# and levels structure is stored in XML files. When I want read it in C++ and want to build project I have this strange error and I don't where to find some bugs. Error 1 error C3699: '*' : cannot use this indirection on type 'Cadet::XMLReader::Models::Obstacle' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory0 527 1 Cadet.Game These kind of errors are in xmemory0 and list files? what they

Why GC is making fail the following code snippet

橙三吉。 提交于 2019-12-13 07:08:10
问题 I'm a little bit confusing about how .NET manages images, I have the following code, to build a managed bitmap form an unmanaged HBitmap, perserving the alpha channel. public static Bitmap GetBitmapFromHBitmap(IntPtr nativeHBitmap) { Bitmap bmp = Bitmap.FromHbitmap(nativeHBitmap); if (Bitmap.GetPixelFormatSize(bmp.PixelFormat) < 32) return bmp; BitmapData bmpData; if (IsAlphaBitmap(bmp, out bmpData)) { // MY QUESTION IS RELATED TO THIS // IF CALL SUPPRESS_FINALIZE THE OBJECT // IT WILL WORK,