elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a la Factorización De Semiprimos (RSA)


  Mostrar Mensajes
Páginas: 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16
11  Programación / Programación Visual Basic / Re: Problemas al registrar VB6IDEMouseWheelAddin.dll en Win Vista en: 9 Agosto 2009, 22:35 pm
Ya Ejecutaste CMD como administrador?

no te lo habia dicho hace rato????
12  Programación / Programación Visual Basic / Re: Problemas al registrar VB6IDEMouseWheelAddin.dll en Win Vista en: 8 Agosto 2009, 05:34 am
Ya Ejecutaste CMD como administrador?
13  Programación / Programación Visual Basic / Re: Comprimir en ZIP con Visual Basic? en: 4 Agosto 2009, 04:46 am
si eso tambien me di cuenta, alguna respuesta a este problema   :huh:
14  Programación / Programación Visual Basic / Re: Comprimir en ZIP con Visual Basic? en: 4 Agosto 2009, 04:34 am
grande che, Leandro eres un excelente programador estuve hace algún tiempo viendo la forma de hacerlo sin compilar a p-code, pero me rendi, buen trabajo  ;D

PD. es mejor hacerlo sin depender de componentes externos y usando objeto Shell.Application no siempre funciona, generalmente no se puede usar en los windows desatendidos
15  Programación / Programación Visual Basic / Re: Comprimir en ZIP con Visual Basic? en: 4 Agosto 2009, 02:30 am
Este código es de MachineDramon [Gedzac], excelente codigo basado en el zip store del I-Wom mydoom.a.

para que trabaje debes compilarlo en p-code  :D

Código
  1. If Zipea("myfile", "nombrefile.zip", "nombrefile") = True Then msgbox "Compresion de Archivo Exitosa"

