//Returns the PID for spotify application. public int getProcessId(IntPtr hwnd) { int processId = 0; int windowThreadProcessId = DLL_Methods.GetWindowThreadProcessId(hwnd, out processId); return(processId); }
//Returns the PID for spotify application. public int getSpotifyPID() { int processId = 0; int windowThreadProcessId = DLL_Methods.GetWindowThreadProcessId(getSpotifyWindowHandle(), out processId); return(processId); }
//Returns handle to the spotify window. public IntPtr getSpotify() { return(DLL_Methods.FindWindow("SpotifyMainWindow", null)); }