This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import * | |
import struct | |
import re | |
assert RPR_GetAppVersion()[-4:] == '/x64' | |
def console(s): | |
RPR_ShowConsoleMsg(str(s) + '\n') | |
class MODULEINFO(Structure): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <reaper_plugin.h> | |
#include <ns-eel.h> | |
/* | |
* If you actually try this, the JS effect that uses the new function should not be the first one loaded, | |
* otherwise you will get an "undefined 'myadd'" error. | |
* Workarounds: recompile/reset or add any JS effect before this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// params: y0, y1, interleaved x, coeff, n | |
static EEL_F NSEEL_CGEN_CALL dotprod2(void *opaque, INT_PTR np, EEL_F **parms) { | |
EEL_F **blocks = (EEL_F **)opaque; | |
int xofs = *parms[2]; | |
int cofs = *parms[3]; | |
int n = *parms[4]; | |
*parms[0] = 0.0; | |
*parms[1] = 0.0; | |
if (unlikely(n <= 0 || xofs < 0 || cofs < 0 || |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <math.h> | |
#include "ns-eel.h" | |
#ifndef I_KNOW_WHAT_I_AM_DOING | |
#error Hardcoded offsets are for 32-bit 5.95 and possibly other versions | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
kernel32 = ctypes.windll.kernel32 | |
# __declspec(dllexport) __thiscall int add3(int a, int b, int c) { | |
# return a + b + c; | |
# } | |
_add3 = ctypes.cdll.lib.add3 | |
buf = kernel32.VirtualAlloc(0, 4096, 0x3000, 0x40) |