#define _WIN32_WINNT 0x0501	// for Windows XP
#include "PodcastTask.h"
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>

JNIEXPORT void JNICALL Java_PodcastTask_putStandby(JNIEnv * env, jobject jobj)
{
	typedef BOOL (WINAPI*tSetSuspendState)(BOOL, BOOL, BOOL);
   tSetSuspendState SetSuspendState;
	HMODULE hPowerFunctions;  
  
	hPowerFunctions = LoadLibrary("Powrprof.dll");  
	SetSuspendState = (tSetSuspendState)GetProcAddress(hPowerFunctions, "SetSuspendState");
	
	SetSuspendState(FALSE, FALSE, FALSE);
}
