Discussion:
JNA solutions to catch stdout/stderr of DLL
Amélie Pasquier
2010-06-21 07:58:43 UTC
Permalink
Hello,

What are the solutions to catch the standard outputs stdout/stderr of a DLL
in an interface JNA on Linux and Windows platforms ?
I tried to use the freopen function of C library, like this example :

--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Pointer freopen (String filename, String mode, Pointer stream);
}
-----------------------------------------------


-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w",
NativeLibrary.getInstance((Platform.isWindows() ? "msvcrt" :
"c").getFunction("stdout").getPointer(0));
}
----------------------------------------------

But, on Windows platform, the function "stdout" doesn't exist in msvcrt.dll.
In which library is it ?
Are there other solutions that are easier to implement ?

Thank you.
Timothy Wall
2010-06-21 11:45:02 UTC
Permalink
The implementation of stdout depends on your runtime library, but it is often of type FILE* and a preprocessor macro pointing at a static structure.
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of a DLL in an interface JNA on Linux and Windows platforms ?
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Pointer freopen (String filename, String mode, Pointer stream);
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance((Platform.isWindows() ? "msvcrt" : "c").getFunction("stdout").getPointer(0));
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in msvcrt.dll. In which library is it ?
Are there other solutions that are easier to implement ?
Thank you.
IsmAvatar
2010-06-21 13:59:05 UTC
Permalink
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it is often of type FILE* and a preprocessor macro pointing at a static structure.
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of a DLL in an interface JNA on Linux and Windows platforms ?
--------- Interface to C library --------------
public interface CLibrary extends Library {
        CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
        Pointer freopen (String filename, String mode, Pointer stream);
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
        CLibrary clib = CLibrary.INSTANCE;
        clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance((Platform.isWindows() ? "msvcrt" : "c").getFunction("stdout").getPointer(0));
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in msvcrt.dll. In which library is it ?
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
Amélie Pasquier
2010-06-21 15:45:37 UTC
Permalink
I already tested the redirects of stdout and stderr using System.setOut and
System.setErr. But only Java outputs are captured.
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?

With this code :
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
I have this error :
"java.lang.UnsatisfiedLinkError: Error looking up function 'stdout': La
procédure spécifiée est introuvable."

Thanks.
Post by IsmAvatar
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it is
often of type FILE* and a preprocessor macro pointing at a static structure.
Post by Timothy Wall
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of a
DLL in an interface JNA on Linux and Windows platforms ?
Post by Timothy Wall
Post by Amélie Pasquier
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Post by Timothy Wall
Post by Amélie Pasquier
Pointer freopen (String filename, String mode, Pointer stream);
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w",
"c").getFunction("stdout").getPointer(0));
Post by Timothy Wall
Post by Amélie Pasquier
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in
msvcrt.dll. In which library is it ?
Post by Timothy Wall
Post by Amélie Pasquier
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Amélie
IsmAvatar
2010-06-21 15:56:07 UTC
Permalink
I presume that wouldn't work because stdout, stderr, and stdin are
handles, not functions - variables respectively valued 1, 2, and 0.
Post by Amélie Pasquier
I already tested the redirects of stdout and stderr using System.setOut and
System.setErr. But only Java outputs are captured.
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
"java.lang.UnsatisfiedLinkError: Error looking up function 'stdout': La
procédure spécifiée est introuvable."
Thanks.
Post by IsmAvatar
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it is
often of type FILE* and a preprocessor macro pointing at a static structure.
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of a
DLL in an interface JNA on Linux and Windows platforms ?
--------- Interface to C library --------------
public interface CLibrary extends Library {
        CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
        Pointer freopen (String filename, String mode, Pointer stream);
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
        CLibrary clib = CLibrary.INSTANCE;
        clib.freopen("D:/stdout.txt", "w",
"c").getFunction("stdout").getPointer(0));
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in
msvcrt.dll. In which library is it ?
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Amélie
Amélie Pasquier
2010-06-21 16:02:17 UTC
Permalink
Yes, I tested also the "freopen" function with an integer stream... which
causes "java.lang.Error: Invalid memory access".
Post by IsmAvatar
I presume that wouldn't work because stdout, stderr, and stdin are
handles, not functions - variables respectively valued 1, 2, and 0.
Post by Amélie Pasquier
I already tested the redirects of stdout and stderr using System.setOut
and
Post by Amélie Pasquier
System.setErr. But only Java outputs are captured.
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
Post by Amélie Pasquier
"java.lang.UnsatisfiedLinkError: Error looking up function 'stdout': La
procédure spécifiée est introuvable."
Thanks.
Post by IsmAvatar
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it
is
Post by Amélie Pasquier
Post by IsmAvatar
Post by Timothy Wall
often of type FILE* and a preprocessor macro pointing at a static
structure.
Post by Amélie Pasquier
Post by IsmAvatar
Post by Timothy Wall
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of
a
Post by Amélie Pasquier
Post by IsmAvatar
Post by Timothy Wall
Post by Amélie Pasquier
DLL in an interface JNA on Linux and Windows platforms ?
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"),
CLibrary.class);
Post by Amélie Pasquier
Post by IsmAvatar
Post by Timothy Wall
Post by Amélie Pasquier
Pointer freopen (String filename, String mode, Pointer
stream);
Post by Amélie Pasquier
Post by IsmAvatar
Post by Timothy Wall
Post by Amélie Pasquier
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w",
"c").getFunction("stdout").getPointer(0));
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in
msvcrt.dll. In which library is it ?
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
Timothy Wall
2010-06-21 16:04:03 UTC
Permalink
Look at the header file stdio.h for the platform in question. On a unix-based system, you'd find something like this:

#define stdin &iobuf[0]; // look up the variable "iobuf"

or maybe this:

extern FILE* stdin; // look up the variable stdin

I don't know what the definition is for msvcrt.dll.
I already tested the redirects of stdout and stderr using System.setOut and System.setErr. But only Java outputs are captured.
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
"java.lang.UnsatisfiedLinkError: Error looking up function 'stdout': La procédure spécifiée est introuvable."
Thanks.
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it is often of type FILE* and a preprocessor macro pointing at a static structure.
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of a DLL in an interface JNA on Linux and Windows platforms ?
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Pointer freopen (String filename, String mode, Pointer stream);
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance((Platform.isWindows() ? "msvcrt" : "c").getFunction("stdout").getPointer(0));
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in msvcrt.dll. In which library is it ?
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Amélie
Amélie Pasquier
2010-06-21 16:30:21 UTC
Permalink
Thank you for this information.

In msvcrt.dll, standard outputs are defined like this :

#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])

So, I tried to call :
clib.freopen("D:/stdout.txt", "w",
NativeLibrary.getInstance("msvcrt").getFunction("__iob_func").getPointer(1));

There is no error, but there is no output in "stdout.txt" file.
Post by Timothy Wall
Look at the header file stdio.h for the platform in question. On a
#define stdin &iobuf[0]; // look up the variable "iobuf"
extern FILE* stdin; // look up the variable stdin
I don't know what the definition is for msvcrt.dll.
Post by Amélie Pasquier
I already tested the redirects of stdout and stderr using System.setOut
and System.setErr. But only Java outputs are captured.
Post by Amélie Pasquier
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
Post by Amélie Pasquier
"java.lang.UnsatisfiedLinkError: Error looking up function 'stdout': La
procédure spécifiée est introuvable."
Post by Amélie Pasquier
Thanks.
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it is
often of type FILE* and a preprocessor macro pointing at a static structure.
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of
a DLL in an interface JNA on Linux and Windows platforms ?
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Pointer freopen (String filename, String mode, Pointer
stream);
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w",
"c").getFunction("stdout").getPointer(0));
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in
msvcrt.dll. In which library is it ?
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
dB.
2010-06-21 18:28:25 UTC
Permalink
I don't think this is going to work for a non-console application - and I bet that you aren't one since this is a Java process. GetStdHandle is going to give you the HANDLE that you want. This page - http://www.halcyon.com/~ast/dload/guicon.htm - seems to do something reasonable with it.
dB. @ dblock.org<http://www.dblock.org/>
Moscow|Geneva|Seattle|New York


From: Amélie Pasquier [mailto:apasquie-***@public.gmane.org]
Sent: Monday, June 21, 2010 12:30 PM
To: users-qzFMjIOsJ+***@public.gmane.org
Subject: Re: [jna-users] JNA solutions to catch stdout/stderr of DLL

Thank you for this information.

In msvcrt.dll, standard outputs are defined like this :

