I'm devoliping a C DLL library which uses Windows Multimedia API. As I told in a previous message I'm having several problems and I'm begining to suspect that one of them is related to types.
For example, here is the Windows Multimedia API description for a structure call MIXERLINE:
typedef struct {
DWORD cbStruct;
DWORD dwDestination;
DWORD dwSource;
DWORD dwLineID;
DWORD fdwLine;
DWORD dwUser;
DWORD dwComponentType;
DWORD cChannels;
DWORD cConnections;
DWORD cControls;
CHAR szShortName[MIXER_SHORT_NAME_CHARS];
CHAR szName[MIXER_LONG_NAME_CHARS];
struct {
DWORD dwType;
DWORD dwDeviceID;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
CHAR szPname[MAXPNAMELEN];
} Target;
} MIXERLINE;
In the Windows API you can see the descriptions for each data type:
DWORD - 32-bit unsigned integer.
WORD - 16-bit unsigned integer.
CHAR - 8-bit Windows (ANSI) character.
What are the equivalent types in C for DWORD, WORD and CHAR? Do I have to use long in Java, and jlong in the C code of the DLL library, to handle DWORD variables, for example?
The DLL stops when I'm trying to execute something like:
jobjectMixerControl = (*env)->NewObject(env, jclassMixerControl, jmethodIDMixerControlConstructor);
and doesn't show any error. The Java application just ends and tells me that the exit code is 128. What does it mean? Is there a way to get more information about what's happening and which is the real cause of the error? Because I've checked jclassMixerControl and jmethodIDMixerControlConstructor variables, and both are right.