Código
  1. Private Declare Function CreateFile Lib "Kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
  2. Private Declare Function ReadFile Lib "Kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, lpOverlapped As Long) As Long
  3. Private Declare Function WriteFile Lib "Kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, lpOverlapped As Long) As Long
  4. Private Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As Long) As Long
  5. Private Declare Function GlobalAlloc Lib "Kernel32" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
  6. Private Declare Function GlobalFree Lib "Kernel32" (ByVal hMem As Long) As Long
  7. Private Declare Function GetFileSize Lib "Kernel32" (ByVal hFile As Long, lpFileSizeHigh As Long) As Long
  8. Private Declare Sub ZeroMemory Lib "Kernel32" Alias "RtlZeroMemory" (dest As Any, ByVal numbytes As Long)
  9. Private Declare Function SetFilePointer Lib "Kernel32" (ByVal hFile As Long, ByVal lDistanceToMove As Long, lpDistanceToMoveHigh As Long, ByVal dwMoveMethod As Long) As Long
  10. Private Declare Sub GetSystemTime Lib "Kernel32" (lpSystemTime As SYSTEMTIME)
  11. Private Declare Sub CopyMemory Lib "Kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
  12.  
  13. Private Const FILE_BEGIN = 0
  14. Private Const GENERIC_READ = &H80000000
  15. Private Const GENERIC_WRITE = &H40000000
  16. Private Const FILE_SHARE_READ = &H1
  17. Private Const CREATE_ALWAYS = 2
  18. Private Const OPEN_EXISTING = 3
  19. Private Const INVALID_HANDLE_VALUE = -1
  20. Private Const GMEM_FIXED = &H0
  21. Private Const GMEM_ZEROINIT = &H40
  22. Private Const GPTR = (GMEM_FIXED Or GMEM_ZEROINIT)
  23.  
  24. Private Type LOCAL_FILE_HEADER
  25. Signature As Long          'Firma &H04034b50
  26. ver_needed As Integer      'Version minima de software necesaria para extraer el archivo
  27. Flags As Integer           'Opciones
  28. method As Integer          'Metodo de compresion
  29. lastmod_time As Integer    'Tiempo de ultima modificacion
  30. lastmod_date As Integer    'Fecha de ultima modificacion
  31. crcLO As Integer                'CRC del file
  32. crcHI As Integer
  33. compressed_sizeLO As Integer    'Tamaño de file comprimido
  34. compressed_sizeHI As Integer
  35. uncompressed_sizeLO As Integer  'Tamaño del file sin comprimir
  36. uncompressed_sizeHI As Integer
  37. filename_length As Integer 'Longitud del nombre del Archivo
  38. extra_length As Integer    'Longitud de "InFormacion Adicional" ¿?
  39. End Type
  40.  
  41. Private Type CENTRAL_DIRECTORY_STRUCTURE
  42. Signature As Long          'FIRMA &H02014b50
  43. made_by As Integer         'Indica SO y version de software donde se comprimio el file
  44. ver_needed As Integer      'Version minima de software necesaria para extraer el archivo
  45. Flags As Integer           'Opciones
  46. method As Integer          'Metodo de compresion
  47. lastmod_time As Integer    'Tiempo de ultima modificacion
  48. lastmod_date As Integer    'Fecha de ultima modificacion
  49. crc As Long                'CRC del file
  50. compressed_size As Long    'Tamaño de file comprimido
  51. uncompressed_size As Long  'Tamaño del file sin comprimir
  52. filename_length As Integer 'Longitud del nombre del Archivo
  53. extra_length As Integer    'Longitud de "InFormacion Adicional" ¿?
  54. comment_length As Integer  'Longitud de los comentarios
  55. disk_nums As Integer       'El número del disco por el cual este archivo comienza ¿?
  56. internal_attr As Integer   'Opciones entre ellas: Si el file tiene datos ASCII(texto) o Binarios
  57. external_attrLO As Integer 'Opciones entre ellas: Tipo de Sistema de Archivos
  58. external_attrHI As Integer '
  59. local_offs As Long         'N° de Byte donde comienza el correspondiente
  60.                            'LOCAL_FILE_HEADER de esta struct CENTRAL_DIRECTORY_STRUCTURE
  61. End Type
  62.  
  63. Private Type END_CENTRAL_DIR
  64. Signature As Long           'FIrma &H06054b50
  65. disk_nums As Integer        '"El número de este disco, que contiene el expediente de extremo central del directorio" ¿?
  66. disk_dirstart As Integer    '"El número del disco en el cual el directorio central comienza" ¿?
  67. disk_dir_entries As Integer 'El número de entradas en el central directory en este disco
  68. dir_entries As Integer      'El número total de archivos en el zipfile
  69. dir_size As Long            'El tamaño (en bytes) de la o las CENTRAL_DIRECTORY_STRUCTURE que contenga el zip
  70. dir_offs As Long            'N° de Byte donde comienza la CENTRAL_DIRECTORY_STRUCTURE o la primera CENTRAL_DIRECTORY_STRUCTURE
  71.                             'si es que hay más de una
  72. comment_length As Integer   'Longitud de los Comentarios
  73. End Type
  74.  
  75. Private Type SYSTEMTIME
  76. wYear As Integer
  77. wMonth As Integer
  78. wDayOfWeek As Integer
  79. wDay As Integer
  80. wHour As Integer
  81. wMinute As Integer
  82. wSecond As Integer
  83. wMilliseconds As Integer
  84. End Type
  85.  
  86. Private Type HL_DWORD
  87. LOWORD As Integer
  88. HIWORD As Integer
  89. End Type
  90.  
  91. Private CRCTable(256) As Long
  92.  
  93. Private Sub SetCRCTable()
  94. 'Code CRC32 de www.vbaccelerator.com
  95. On Error Resume Next
  96. Dim dwPolynomial As Long, dwCrc As Long, I As Integer, j As Integer
  97. dwPolynomial = &HEDB88320
  98.  
  99. For I = 0 To 255
  100.  dwCrc = I
  101.  For j = 8 To 1 Step -1
  102.   If (dwCrc And 1) Then
  103.   dwCrc = ((dwCrc And &HFFFFFFFE) \ 2&) And &H7FFFFFFF
  104.   dwCrc = dwCrc Xor dwPolynomial
  105.   Else
  106.   dwCrc = ((dwCrc And &HFFFFFFFE) \ 2&) And &H7FFFFFFF
  107.   End If
  108.  Next
  109.  CRCTable(I) = dwCrc
  110. Next
  111. End Sub
  112.  
  113. Private Function GetCRC32(Buffer As String) As Long
  114. 'Code CRC32 de www.vbaccelerator.com
  115. On Error Resume Next
  116. Dim crc As Long, I As Long, iLookup As Integer
  117.  
  118. crc = &HFFFFFFFF
  119.  
  120. For I = 1 To Len(Buffer)
  121. iLookup = (crc And &HFF) Xor Asc(Mid(Buffer, I, 1))
  122. crc = ((crc And &HFFFFFF00) \ &H100) And 16777215
  123. crc = crc Xor CRCTable(iLookup)
  124. Next
  125.  
  126. GetCRC32 = Not (crc)
  127. End Function
  128.  
  129. Public Function Zipea(ffile As String, fzip As String, fname As String) As Boolean
  130. On Error Resume Next
  131. Dim lfh As LOCAL_FILE_HEADER
  132. Dim cds As CENTRAL_DIRECTORY_STRUCTURE
  133. Dim ecd As END_CENTRAL_DIR
  134. Dim st As SYSTEMTIME
  135. Dim File As String, FPtr As Long
  136. Dim sz As Long, Dw As Long, o As Long
  137. Dim hFile As Long, hZip As Long
  138. Dim HL As HL_DWORD
  139. Dim CRC32 As Long
  140.  
  141. o = 0
  142.  
  143. hFile = CreateFile(ffile, GENERIC_READ, FILE_SHARE_READ, ByVal 0&, OPEN_EXISTING, 0, 0)
  144. If (hFile = INVALID_HANDLE_VALUE) Then Zipea = False: Exit Function
  145.  
  146. hZip = CreateFile(fzip, GENERIC_WRITE, FILE_SHARE_READ, ByVal 0&, CREATE_ALWAYS, 0, 0)
  147. If (hZip = INVALID_HANDLE_VALUE) Then CloseHandle (hFile): Zipea = False: Exit Function
  148.  
  149. ZeroMemory ByVal lfh, Len(lfh)
  150. ZeroMemory ByVal cds, Len(cds)
  151. ZeroMemory ByVal ecd, Len(ecd)
  152.  
  153. Call GetSystemTime(st)
  154. If (st.wHour > 12) Then st.wHour = st.wHour - 12
  155.  
  156. sz = GetFileSize(hFile, 0)
  157.  
  158. lfh.Signature = &H4034B50
  159. lfh.ver_needed = 10
  160. lfh.Flags = 0
  161. lfh.method = 0
  162. lfh.lastmod_time = (st.wHour) * (2 ^ 11) Or (st.wMinute * (2 ^ 5)) Or (st.wSecond / 2)
  163. lfh.lastmod_date = ((st.wYear - 1980) * (2 ^ 9)) Or (st.wMonth * (2 ^ 5)) Or (st.wDay)
  164. CopyMemory ByVal HL, sz, 4
  165. lfh.uncompressed_sizeHI = HL.HIWORD And &HFFFF
  166. lfh.uncompressed_sizeLO = HL.LOWORD And &HFFFF
  167. lfh.compressed_sizeHI = HL.HIWORD And &HFFFF
  168. lfh.compressed_sizeLO = HL.LOWORD And &HFFFF
  169. lfh.filename_length = Len(fname)
  170. lfh.extra_length = 0
  171.  
  172. cds.Signature = &H2014B50
  173. cds.made_by = 20           'MSDOS=0, PKZIP 2.0 =20
  174. cds.ver_needed = 10
  175. cds.Flags = 0
  176. cds.method = 0
  177. cds.lastmod_time = (st.wHour) * (2 ^ 11) Or (st.wMinute * (2 ^ 5)) Or (st.wSecond / 2)
  178. cds.lastmod_date = ((st.wYear - 1980) * (2 ^ 9)) Or (st.wMonth * (2 ^ 5)) Or (st.wDay)
  179. cds.compressed_size = sz
  180. cds.uncompressed_size = sz
  181. cds.filename_length = Len(fname)
  182. cds.extra_length = 0
  183. cds.comment_length = 0
  184. cds.disk_nums = 0
  185. cds.local_offs = 0
  186. cds.internal_attr = 0      'Datos Binarios
  187. cds.external_attrLO = &H20 'FAT_32 (&H20=32)
  188. cds.external_attrHI = &H0
  189.  
  190. Call SetFilePointer(hFile, 0, 0, FILE_BEGIN)
  191. FPtr = GlobalAlloc(GPTR, sz)
  192. If (FPtr = 0) Then Zipea = False: GoTo Cierra
  193.  
  194.  Call ReadFile(hFile, ByVal FPtr, sz, Dw, ByVal 0)
  195.  If (Dw = 0) Then Zipea = False: GoTo Cierra
  196.  
  197.  File = Space$(Dw)
  198.  CopyMemory ByVal File, ByVal FPtr, Dw
  199.  
  200. Call SetCRCTable
  201.  
  202. CRC32 = GetCRC32(File)
  203.  
  204. CopyMemory ByVal HL, CRC32, 4
  205. lfh.crcLO = HL.LOWORD And &HFFFF
  206. lfh.crcHI = HL.HIWORD And &HFFFF
  207.  
  208. cds.crc = CRC32
  209.  
  210. Call WriteFile(hZip, ByVal lfh, Len(lfh), Dw, ByVal 0&)
  211. Call WriteFile(hZip, ByVal fname, Len(fname), Dw, ByVal 0&)
  212. Call WriteFile(hZip, ByVal File, sz, Dw, ByVal 0&)
  213.  
  214. GlobalFree (FPtr)
  215. o = o + (Len(lfh) + Len(fname) + sz)
  216.  
  217. ecd.dir_offs = o
  218.  
  219. Call WriteFile(hZip, ByVal cds, Len(cds), Dw, ByVal 0&)
  220. Call WriteFile(hZip, ByVal fname, Len(fname), Dw, ByVal 0&)
  221. o = o + (Len(cds) + Len(fname))
  222.  
  223. ecd.Signature = &H6054B50
  224. ecd.disk_nums = 0
  225. ecd.disk_dirstart = 0
  226. ecd.disk_dir_entries = 1
  227. ecd.dir_entries = 1
  228. ecd.dir_size = o - ecd.dir_offs
  229. ecd.comment_length = 0
  230. Call WriteFile(hZip, ByVal ecd, Len(ecd), Dw, ByVal 0&)
  231.  
  232. Zipea = True
  233. Cierra:
  234. CloseHandle (hFile): CloseHandle (hZip)
  235. End Function
  236.  
  237.  
  238.  