#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])

So, I tried to call :
clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance("msvcrt").getFunction("__iob_func").getPointer(1));

There is no error, but there is no output in "stdout.txt" file.

2010/6/21 Timothy Wall <twalljava-***@public.gmane.org<mailto:twalljava-***@public.gmane.orgt>>
Look at the header file stdio.h for the platform in question. On a unix-based system, you'd find something like this:

#define stdin &iobuf[0]; // look up the variable "iobuf"

or maybe this:

extern FILE* stdin; // look up the variable stdin

I don't know what the definition is for msvcrt.dll.
I already tested the redirects of stdout and stderr using System.setOut and System.setErr. But only Java outputs are captured.
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
"java.lang.UnsatisfiedLinkError: Error looking up function 'stdout': La procédure spécifiée est introuvable."
Thanks.
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it is often of type FILE* and a preprocessor macro pointing at a static structure.
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of a DLL in an interface JNA on Linux and Windows platforms ?
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Pointer freopen (String filename, String mode, Pointer stream);
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance((Platform.isWindows() ? "msvcrt" : "c").getFunction("stdout").getPointer(0));
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in msvcrt.dll. In which library is it ?
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe-qzFMjIOsJ+***@public.gmane.org<mailto:users-unsubscribe-qzFMjIOsJ+***@public.gmane.org>
For additional commands, e-mail: users-help-qzFMjIOsJ+***@public.gmane.org<mailto:users-help-qzFMjIOsJ+***@public.gmane.org>



--
Amélie
Timothy Wall
2010-06-21 19:26:40 UTC
Permalink
Post by Amélie Pasquier
Thank you for this information.
#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])
clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance("msvcrt").getFunction("__iob_func").getPointer(1));
__iob_func() appears to be a function call, which returns an array. Try mapping the function __iob_func, and have it return a Pointer. you'll want to run this under java.exe at first (rather than javaw.exe), since java.exe is a console application and javaw.exe is not. Whether it'll still work under javaw.exe is a different question.

NOTE: you may want to print the values of different levels of dereference to make sure you get the deferencing of the iob array correct, and compare to the output from a simple C program.
Post by Amélie Pasquier
There is no error, but there is no output in "stdout.txt" file.
#define stdin &iobuf[0]; // look up the variable "iobuf"
extern FILE* stdin; // look up the variable stdin
I don't know what the definition is for msvcrt.dll.
I already tested the redirects of stdout and stderr using System.setOut and System.setErr. But only Java outputs are captured.
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
"java.lang.UnsatisfiedLinkError: Error looking up function 'stdout': La procédure spécifiée est introuvable."
Thanks.
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it is often of type FILE* and a preprocessor macro pointing at a static structure.
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of a DLL in an interface JNA on Linux and Windows platforms ?
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Pointer freopen (String filename, String mode, Pointer stream);
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance((Platform.isWindows() ? "msvcrt" : "c").getFunction("stdout").getPointer(0));
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in msvcrt.dll. In which library is it ?
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
Amélie Pasquier
2010-06-23 09:35:30 UTC
Permalink
How can I get the different levels of dereference of iob pointer ?

The following code return this error : Bounds exceeds available space :
size=4, offset=5
-------------------------------------------
Pointer io = clib.__iob_func();
PointerByReference pio = new PointerByReference(io);
clib.freopen("D:/stdout.txt", "w", pio.getPointer().getPointer(1));
--------------------------------------------

