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 Dev

Calling RenderScript from C / JNI

From Dev

calling system() from c

From Dev

Calling dll implemented JNI from C++

From Dev

Calling a Java variadic function from C through the JNI

From Dev

JNI calling Java from C++ with multiple threads

From Dev

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

From Dev

Java JNI NullPointerException after calling method from C with valid pointers

From Dev

C: Suppress system calls from binary

From Java

JNI Calls different in C vs C++?

From Dev

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

From Dev

C system calls fails

From Dev

C system calls open()

From Dev

Calling a static void Java method from JNI

From Java

Calling a DLL from an Applet via JNI

From Dev

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

From Dev

Calling JNI C function in another source file

From Dev

JNI C++ UnsatisfiedLinkError When Calling Method

From Java

JNI: From C code to Java and JNI

From Java

System calls vs C/C++ system calls

From Dev

Storing System Calls in C Programming

From Dev

Linux System calls in C on OSX

From Java

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

From Dev

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

From Java

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

From Dev

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

From Dev

Calling Java Methods from JNI results in program crash

From Java

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

From Java

JNI calling JVM functions/events from native code?

From Dev

Calling a Java Method from the native code using jni

Related Related

HotTag

Archive