Unmanaged refers to Windows code that is independent of the Common Language Runtime(CLR). COM components, ActiveX components, and Win32 API functions are examples of unmanaged code.
Questions tagged [unmanaged]
1488 questions
-1
votes
1 answer
Delegates and native methods
Here is a piece of code:
private static bool CreateDelegates ()
{
IntPtr ptr;
//--- SoundTouch: createInstance
ptr = Kernel32Methods.GetProcAddress (libHandle, "_soundtouch_createInstance@0");
if (ptr != IntPtr.Zero)
{
…

apocalypse
- 5,764
- 9
- 47
- 95
-1
votes
3 answers
What do HRESULT, DWORD, and HANDLE mean in unmanaged code?
I was reading about Marshaling. and im confused because what does mean this in unmanaged code.
HRESULT, DWORD, and HANDLE.
The original text is:
You already know that there is no such compatibility between managed and unmanaged environments. In…

user1495049
- 43
- 1
- 2
-1
votes
1 answer
How to make Windows Desktop (Screen) blur or dull Using C# Unmanaged code
I want to make the desktop dull/blur in my application using c# unmanaged code like User32.dll and GDI32.dll. Which function do I need to call in the User32.dll and Gdi32.dll?

user1651818
- 21
- 1
-2
votes
2 answers
Make class pointer in c# store the data from cpp side
I'm writing a c# / cpp mixed program and need to call some cpp functions inside c#.
For most of the functions, I can just use PInvoke approach to call extern cpp funcs.
// cpp part
void compute(DataWrapper* dataHolderFromCSharp){
…

X.Arthur
- 277
- 2
- 13
-2
votes
1 answer
How to use a struct defined in C++ CLR in unmanaged C++?
I have a struct defined in Managed.h and I would like to be able to use it inside a different project, which is unmanaged C++ (let's call it Unmanaged.h).
I tried referencing the dll, a few different #includes, but I couldn't make it work. Is there…

Olivier Giniaux
- 870
- 2
- 8
- 22
-2
votes
2 answers
How to correctly declare unmanaged DLL function?
I'm trying to call an unmanaged DLL's function in my C# app. The function declaration is this. The function writes to file the data from an acquisition board (i.e., from arrays real_data and imag_data).
I'm using the following declaration, but the…

Cristian M
- 715
- 2
- 12
- 32
-2
votes
1 answer
C++/CLR (C++ Interop) Basic Questions :)
I've some questions about C++/CLR C++ Interop (basically mixing C++ unmanaged and managed code).
If I create an application with C++/CLR and I write unmanaged and managed code, for example:
int main(int argc, char*argv[])
{
int a = 30; …

BeastLe9enD
- 11
-2
votes
1 answer
AccessViolationException when try to read memory from pointer in C# using Marshal class
I try to create a program that will programatically set Windows Color Management to archive an effect like f.lux as a hobby project.
**The definition of WINAPI WcsGetDefaultColorProfileSize. **
BOOL WINAPI WcsGetDefaultColorProfileSize(
_In_ …

Suttisak
- 101
- 2
- 9
-2
votes
2 answers
Translate values of UnmanagedType enumeration to their managed type equivalents
I'm trying to do this helper function for P/Invoking, the purpose is help determining which should be the most appropriated managed type to declare for specific marshalings of a windows API definition.
I've taken the info from here: UnmanagedType…

ElektroStudios
- 19,105
- 33
- 200
- 417
-2
votes
1 answer
How to let java applet download file
I am new to Java Applets.
I have the following situation: the client asks for a Java Applet to do Function1, i already have this Function1 developed and tested but in C#. so i say that i can use my C# dlls in Java applet.
I already tried to use…

Mohamed Al-Hosary
- 488
- 8
- 25
-2
votes
1 answer
C# - return type int* from unmanaged code
I am programming a small application to talk with an external device via API (both in 64bit). I got the following method from the guide I am trying to use:
int* GetRevision( void* cu_ptr, int num)
I tried to do PinVoke…

REMberry
- 172
- 1
- 2
- 12
-2
votes
1 answer
Windows Forms: Unmanaged code calls an internal thread that causes 'Access violation'
So I'm using some native code (only access to the DLLs; no source code) that causes my program to crash. Essentially, I try to connect to a server which initially connects fine. There is a connection object provided by the API which is used as the…

furssher
- 83
- 8
-2
votes
1 answer
DLL import failure in using WinDivert
I am going to design a program using WinDivert to manipulate the network traffic.
The language I use is C++ and the program is designed under Visual Studio 2008.
Firstly I create a project in visual C++ CLR (Windows Forms Application) so I can…

user3704347
- 23
- 6
-3
votes
1 answer
How to expose native to managed - C++/CLI on x64 Platform
I have a static lib in my project and I want to use this in my .net project.
I have taken this project as a starting point.
Exposing native to managed - C++/CLI
My use case is the Second Approach.
So far everything works, but when I change the…

Diddlik
- 76
- 1
- 9
-3
votes
1 answer
What is the minimum needed to make my dll match the signature of another?
I'm attempting to proxy an existing dll that I don't have all the source code to. I'm using a tool I found here:
https://github.com/mavenlin/Dll_Wrapper_Gen
Using it, I was able to create a Visual Studio project and build it successfully. However,…

John O
- 4,863
- 8
- 45
- 78