My Java program is a GUI application. So I could not launch the program with
java.exe.
And I can not change the DLL to redirect stdout and stderr outputs to a Java
notification.
Are there any other alternatives to redirect stdout/stderr from a DLL, in
JNA code ?
Post by Amélie Pasquier
Post by Amélie Pasquier
Thank you for this information.
#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])
clib.freopen("D:/stdout.txt", "w",
NativeLibrary.getInstance("msvcrt").getFunction("__iob_func").getPointer(1));
__iob_func() appears to be a function call, which returns an array. Try
mapping the function __iob_func, and have it return a Pointer. you'll want
to run this under java.exe at first (rather than javaw.exe), since java.exe
is a console application and javaw.exe is not. Whether it'll still work
under javaw.exe is a different question.
NOTE: you may want to print the values of different levels of dereference
to make sure you get the deferencing of the iob array correct, and compare
to the output from a simple C program.
Post by Amélie Pasquier
There is no error, but there is no output in "stdout.txt" file.
Look at the header file stdio.h for the platform in question. On a
#define stdin &iobuf[0]; // look up the variable "iobuf"
extern FILE* stdin; // look up the variable stdin
I don't know what the definition is for msvcrt.dll.
Post by Amélie Pasquier
I already tested the redirects of stdout and stderr using System.setOut
and System.setErr. But only Java outputs are captured.
Post by Amélie Pasquier
Post by Amélie Pasquier
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
Post by Amélie Pasquier
Post by Amélie Pasquier
"java.lang.UnsatisfiedLinkError: Error looking up function 'stdout': La
procédure spécifiée est introuvable."
Post by Amélie Pasquier
Post by Amélie Pasquier
Thanks.
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it
is often of type FILE* and a preprocessor macro pointing at a static
structure.
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr
of a DLL in an interface JNA on Linux and Windows platforms ?
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
I tried to use the freopen function of C library, like this example
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Pointer freopen (String filename, String mode, Pointer
stream);
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w",
"c").getFunction("stdout").getPointer(0));
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in
msvcrt.dll. In which library is it ?
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
Timothy Wall
2010-06-23 11:10:29 UTC
Permalink
Post by Amélie Pasquier
How can I get the different levels of dereference of iob pointer ?
The following code return this error : Bounds exceeds available space : size=4, offset=5
-------------------------------------------
Pointer io = clib.__iob_func();
PointerByReference pio = new PointerByReference(io);
clib.freopen("D:/stdout.txt", "w", pio.getPointer().getPointer(1));
--------------------------------------------
io and io.getPointer(0) would be the first two obvious choices.

Since iob_func apparently returns an array of FILE* (as opposed to FILE**), you should be able to use io.getPointer({0,Pointer.SIZE,Pointer.SIZE*2}) to get the FILE* values. The argument passed is the offset from the base pointer address (which in this case I am assuming is the address of the array).

If iob_func is instead returning FILE*, you'll have to offset by sizeof(FILE) instead, which might be kinda tricky. Can you find any declaration of __iob_func in your headers?

BTW, PointerByReference is meant to give you space to hold a pointer value, *not* to try to get the address of an existing object.
Post by Amélie Pasquier
My Java program is a GUI application. So I could not launch the program with java.exe.
And I can not change the DLL to redirect stdout and stderr outputs to a Java notification.
Are there any other alternatives to redirect stdout/stderr from a DLL, in JNA code ?
Post by Amélie Pasquier
Thank you for this information.
#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])
clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance("msvcrt").getFunction("__iob_func").getPointer(1));
__iob_func() appears to be a function call, which returns an array. Try mapping the function __iob_func, and have it return a Pointer. you'll want to run this under java.exe at first (rather than javaw.exe), since java.exe is a console application and javaw.exe is not. Whether it'll still work under javaw.exe is a different question.
NOTE: you may want to print the values of different levels of dereference to make sure you get the deferencing of the iob array correct, and compare to the output from a simple C program.
Post by Amélie Pasquier
There is no error, but there is no output in "stdout.txt" file.
#define stdin &iobuf[0]; // look up the variable "iobuf"
extern FILE* stdin; // look up the variable stdin
I don't know what the definition is for msvcrt.dll.
I already tested the redirects of stdout and stderr using System.setOut and System.setErr. But only Java outputs are captured.
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
"java.lang.UnsatisfiedLinkError: Error looking up function 'stdout': La procédure spécifiée est introuvable."
Thanks.
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it is often of type FILE* and a preprocessor macro pointing at a static structure.
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of a DLL in an interface JNA on Linux and Windows platforms ?
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Pointer freopen (String filename, String mode, Pointer stream);
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance((Platform.isWindows() ? "msvcrt" : "c").getFunction("stdout").getPointer(0));
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in msvcrt.dll. In which library is it ?
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
Amélie Pasquier
2010-06-23 13:16:33 UTC
Permalink
__iob_func returns an array of FILE :
--------------------------------------
FILE * __iob_func(void);
--------------------------------------

FILE structure is defined like this :
------------------------------------------
struct _iobuf {
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
};
typedef struct _iobuf FILE;
------------------------------------------

