native

Create Native DLL

I'm C# programmer, and don't introduce with Native. I have a Native DLL, & I'v to use that in my project, but cause some of types are impracticable in Managed code. I'll to prepare a DLL in Native(C++), and I want when an event occure, then aware my Managed Code; How can I do that? ...

Making Native .Net exectuables?

I know this question has been asked, but I found out that microsoft has recently released the source code for the entire .Net Framework. I was wondering that since now this source is available, if it was possible to download all dependent files from microsoft's code server, and somehow make a native executable that is not needing clr, or...

Java Native Interface and Security

Is there any chance for the the violation of java security policy through java native interface. Which are the main areas we have to use JNI ...

Lightweight x86 Emulator for .NET / Executing x86 code in a managed environment

Our company is migrating its entire product line from a C++ codebase to the .NET Framework. We have a very large codebase, and this migration is being done incrementally over the course of many years. We would like to enjoy some of the benefits of pure managed code, such as Silverlight, but there are many legacy C++/x86 modules that wi...

Drawing issues with c++

I'm sort of new to c++ and i'm trying to create a game. I have a 2d array RECT_GRID of rectangles. I have a 2d array GRID of unsigned short. I fill the rectangle array during WM_CREATE The WM_PAINT event paints rectangles for all the elements in the array. The color of the rectangle is based on the value of GRID[x][y] I made it so when...

Insert and remove rows from an int array in c++?

I have a 2d array grid made as int GRID[10][20]; What I want to do is remove the last row GRID[LAST][ALL] and insert a blank row at the start of the array. I tried Googleing this with no luck. Thanks ...

Gradient Brush in Native C++?

In c#, you can use drawing2d.lineargradientbrush, but in c++ right now I only found the CreateSolidBrush function. Is there a function in the native gdi dll to create a gradient brush? I couldn't find anything like this at msdn. Thanks ...

C++ Timer not working?

I'm trying to make a timer in c++. I'm new to c++. I found this code snippet UINT_PTR SetTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc); I put it in my global variables and it tells me Error 1 error C2373: 'SetTimer' : redefinition; different type modifiers I'm not sure what this means. Is there a more p...

Lost Focus and GotFocus in c++

How do you add code to these events for native c++. I couldnt find a WM_LOSTFOCUS OR WM_GOTFOCUS; I only found WM_SETFOCUS. I need code to happen when my window loses focus, and regains it. Thanks ...

Change speed of keystroke C++

Basically, when one types, a keydown event happens. If the key is held for more than a certain time (~1 sec) then the key is repeatedly pressed until keyup hapens. I would like to change the time it takes for the key to be automatically repressed in my c++ application. How can this be done? Thanks ...

Custom UserControls in C++

In Native C++, how do you add a usercontrol like in vb .net where you do form.controls.add(controls) Because for instance, what if I wanted to make a usercontrol class that inherits from panel? How is this done in c++ Thanks ...

Where can I find the source code for Java's HttpURLConnection.getOutputStream()

Where can I find the actual code (be it java or native) that's executed by: new URL("http://google.com").openConnection().getOutputStream() Bonus: how I can debug it from IntelliJ IDEA ? ...

Application configured incorrectly error C++

I'm new to c++. I made a c++ program using VS 2008 Professional. I started with the Win32 template that created a window for me. I compiled it on Vista 32. I brought the compiled exe to my old XP sp2 computer, and it tells me the application configuration is incorrect. Is there something im doing wrong? How do I make it platform independ...

Change repeat key threshold c++

I'm building a c++ tetris game (not c++ .Net). I feel my controls are weird. I want to make it so that when user presses one of the arrow keys, about 10ms of holding it down will start the repeat function windows has. It is set to about 500ms by default, and it is too laggy for my game. How can I set the speed at which it changes from th...

How to get real code coverage using vsinstr/vsperfmon

Hi, my microsoft-based development environment looks like this: - huge native c++ codebase, seperated into 10 projects - each project has a dependent test project (GoogleTest unit tests), the sources to test are simply referenced. I generated the coverage-report using vsinstr and vsperfmon (the visual studio tools for instrumenting/...

Programably make and play a sound through speakers C++

I'm making a game in native vc++ (not .Net) I'm looking for a way to play a noise (maybe 8 bit or something) through the real speakers (not internal). I know about PlaySound, but I don't want to make my EXE big. I want to program the sound. Is there an api way (kinda like Beep() ) but that plays through the real speakers? Thanks ...

C# Interrupting native threads

Hello *, I am currently investigating how Thread.Interrupt plays together with P/Invoke or native calls. I have read in MSDN that it is not possible to abort (Thread.Abort) a thread which is in the native call (other use cases might apply as well). But I did not find any reference which states the same for native threads which are in Wa...

Is there any native DLL export functions viewer?

Is there any free native Windows DLL export functions viewer, which shows the function name, and a list of their parameters? Thanks. ...

How to control the memory usage of processes spawned by a JVM

I am coding an application that creates JVMs and needs to control the memory usage of the processes spawned by the JVM. ...

Execute native code via JNI/DLL or EXE?

We have a native app that we can access via JNI->DLL or by invoking an EXE with command line parameters. Which would be the best approach? We will be invoking this method about 100 times a day. Performance isn't super important. This native app was developed by a group outside of our company so we are not too familiar with the code (...