Hay forma de obtener la fecha actual a partir de un servidor o una base SQL y si existe una forma me podrían dar un ejemplo basico es para comprobar que la fecha del sistema no sea editada...
Gracias
Gracias
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú Const PAGE_READWRITE As Integer = &H4
Const MEM_RELEASE As Integer = &H8000
Const MEM_COMMIT As Integer = &H1000
Const STANDARD_RIGHTS_REQUIRED As Integer = &HF0000
Const SYNCHRONIZE As Integer = &H100000
Const PROCESS_VM_READ As Integer = &H10
Const PROCESS_VM_WRITE As Integer = (&H20)
Const PROCESS_VM_OPERATION As Integer = (&H8)
Const PROCESS_QUERY_INFORMATION As Integer = (&H400)
Const PROCESS_READ_WRITE_QUERY As Integer = PROCESS_VM_READ + PROCESS_VM_WRITE + PROCESS_VM_OPERATION + PROCESS_QUERY_INFORMATION
Const PROCESS_ALL_ACCESS As Integer = &H1F0FFF
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Integer, ByVal lpProcName As String) As Integer
Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Integer
Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Integer, ByVal lpAddress As Integer, ByVal dwSize As Integer, ByVal flAllocationType As Integer, ByVal flProtect As Integer) As Integer
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Object, ByVal lpBuffer As Object, ByVal nSize As Integer, ByVal lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Private Declare Function CreateRemoteThread Lib "kernel32" (ByVal hProcess As Integer, ByVal lpThreadAttributes As Integer, ByVal dwStackSize As Integer, ByVal lpStartAddress As Integer, ByVal lpParameter As Object, ByVal dwCreationFlags As Integer, ByVal lpThreadId As Integer) As Integer
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Integer, ByVal dwMilliseconds As Integer) As Integer
Public Function InyectDLL(ByVal Dll As String, ByVal PID As Integer) As Boolean
On Error GoTo 0
Dim Buffer1 As Integer, _
Buffer2 As Integer, _
OpenedP As Integer = OpenProcess(PROCESS_ALL_ACCESS, False, PID), _
AddressP As Integer = GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryW"), _
rems As Integer = VirtualAllocEx(OpenedP, 0, Len(Dll), MEM_COMMIT, PAGE_READWRITE)
WriteProcessMemory(OpenedP, rems, Dll, Len(Dll), Buffer2)
CreateRemoteThread(OpenedP, 0, 0, AddressP, rems, 0, Buffer1)
WaitForSingleObject(rems, &HFFFFFF)
CloseHandle(OpenedP) : CloseHandle(rems)
Return True
End Function
Public Function InyectDLL(ByVal Dll As String, ByVal PID As Integer) As Boolean
On Error GoTo 0
Dim Buffer1 As Integer, _
Buffer2 As Integer, _
OpenedP As Integer = OpenProcess(PROCESS_ALL_ACCESS, False, PID), _
AddressP As Integer = GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryW"), _
rems As Integer = VirtualAllocEx(OpenedP, 0, Len(Dll), MEM_COMMIT, PAGE_READWRITE)
WriteProcessMemory(OpenedP, rems, Dll, Len(Dll), Buffer2)
CreateRemoteThread(OpenedP, 0, 0, AddressP, rems, 0, Buffer1)
WaitForSingleObject(rems, &HFFFFFF)
CloseHandle(OpenedP) : CloseHandle(rems)
Return True
End Function