//open new song private static void SpotifyOpenTrack() { Main.SendMessage("Executing open track detours!"); using (var handleProvider = new GCHandleProvider(new OpenTrack_t(OpenTrack_hk))) { DetoursLoader.DetourTransactionBegin(); DetoursLoader.DetourUpdateThread(); DetoursLoader.DetourAttach(ref OpenTrack, handleProvider.Pointer); DetoursLoader.DetourTransactionCommit(); } }
//detect ads private static void SpotifyTrackAds() { Main.SendMessage("Tracking ads!"); using (var handleProvider = new GCHandleProvider(new CmdAddTextGAIA_t(CmdAddTextGAIA_hk))) { DetoursLoader.DetourTransactionBegin(); DetoursLoader.DetourUpdateThread(); DetoursLoader.DetourAttach(ref CmdAddTextGAIA, handleProvider.Pointer); DetoursLoader.DetourTransactionCommit(); } }