Jump to content

WiseReminder feature requests, bug reports, updated translations


Recommended Posts

  • 3 weeks later...
  • 4 weeks later...

hi developers

thanks for nice program

 

please add native support song for Wise Reminder

 

temporary i written hook dll add it in import table (lord pe) and strip reloc table

 

// fhgfvgghfgh.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "MinHook.h"

#if defined _M_X64
#pragma comment(lib, "libMinHook.x64.lib")
#elif defined _M_IX86
#pragma comment(lib, "libMinHook.x86.lib")
#endif

void middle_volume()
{
	MMRESULT result;
	HMIXER hMixer;
	result = mixerOpen(&hMixer, MIXER_OBJECTF_MIXER, 0, 0, 0);


	MIXERLINE ml = {0};
	ml.cbStruct = sizeof(MIXERLINE);
	ml.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS;
	result = mixerGetLineInfo((HMIXEROBJ) hMixer, 
		&ml, MIXER_GETLINEINFOF_COMPONENTTYPE);


	MIXERLINECONTROLS mlc = {0};
	MIXERCONTROL mc = {0};
	mlc.cbStruct = sizeof(MIXERLINECONTROLS);
	mlc.dwLineID = ml.dwLineID;
	mlc.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
	mlc.cControls = 1;
	mlc.pamxctrl = &mc;
	mlc.cbmxctrl = sizeof(MIXERCONTROL);
	result = mixerGetLineControls((HMIXEROBJ) hMixer, 
		&mlc, MIXER_GETLINECONTROLSF_ONEBYTYPE);


	MIXERCONTROLDETAILS mcd = {0};
	MIXERCONTROLDETAILS_UNSIGNED mcdu = {0};
	mcdu.dwValue = 20767; // the volume is a number between 0 and 65535
	mcd.cbStruct = sizeof(MIXERCONTROLDETAILS);
	mcd.hwndOwner = 0;
	mcd.dwControlID = mc.dwControlID;
	mcd.paDetails = &mcdu;
	mcd.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);
	mcd.cChannels = 1;
	result = mixerSetControlDetails((HMIXEROBJ) hMixer, 
		&mcd, MIXER_SETCONTROLDETAILSF_VALUE);


	mcd.dwControlID = 3;
	result = mixerSetControlDetails((HMIXEROBJ) hMixer, 
		&mcd, MIXER_SETCONTROLDETAILSF_VALUE);

	mcd.dwControlID = 7;
	result = mixerSetControlDetails((HMIXEROBJ) hMixer, 
		&mcd, MIXER_SETCONTROLDETAILSF_VALUE);

	mixerClose(hMixer);
}

void mute_off()
{
	MMRESULT result;
	HMIXER hMixer;
	result = mixerOpen(&hMixer, MIXER_OBJECTF_MIXER, 0, 0, 0);


	MIXERLINE ml = {0};
	ml.cbStruct = sizeof(MIXERLINE);
	ml.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS;
	result = mixerGetLineInfo((HMIXEROBJ) hMixer, 
		&ml, MIXER_GETLINEINFOF_COMPONENTTYPE);


	MIXERLINECONTROLS mlc = {0};
	MIXERCONTROL mc = {0};
	mlc.cbStruct = sizeof(MIXERLINECONTROLS);
	mlc.dwLineID = ml.dwLineID;
	mlc.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
	mlc.cControls = 1;
	mlc.pamxctrl = &mc;
	mlc.cbmxctrl = sizeof(MIXERCONTROL);
	result = mixerGetLineControls((HMIXEROBJ) hMixer, 
		&mlc, MIXER_GETLINECONTROLSF_ONEBYTYPE);

	mlc.dwControlType = MIXERCONTROL_CONTROLTYPE_MUTE;
	result = mixerGetLineControls((HMIXEROBJ) hMixer, 
		&mlc, MIXER_GETLINECONTROLSF_ONEBYTYPE);

	MIXERCONTROLDETAILS mcd = {0};
	MIXERCONTROLDETAILS_UNSIGNED mcdu = {0};
	mcdu.dwValue = 32767; // the volume is a number between 0 and 65535
	mcd.cbStruct = sizeof(MIXERCONTROLDETAILS);
	mcd.hwndOwner = 0;
	mcd.dwControlID = mc.dwControlID;
	mcd.paDetails = &mcdu;
	mcd.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);
	mcd.cChannels = 1;
	
	MIXERCONTROLDETAILS_BOOLEAN mcb = {0};
	mcb.fValue    = false; 
	mcd.paDetails = &mcb;
	mcd.cbDetails = sizeof(MIXERCONTROLDETAILS_BOOLEAN);
	result = mixerSetControlDetails((HMIXEROBJ) hMixer, 
		&mcd, MIXER_SETCONTROLDETAILSF_VALUE);

	mixerClose(hMixer);
}