16  Programación / Scripting / Re: explication de bat en: 26 Julio 2009, 03:13 am
Citar
holas  todos !! ie posible elaborare un bat que ejecute un comando  at tutti  i dias para que abra una pagina specifica??
I.e  tutti i dias 10.30  www.google.com


grazie
Gino
>:( http://foro.elhacker.net/analisis_y_diseno_de_malware/crear_comando_infinito_con_at-t190062.0.html,
17  Programación / Programación Visual Basic / Re: se podria convertir una imagen jpg en bmp desde vbasic (solucionado) en: 25 Julio 2009, 00:47 am
mira esto tambien te puede servir

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=7270
18  Programación / Programación Visual Basic / Re: se podria convertir una imagen jpg en bmp desde vbasic en: 25 Julio 2009, 00:42 am
en vb si usas librerias como estas siempre seras dependiente de ellas, como dice el post anterior es mejor a puro vb pero requiere de tiempo, igualmente si la necesitas en tu aplicacion compilada puedes agregarla como recurso luego la extraes y la registras y ya.

saludos espero te haya sido de ayuda
19  Programación / Programación Visual Basic / Re: se podria convertir una imagen jpg en bmp desde vbasic en: 25 Julio 2009, 00:19 am
si claro que se puede hacer, en el momento solo te puedo ayudar con este code pero el problema es que depemde de una dll externa "VIC32", igual aqui te dejo el codigo, y la libreria.

Código
  1. Declare Function jpeginfo Lib "VIC32.DLL" (ByVal Fname As String, jdat As JpegData) As Long
  2. Declare Function allocimage Lib "VIC32.DLL" (image As imgdes, ByVal wid As Long, ByVal leng As Long, ByVal BPPixel As Long) As Long
  3. Declare Function loadjpg Lib "VIC32.DLL" (ByVal Fname As String, desimg As imgdes) As Long
  4. Declare Sub freeimage Lib "VIC32.DLL" (image As imgdes)
  5. Declare Function savebmp Lib "VIC32.DLL" (ByVal Fname As String, srcimg As imgdes, ByVal compression As Long) As Long
  6.  
  7. ' Image descriptor
  8. Type imgdes
  9.   ibuff As Long
  10.   stx As Long
  11.   sty As Long
  12.   endx As Long
  13.   endy As Long
  14.   buffwidth As Long
  15.   palette As Long
  16.   colors As Long
  17.   imgtype As Long
  18.   bmh As Long
  19.   hBitmap As Long
  20. End Type
  21.  
  22. Type JpegData
  23.    ftype As Long
  24.    width As Long
  25.    length As Long
  26.    comps As Long
  27.    precision As Long
  28.    sampfac0 As Long
  29.    sampfac1 As Long
  30.    sampfac2 As Long
  31.    sampfac3 As Long
  32.    vbitcount As Long
  33. End Type
  34.  
  35.  
  36. Public Sub Main()
  37.  
  38.  
  39. Dim tmpimage As imgdes
  40.   Dim rcode As Long
  41.   Dim jdat As JpegData     ' Reserve space for JPEG file info
  42.   Dim bmp_fname As String
  43.   Dim jpg_fname As String
  44.  
  45.   bmp_fname = "pathmyfilebmp.bmp"
  46.   jpg_fname = "pathmyfile.jpg"
  47.  
  48.   ' Get info on the file we're to load
  49.   rcode = jpeginfo(jpg_fname, jdat)
  50.   If (rcode <> NO_ERROR) Then
  51.      MsgBox "Cannot find file", 0, "Error encountered!"
  52.      Exit Sub
  53.   End If
  54.  
  55.   ' Allocate space for an image
  56.   rcode = allocimage(tmpimage, jdat.width, jdat.length, jdat.vbitcount)
  57.   If (rcode <> NO_ERROR) Then
  58.     MsgBox "Not enough memory", 0, "Error encountered!"
  59.     Exit Sub
  60.   End If
  61.  
  62.   ' Load image
  63.   rcode = loadjpg(jpg_fname, tmpimage)
  64.   If (rcode <> NO_ERROR) Then
  65.      freeimage tmpimage ' Free image on error
  66.      MsgBox "Cannot load file", 0, "Error encountered!"
  67.      Exit Sub
  68.   End If
  69.  
  70.   ' Save image
  71.   rcode = savebmp(bmp_fname, tmpimage, 0)
  72.   freeimage tmpimage
  73. End Sub

Descargar DLL
20  Programación / Programación Visual Basic / Re: Tenguna una duda simple en: 24 Julio 2009, 21:10 pm
mira esto es lo que necesitas, creo que el autor es EON

Código
  1. Private Const PAGE_READWRITE As Long = &H4
  2. Private Const MEM_RELEASE As Long = &H8000
  3. Private Const MEM_COMMIT As Long = &H1000
  4. Private Const STANDARD_RIGHTS_REQUIRED As Long = &HF0000
  5. Private Const SYNCHRONIZE As Long = &H100000
  6. Private Const PROCESS_ALL_ACCESS As Long = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &HFFF)
  7. Private Const INFINITE As Long = &HFFFFFF
  8.  
  9. Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
  10. Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
  11. Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long
  12. Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Long, ByVal lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long
  13. Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  14.  
  15. Private Declare Function CreateRemoteThread Lib "kernel32" (ByVal hProcess As Long, lpThreadAttributes As Long, ByVal dwStackSize As Long, lpStartAddress As Long, lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long
  16. Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
  17. Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
  18.  
  19.  
  20. Private Declare Function EnumProcesses Lib "psapi.dll" (ByRef lpidProcess As Long, ByVal cb As Long, ByRef cbNeeded As Long) As Long
  21. Private Declare Function GetModuleFileNameExA Lib "psapi.dll" (ByVal hProcess As Long, ByVal hModule As Long, ByVal ModuleName As String, ByVal nSize As Long) As Long
  22. Private Declare Function EnumProcessModules Lib "psapi.dll" (ByVal hProcess As Long, ByRef lphModule As Long, ByVal cb As Long, ByRef cbNeeded As Long) As Long
  23.  
  24. Private Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
  25. Private Declare Function Process32First Lib "kernel32" (ByVal hSnapshot As Long, lppe As Any) As Long
  26. Private Declare Function Process32Next Lib "kernel32" (ByVal hSnapshot As Long, lppe As Any) As Long
  27. Private Declare Function CreateToolhelp32Snapshot Lib "kernel32" (ByVal lFlgas As Long, ByVal lProcessID As Long) As Long
  28.  
  29. Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
  30.  
  31. Private Const TH32CS_SNAPPROCESS As Long = 2&
  32.  
  33. Private Type PROCESSENTRY32
  34.        dwSize As Long
  35.        cntUsage As Long
  36.        th32ProcessID As Long
  37.        th32DefaultHeapID As Long
  38.        th32ModuleID As Long
  39.        cntThreads As Long
  40.        th32ParentProcessID As Long
  41.        pcPriClassBase As Long
  42.        dwFlags As Long
  43.        szexeFile As String * 260
  44. End Type
  45.  
  46.  
  47. Public Function Inyecta(RutaDll As String, Pid As Long) As Integer
  48. Dim proc As Long
  49. Dim nload As Long
  50. Dim rems As Long
  51. Dim longi As Long
  52. Dim RemThread As Long
  53. Dim Tid As Long
  54.  
  55. On Error GoTo Error
  56.  
  57. proc = OpenProcess(PROCESS_ALL_ACCESS, False, Pid)
  58. nload = GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA")
  59. rems = VirtualAllocEx(proc, 0, Len(RutaDll), MEM_COMMIT, PAGE_READWRITE)
  60. WriteProcessMemory proc, ByVal rems, ByVal RutaDll, Len(RutaDll), longi
  61. CreateRemoteThread proc, ByVal 0, 0, ByVal nload, ByVal rems, 0, Tid
  62. WaitForSingleObject rems, INFINITE
  63. CloseHandle proc
  64. CloseHandle rems
  65. Inyecta = 0
  66. Exit Function
  67. Error:
  68. Inyecta = 1
  69. End Function
  70.  
  71. Public Function GET_PID(szProcess As String)
  72.    On Error Resume Next
  73.  
  74.    Dim PROCCESS_ID As Long
  75.    Dim l As Long, l1 As Long, l2 As Long, Ol As Long, pShot As PROCESSENTRY32
  76.  
  77.    l1 = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)
  78.    pShot.dwSize = Len(pShot)
  79.    l2 = Process32Next(l1, pShot)
  80.    Do While l2
  81.        If InStr(pShot.szexeFile, szProcess) <> 0 Then
  82.            PROCCESS_ID = pShot.th32ProcessID
  83.            GET_PID = PROCCESS_ID
  84.        End If
  85.        l2 = Process32Next(l1, pShot)
  86.    Loop
  87.    l = CloseHandle(l1)
  88.  
  89. End Function
Páginas: 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines