Crunchyroll-Downloader-v3.0/Crunchyroll Downloader/ProcessSleep.vb
hama3254 6e665140e4 3.4 update
- added a http webserver and made a Firefox addon to control the downloader
 (the server need to be activated in the settings)
 basic example : https://www.youtube.com/watch?v=AzgNzCrXfpo (works also for funimation)

-rewritten the funimation name methods and added subfolder support
-fixed issues with funimation subtitels
2020-08-16 23:27:48 +02:00

35 lines
1.2 KiB
VB.net

Module ProcessSleep
Public Enum ThreadAccess As Integer
TERMINATE = (&H1)
SUSPEND_RESUME = (&H2)
GET_CONTEXT = (&H8)
SET_CONTEXT = (&H10)
SET_INFORMATION = (&H20)
QUERY_INFORMATION = (&H40)
SET_THREAD_TOKEN = (&H80)
IMPERSONATE = (&H100)
DIRECT_IMPERSONATION = (&H200)
End Enum
Public Declare Function OpenThread Lib "kernel32.dll" (ByVal dwDesiredAccess As ThreadAccess, ByVal bInheritHandle As Boolean, ByVal dwThreadId As UInteger) As IntPtr
Public Declare Function SuspendThread Lib "kernel32.dll" (ByVal hThread As IntPtr) As UInteger
Public Declare Function ResumeThread Lib "kernel32.dll" (ByVal hThread As IntPtr) As UInteger
Public Declare Function CloseHandle Lib "kernel32.dll" (ByVal hHandle As IntPtr) As Boolean
Public Sub Pause(ByVal pau As Single)
'Programmausführung verzögern *******************************************************
Dim start, finish As Single
start = Microsoft.VisualBasic.DateAndTime.Timer
finish = start + pau
Do While Microsoft.VisualBasic.DateAndTime.Timer < finish
Application.DoEvents()
Loop
End Sub
End Module