Skip to content

Commit

Permalink
Initial (and final I suppose) commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Oct 14, 2022
0 parents commit 7762ec7
Show file tree
Hide file tree
Showing 7 changed files with 2,397 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(CMAKE_GENERATOR_PLATFORM "Win32" CACHE STRING "" FORCE)
PROJECT(winmm)
ENABLE_LANGUAGE(C CXX)
ADD_LIBRARY(winmm SHARED winmm.cpp winmm.def empty.h hook_macro.h)
Empty file added empty.h
Empty file.
9 changes: 9 additions & 0 deletions hook.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "hook_macro.h"

#define WAVEOUTSETVOLUME

#include <Windows.h>

FAKE(MMRESULT, __stdcall, waveOutSetVolume, HWAVEOUT hwo, DWORD dwVolume) { // currently, the parsing code only support __cdecl functions.
return 0;
}
11 changes: 11 additions & 0 deletions hook_macro.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef _HOOK_MACRO_H
#define _HOOK_MACRO_H

#define DECL_FN_PTR(RETTYPE, CONVENTION, FN_NAME, ...) \
typedef RETTYPE (CONVENTION *FN_NAME##_ptr)(__VA_ARGS__)
#define FAKE(RETTYPE, CONVENTION, FN_NAME, ...) \
DECL_FN_PTR(RETTYPE, CONVENTION, FN_NAME, __VA_ARGS__); \
FN_NAME##_ptr FN_NAME##_real; \
RETTYPE CONVENTION FN_NAME##_fake(__VA_ARGS__)

#endif
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is just a winmm.dll-wrapper that ignores waveOutSetVolume-calls to sidestep a problem in DeliPlayer. Wrapper-code was generated via wrap_dll.
Loading

0 comments on commit 7762ec7

Please sign in to comment.