HSTREAM stream;

void play_sound(PCH song)
{
	BASS_ChannelStop(stream);
	BASS_StreamFree(stream);

	stream = BASS_StreamCreateFile(FALSE, song, 0, 0, BASS_SAMPLE_LOOP);
	BASS_ChannelSetAttribute((DWORD)stream, BASS_ATTRIB_VOL, (float)100 / 100.f);
	BASS_ChannelPlay(stream, FALSE);
}


typedef BOOL
WINAPI
DestroyWindow_t(
			  __in HWND hWnd);


DestroyWindow_t* pfnDestroyWindow;


BOOL
WINAPI
DestroyWindow_Hook(
				__in HWND hWnd)
{
	BASS_ChannelStop(stream);
	BASS_StreamFree(stream);
	stream = 0;

	return pfnDestroyWindow(hWnd);
}

typedef WINUSERAPI
BOOL
WINAPI
MessageBeep_t(
			__in UINT uType);

MessageBeep_t* pfnMessageBeep;
bool inited;

BOOL
WINAPI
MessageBeep_Hook(
			  __in UINT uType)
{
	void* p =_ReturnAddress();
	
	if (p >= PVOID(0x400000) && p < PVOID(0x400000 + 0x1ce000))
	{
		if (!inited)
		{
			BASS_Init(1, 44100, 0, 0, NULL);
			inited = true;
		}

		middle_volume();
		mute_off();

		play_sound("c:/wapres.wav");

		return TRUE;
	}

	return pfnMessageBeep(uType);
}


void splice()
{
	MH_Initialize();

	HMODULE mod = LoadLibrary(TEXT("user32"));
	void* ptr = GetProcAddress(mod, "MessageBeep");

	MH_CreateHook(ptr, MessageBeep_Hook, 
		reinterpret_cast<void**>(&pfnMessageBeep));

	MH_EnableHook(ptr);


	ptr = GetProcAddress(mod, "DestroyWindow");

	MH_CreateHook(ptr, DestroyWindow_Hook, 
		reinterpret_cast<void**>(&pfnDestroyWindow));

	MH_EnableHook(ptr);
}


BOOL CALLBACK DllMain(HINSTANCE, DWORD reason, LPVOID)
{
	if (DLL_PROCESS_ATTACH == reason)
	{
		splice();
	}

	return TRUE;
}



extern "C" __declspec(dllexport) void lock() 
{
}
Link to post
Share on other sites
  • 4 months later...
  • 1 year later...

Hello. Thank you for the cool program Wise Reminder.
I would like to propose to add to the program:

  • Filtration by the type of 'Repeat' (all, daily, weekly, monthly, yearly). It may be tabs, select list, checkboxes, buttons or something else.
  • Sort by date and time for each filtration group.

Sincerely, lesnoj.

Link to post
Share on other sites
  • 7 months later...
  • 4 months later...

Hello,

 

I have been using Wise Reminder for around a year and love it. I'm running Windows 10/64 bit. The program works fine for around 2-3 weeks and then when a reminder window pops up, it no longer give me the option to postpone. I have re-installed it several times. After the re-install it works again. Any thoughts on how I can make it permanent?

 

Thanks!

Link to post
Share on other sites
  • xilolee pinned, pinned and pinned this topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...