So, I suppose sizeof(FILE) = 32.
Post by Amélie Pasquier
#define stdout (&__iob_func()[1])
I can do "io.getPointer(32)". But, it represents "__iob_func()[1]" which is
a FILE type.
How can I do to get the address of this FILE, to get a FILE * ?
Post by Amélie Pasquier
Post by Amélie Pasquier
How can I get the different levels of dereference of iob pointer ?
size=4, offset=5
Post by Amélie Pasquier
-------------------------------------------
Pointer io = clib.__iob_func();
PointerByReference pio = new PointerByReference(io);
clib.freopen("D:/stdout.txt", "w", pio.getPointer().getPointer(1));
--------------------------------------------
io and io.getPointer(0) would be the first two obvious choices.
Since iob_func apparently returns an array of FILE* (as opposed to FILE**),
you should be able to use io.getPointer({0,Pointer.SIZE,Pointer.SIZE*2}) to
get the FILE* values. The argument passed is the offset from the base
pointer address (which in this case I am assuming is the address of the
array).
If iob_func is instead returning FILE*, you'll have to offset by
sizeof(FILE) instead, which might be kinda tricky. Can you find any
declaration of __iob_func in your headers?
BTW, PointerByReference is meant to give you space to hold a pointer value,
*not* to try to get the address of an existing object.
Post by Amélie Pasquier
My Java program is a GUI application. So I could not launch the program
with java.exe.
Post by Amélie Pasquier
And I can not change the DLL to redirect stdout and stderr outputs to a
Java notification.
Post by Amélie Pasquier
Are there any other alternatives to redirect stdout/stderr from a DLL, in
JNA code ?
Post by Amélie Pasquier
Post by Amélie Pasquier
Thank you for this information.
#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])
clib.freopen("D:/stdout.txt", "w",
NativeLibrary.getInstance("msvcrt").getFunction("__iob_func").getPointer(1));
Post by Amélie Pasquier
__iob_func() appears to be a function call, which returns an array. Try
mapping the function __iob_func, and have it return a Pointer. you'll want
to run this under java.exe at first (rather than javaw.exe), since java.exe
is a console application and javaw.exe is not. Whether it'll still work
under javaw.exe is a different question.
Post by Amélie Pasquier
NOTE: you may want to print the values of different levels of dereference
to make sure you get the deferencing of the iob array correct, and compare
to the output from a simple C program.
Post by Amélie Pasquier
Post by Amélie Pasquier
There is no error, but there is no output in "stdout.txt" file.
Look at the header file stdio.h for the platform in question. On a
#define stdin &iobuf[0]; // look up the variable "iobuf"
extern FILE* stdin; // look up the variable stdin
I don't know what the definition is for msvcrt.dll.
Post by Amélie Pasquier
I already tested the redirects of stdout and stderr using
System.setOut and System.setErr. But only Java outputs are captured.
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
La procédure spécifiée est introuvable."
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Thanks.
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you
wish
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
to use them. Also note that this will also redirect any output that
your own Java program produces.
On Mon, Jun 21, 2010 at 7:45 AM, Timothy Wall <
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but
it is often of type FILE* and a preprocessor macro pointing at a static
structure.
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr
of a DLL in an interface JNA on Linux and Windows platforms ?
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
I tried to use the freopen function of C library, like this
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Pointer freopen (String filename, String mode, Pointer
stream);
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w",
"c").getFunction("stdout").getPointer(0));
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in
msvcrt.dll. In which library is it ?
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
Timothy Wall
2010-06-23 19:03:09 UTC
Permalink
Post by Amélie Pasquier
--------------------------------------
FILE * __iob_func(void);
--------------------------------------
------------------------------------------
struct _iobuf {
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
};
typedef struct _iobuf FILE;
------------------------------------------
So, I suppose sizeof(FILE) = 32.
Post by Amélie Pasquier
#define stdout (&__iob_func()[1])
I can do "io.getPointer(32)". But, it represents "__iob_func()[1]" which is a FILE type.
How can I do to get the address of this FILE, to get a FILE * ?
So __iob_func() returns the address of the first FILE structure. You could define a JNA Structure for FILE, initialize one with the base address, and then use STructure.toArray(3) to get all three.

Or you could just do Pointer.share(32), Pointer.share(64) to get the other offsets.
Post by Amélie Pasquier
Post by Amélie Pasquier
How can I get the different levels of dereference of iob pointer ?
The following code return this error : Bounds exceeds available space : size=4, offset=5
-------------------------------------------
Pointer io = clib.__iob_func();
PointerByReference pio = new PointerByReference(io);
clib.freopen("D:/stdout.txt", "w", pio.getPointer().getPointer(1));
--------------------------------------------
io and io.getPointer(0) would be the first two obvious choices.
Since iob_func apparently returns an array of FILE* (as opposed to FILE**), you should be able to use io.getPointer({0,Pointer.SIZE,Pointer.SIZE*2}) to get the FILE* values. The argument passed is the offset from the base pointer address (which in this case I am assuming is the address of the array).
If iob_func is instead returning FILE*, you'll have to offset by sizeof(FILE) instead, which might be kinda tricky. Can you find any declaration of __iob_func in your headers?
BTW, PointerByReference is meant to give you space to hold a pointer value, *not* to try to get the address of an existing object.
Post by Amélie Pasquier
My Java program is a GUI application. So I could not launch the program with java.exe.
And I can not change the DLL to redirect stdout and stderr outputs to a Java notification.
Are there any other alternatives to redirect stdout/stderr from a DLL, in JNA code ?
Post by Amélie Pasquier
Thank you for this information.
#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])
clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance("msvcrt").getFunction("__iob_func").getPointer(1));
__iob_func() appears to be a function call, which returns an array. Try mapping the function __iob_func, and have it return a Pointer. you'll want to run this under java.exe at first (rather than javaw.exe), since java.exe is a console application and javaw.exe is not. Whether it'll still work under javaw.exe is a different question.
NOTE: you may want to print the values of different levels of dereference to make sure you get the deferencing of the iob array correct, and compare to the output from a simple C program.
Post by Amélie Pasquier
There is no error, but there is no output in "stdout.txt" file.
#define stdin &iobuf[0]; // look up the variable "iobuf"
extern FILE* stdin; // look up the variable stdin
I don't know what the definition is for msvcrt.dll.
I already tested the redirects of stdout and stderr using System.setOut and System.setErr. But only Java outputs are captured.
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
"java.lang.UnsatisfiedLinkError: Error looking up function 'stdout': La procédure spécifiée est introuvable."
Thanks.
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you wish
to use them. Also note that this will also redirect any output that
your own Java program produces.
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but it is often of type FILE* and a preprocessor macro pointing at a static structure.
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs stdout/stderr of a DLL in an interface JNA on Linux and Windows platforms ?
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Pointer freopen (String filename, String mode, Pointer stream);
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w", NativeLibrary.getInstance((Platform.isWindows() ? "msvcrt" : "c").getFunction("stdout").getPointer(0));
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in msvcrt.dll. In which library is it ?
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
Amélie Pasquier
2010-06-24 08:04:27 UTC
Permalink
OK, thanks a lot for all your responses.
This code works very well.

--------------------------------------------------------------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Pointer freopen ( String filename, String mode, Pointer stream );
Pointer __iob_func();
}

public static void main(String[] args) {
CLibrary clib = CLibrary.INSTANCE;
Pointer io = clib.__iob_func();
clib.freopen("D:/stdout.txt", "w", io.share(32));
}
----------------------------------------------------------------------
Post by Amélie Pasquier
Post by Amélie Pasquier
--------------------------------------
FILE * __iob_func(void);
--------------------------------------
------------------------------------------
struct _iobuf {
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
};
typedef struct _iobuf FILE;
------------------------------------------
So, I suppose sizeof(FILE) = 32.
Post by Amélie Pasquier
#define stdout (&__iob_func()[1])
I can do "io.getPointer(32)". But, it represents "__iob_func()[1]" which
is a FILE type.
Post by Amélie Pasquier
How can I do to get the address of this FILE, to get a FILE * ?
So __iob_func() returns the address of the first FILE structure. You could
define a JNA Structure for FILE, initialize one with the base address, and
then use STructure.toArray(3) to get all three.
Or you could just do Pointer.share(32), Pointer.share(64) to get the other offsets.
Post by Amélie Pasquier
Post by Amélie Pasquier
How can I get the different levels of dereference of iob pointer ?
size=4, offset=5
Post by Amélie Pasquier
Post by Amélie Pasquier
-------------------------------------------
Pointer io = clib.__iob_func();
PointerByReference pio = new PointerByReference(io);
clib.freopen("D:/stdout.txt", "w", pio.getPointer().getPointer(1));
--------------------------------------------
io and io.getPointer(0) would be the first two obvious choices.
Since iob_func apparently returns an array of FILE* (as opposed to
FILE**), you should be able to use
io.getPointer({0,Pointer.SIZE,Pointer.SIZE*2}) to get the FILE* values. The
argument passed is the offset from the base pointer address (which in this
case I am assuming is the address of the array).
Post by Amélie Pasquier
If iob_func is instead returning FILE*, you'll have to offset by
sizeof(FILE) instead, which might be kinda tricky. Can you find any
declaration of __iob_func in your headers?
Post by Amélie Pasquier
BTW, PointerByReference is meant to give you space to hold a pointer
value, *not* to try to get the address of an existing object.
Post by Amélie Pasquier
Post by Amélie Pasquier
My Java program is a GUI application. So I could not launch the program
with java.exe.
Post by Amélie Pasquier
Post by Amélie Pasquier
And I can not change the DLL to redirect stdout and stderr outputs to a
Java notification.
Post by Amélie Pasquier
Post by Amélie Pasquier
Are there any other alternatives to redirect stdout/stderr from a DLL,
in JNA code ?
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Thank you for this information.
#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])
clib.freopen("D:/stdout.txt", "w",
NativeLibrary.getInstance("msvcrt").getFunction("__iob_func").getPointer(1));
Post by Amélie Pasquier
Post by Amélie Pasquier
__iob_func() appears to be a function call, which returns an array.
Try mapping the function __iob_func, and have it return a Pointer. you'll
want to run this under java.exe at first (rather than javaw.exe), since
java.exe is a console application and javaw.exe is not. Whether it'll still
work under javaw.exe is a different question.
Post by Amélie Pasquier
Post by Amélie Pasquier
NOTE: you may want to print the values of different levels of
dereference to make sure you get the deferencing of the iob array correct,
and compare to the output from a simple C program.
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
There is no error, but there is no output in "stdout.txt" file.
Look at the header file stdio.h for the platform in question. On a
#define stdin &iobuf[0]; // look up the variable "iobuf"
extern FILE* stdin; // look up the variable stdin
I don't know what the definition is for msvcrt.dll.
Post by Amélie Pasquier
I already tested the redirects of stdout and stderr using
System.setOut and System.setErr. But only Java outputs are captured.
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
That is why I tried to use "freopen" function of C library.
But what is the code to call the macro stdout from this library ?
"NativeLibrary.getInstance("msvcrt").getFunction("stdout").getPointer(0))"
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
"java.lang.UnsatisfiedLinkError: Error looking up function
'stdout': La procédure spécifiée est introuvable."
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Thanks.
In Java, I figure you could capture stdout and stderr using
System.setOut and System.setErr. Of course, you'll need to make a
backup of System.out and System.err and restore them later if you
wish
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
to use them. Also note that this will also redirect any output that
your own Java program produces.
On Mon, Jun 21, 2010 at 7:45 AM, Timothy Wall <
Post by Timothy Wall
The implementation of stdout depends on your runtime library, but
it is often of type FILE* and a preprocessor macro pointing at a static
structure.
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Hello,
What are the solutions to catch the standard outputs
stdout/stderr of a DLL in an interface JNA on Linux and Windows platforms ?
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
I tried to use the freopen function of C library, like this
--------- Interface to C library --------------
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Pointer freopen (String filename, String mode, Pointer
stream);
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
}
-----------------------------------------------
-------- Main function ------------------
public static void main(String[] args)
{
CLibrary clib = CLibrary.INSTANCE;
clib.freopen("D:/stdout.txt", "w",
"c").getFunction("stdout").getPointer(0));
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
}
----------------------------------------------
But, on Windows platform, the function "stdout" doesn't exist in
msvcrt.dll. In which library is it ?
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Timothy Wall
Post by Amélie Pasquier
Are there other solutions that are easier to implement ?
Thank you.
---------------------------------------------------------------------
---------------------------------------------------------------------
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
Post by Amélie Pasquier
--
Amélie
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
---------------------------------------------------------------------
--
Amélie
Loading...