Calling C system calls from JNI

Tejas_Blr

I am trying to make a system call, CreateProcess through JNI code base running on JAVA SDK. Will this work or do I have to use some other C call? The original program was written on Visual Studio, and now we are partly migrating to JAVA. I was using a WinAPI, CreateProcessW which internally called CreateProcess. And this CreateProcess had no definition, so am assuming it to be a system call. Somebody please help. Thank you.

P.S: I have to use only C code at this stage.

manuell

CreateProcess is a Windows API.

In the SDK headers, it's defined as CreateProcessA or CreateProcessW.

WinBase.h excerpt:

#ifdef UNICODE
#define CreateProcess  CreateProcessW
#else
#define CreateProcess  CreateProcessA
#endif // !UNICODE

You should be able to call CreateProcess from your JNI Dll written in C.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

System calls vs C/C++ system calls

From Java

Can I know the name of the class that calls a JNI C method?

From Java

Calling into a saved java object via JNI from a different thread

From Java

JNI Calls different in C vs C++?

From Java

JNI: From C code to Java and JNI

From Java

Calling a DLL from an Applet via JNI

From Java

How do I handle calls to AudioTrack from jni without crashing?

From Java

JNI calling JVM functions/events from native code?

From Dev

How to test system calls from the rake task

From Dev

Calling a static void Java method from JNI

From Dev

Keeping a native object in memory between calls from Java using JNI

From Dev

Java JNI NullPointerException after calling method from C with valid pointers

From Dev

Calling dll implemented JNI from C++

From Dev

C system calls open()

From Dev

C system calls fails

From Dev

JNI calling Java from C++ with multiple threads

From Dev

calling system() from c

From Dev

Storing System Calls in C Programming

From Dev

JNI C++ UnsatisfiedLinkError When Calling Method

From Dev

Linux System calls in C on OSX

From Dev

Calling java function from c++ using jni: Failed to find static method id

From Dev

C: Suppress system calls from binary

From Dev

How are system calls from man 2 invoked?

From Dev

Calling Java Methods from JNI results in program crash

From Dev

Error while calling C# from java using jni4net from 64 bit Os

From Dev

JNI: Calling a java method from C periodically is not working

From Dev

Calling RenderScript from C / JNI

From Dev

Data type conversion when (JNI) calling a function from cpp lib

From Dev

Calling JNI C function in another source file

Related Related

HotTag

Archive