Prev Previous Post   Next Post Next
Old 29th July 2010, 11:22   #1
Junior Member
Join Date: Jul 2010
Posts: 3
Winamp and Java (JNI) problem

I'm trying to write a Winamp plugin in Java with use of JNI.

this is my JavaNative class:

public class JavaNative

public static native void playPause();

this is the (important) code in gen_wmpTest:

void config()
// invoked when plugin is configured
SendMessage(plugin.hwndParent, WM_WA_IPC, 0, IPC_STARTPLAY);

JNIEXPORT void JNICALL Java_JavaNative_playPause(JNIEnv *env, jclass cls)
printf("jni call\n");
SendMessage(plugin.hwndParent, WM_WA_IPC, 0, IPC_STARTPLAY);

When I configure my plugin in Winamp it will start playing (as it should).
But when I make a call to playPause() in Java it doesn't
i DO get the message "jni call" in my command prompt.

Anyone has a clue on what I am doing wrong?

theepot is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump