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


Tema destacado: Los 10 CVE más críticos (peligrosos) de 2020


  Mostrar Mensajes
Páginas: 1 ... 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 [870] 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 ... 1254
8691  Programación / .NET (C#, VB.NET, ASP) / Re: "Acceso denegado al Registro solicitado." (System.Security.Security.Exception) en: 21 Julio 2013, 02:20 am
A pesar de tus esfuerzos el segundo código a mi no me funciona, me da el mismo error que comentas en el primer código.

He probado decenas de códigos, he estudiado un poco sobre RegistryKeyPermissionCheck ,RegistryRights ,SetAccessControl ,RegistryAccessRule , y RegistryKey

Incluso he probado un código koreano!... pero nada ha valido la pena, parece algo de locos intentar modificar los permisos de una clave en .NET, Google no tiene la respuesta.

A mi me habría gustado solucionar tu problema porque también me serviría para mi en un futuro, pero parece muy dificil conseguirlo, así que quizás quieras mirar esta alternativa que hice:
-> http://foro.elhacker.net/net/libreria_de_snippets_posteen_aqui_sus_snippets-t378770.0.html;msg1872406#msg1872406

Saludos.
8692  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 21 Julio 2013, 02:15 am
No apruebo el uso de aplicaciones commandline a menos que sea para situaciones complicadas y tediosas como esta...

...Una class para usar SETACL para modificar el propietario de una clave de registro y para modificar los permisos de la clave:

PD: a ver si alguien nos sorprende con un código nativo...  :silbar:

Código
  1. #Region " SETACL Helper "
  2.  
  3.  
  4. ' [ SETACL Helper ]
  5. '
  6. ' // By Elektro H@cker
  7. '
  8. '
  9. ' INSTRUCTIONS:
  10. ' 1. Add the "SETACL.exe" in the project.
  11. '
  12. ' Examples :
  13. '
  14. ' SETACL.Set_Owner("HKCU\Test", True)
  15. ' SETACL.Set_Permission("HKCU\Test\", SETACL.SETACL_Permission.full, False)
  16.  
  17.  
  18. Public Class SETACL
  19.  
  20.    ' <summary>
  21.    ' Gets or sets the SETACL executable path.
  22.    ' </summary>
  23.    Public Shared SETACL_Location As String = ".\SetACL.exe"
  24.  
  25.    ' <summary>
  26.    ' Gets or sets the SETACL logfile filename.
  27.    ' </summary>
  28.    Public Shared SETACL_Logfile As String = ".\SetACL.log"
  29.  
  30.  
  31.    Public Enum SETACL_Permission
  32.  
  33.        ' <summary>
  34.        ' Create link
  35.        ' </summary>
  36.        create_link
  37.  
  38.        ' <summary>
  39.        ' Create subkeys
  40.        ' </summary>
  41.        create_subkey
  42.  
  43.        ' <summary>
  44.        ' Delete
  45.        ' </summary>
  46.        delete
  47.  
  48.        ' <summary>
  49.        ' Enumerate subkeys
  50.        ' </summary>
  51.        enum_subkeys
  52.  
  53.        ' <summary>
  54.        ' Notify
  55.        ' </summary>
  56.        notify
  57.  
  58.        ' <summary>
  59.        ' Query value
  60.        ' </summary>
  61.        query_val
  62.  
  63.        ' <summary>
  64.        ' Read control
  65.        ' </summary>
  66.        read_access
  67.  
  68.        ' <summary>
  69.        ' Set value
  70.        ' </summary>
  71.        set_val
  72.  
  73.        ' <summary>
  74.        ' Write permissions
  75.        ' </summary>
  76.        write_dacl
  77.  
  78.        ' <summary>
  79.        ' Take ownership
  80.        ' </summary>
  81.        write_owner
  82.  
  83.  
  84.        ' <summary>
  85.        ' Read (KEY_ENUMERATE_SUB_KEYS + KEY_EXECUTE + KEY_NOTIFY + KEY_QUERY_VALUE + KEY_READ + READ_CONTROL)
  86.        ' </summary>
  87.        read
  88.  
  89.        ' <summary>
  90.        ' Full access
  91.        ' (KEY_CREATE_LINK + KEY_CREATE_SUB_KEY +KEY_ENUMERATE_SUB_KEYS + ...
  92.        ' ...KEY_EXECUTE + KEY_NOTIFY + KEY_QUERY_VALUE + KEY_READ + KEY_SET_VALUE + ...
  93.        ' ...KEY_WRITE + READ_CONTROL + WRITE_OWNER + WRITE_DAC + DELETE)
  94.        ' </summary>
  95.        full
  96.  
  97.    End Enum
  98.  
  99.    ' <summary>
  100.    ' Checks if SETACL process is avaliable.
  101.    ' </summary>
  102.    Public Shared Function Is_Avaliable() As Boolean
  103.        Return IO.File.Exists(SETACL_Location)
  104.    End Function
  105.  
  106.    ' <summary>
  107.    ' Takes ownership of a registry key.
  108.    ' </summary>
  109.    Public Shared Sub Set_Owner(ByVal RegKey As String, ByVal Recursive As Boolean, Optional ByVal UserName As String = "%USERNAME%")
  110.  
  111.        If RegKey.EndsWith("\") Then RegKey = RegKey.Substring(0, RegKey.Length - 1)
  112.  
  113.        Dim Recursion As String = "No" : If Recursive Then Recursion = "Yes"
  114.  
  115.        Dim SETACL As New Process(), SETACL_Info As New ProcessStartInfo()
  116.  
  117.        SETACL_Info.FileName = SETACL_Location
  118.        SETACL_Info.Arguments = String.Format("-on ""{0}"" -ot reg -ownr ""n:{1}"" -rec ""{2}"" -actn setowner -silent -ignoreerr -log ""{3}""", RegKey, UserName, Recursion, SETACL_Logfile)
  119.        SETACL_Info.CreateNoWindow = True
  120.        SETACL_Info.UseShellExecute = False
  121.        SETACL.StartInfo = SETACL_Info
  122.        SETACL.Start()
  123.        SETACL.WaitForExit()
  124.  
  125.        If SETACL.ExitCode <> 0 Then
  126.            ' Throw New Exception("Exit code: " & SETACL.ExitCode)
  127.            MsgBox(IO.File.ReadAllText(SETACL_Logfile))
  128.        End If
  129.  
  130.    End Sub
  131.  
  132.    ' <summary>
  133.    ' Sets the user permission of a registry key.
  134.    ' </summary>
  135.    Public Shared Sub Set_Permission(ByVal RegKey As String, ByVal Permission As SETACL_Permission, ByVal Recursive As Boolean, Optional ByVal UserName As String = "%USERNAME%")
  136.  
  137.        If RegKey.EndsWith("\") Then RegKey = RegKey.Substring(0, RegKey.Length - 1)
  138.  
  139.        Dim Recursion As String = "No" : If Recursive Then Recursion = "Yes"
  140.  
  141.        Dim SETACL As New Process(), SETACL_Info As New ProcessStartInfo()
  142.  
  143.        SETACL_Info.FileName = SETACL_Location
  144.        SETACL_Info.Arguments = String.Format("-on ""{0}"" -ot reg -ace ""n:{1};p:{2}"" -rec ""{3}"" -actn ace -silent -ignoreerr -log ""{4}""", RegKey, UserName, Permission, Recursion, SETACL_Logfile)
  145.        SETACL_Info.CreateNoWindow = True
  146.        SETACL_Info.UseShellExecute = False
  147.        SETACL.StartInfo = SETACL_Info
  148.        SETACL.Start()
  149.        SETACL.WaitForExit()
  150.  
  151.        If SETACL.ExitCode <> 0 Then
  152.            ' Throw New Exception("Exit code: " & SETACL.ExitCode)
  153.            MsgBox(IO.File.ReadAllText(SETACL_Logfile))
  154.        End If
  155.  
  156.    End Sub
  157.  
  158. End Class
  159.  
  160. #End Region
8693  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 17:20 pm
Todavía nadie ha podido compilar el proyecto para "anycpu" y "x64"... si hay alguien que quiera colaborar... please.
8694  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 16:03 pm
Gracias por intentarlo omarhack, me voy a conectar ahora, no se si estarás,
ya hablamos...
8695  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 14:16 pm
voy a intentarlo a veeer :P

a ver a veeeeer  >:D
8696  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 12:09 pm
Me generas mucho spam xDDD pero sabes que agradezco la intención ;)
8697  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 11:37 am
se puede ejecutar C++/C en VS2012?

http://msdn.microsoft.com/en-us/library/vstudio/hh409293.aspx

Saludos...
8698  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 11:31 am
Tu usas el mismo VS2012 que yo, creo... A mi si se me abren ya que se me compilen es otra cosa... :xD

Si usaste mi instalador con las opciones por defecto entonces vas a ser incapaz de abrir un proyecto donde se maneje C/C++ ya que hay que elegir esos paquetes manualmente en el instalador (si se quieren instalar), en cambio los proyectos CSharp puro si que puedes abrirlos y además compilarlos.
8699  Programación / .NET (C#, VB.NET, ASP) / [SOLUCIONADO] Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 11:22 am
En mi VisualStudio no tengo instalados los paquetes necesarios para ejecutar algunos proyectos de C

Necesito que una persona bondadosa que use Visual C se apiade de mi alma jeje y me targetee este proyecto a la plataforma x64: http://downloads.sourceforge.net/freeimage/FreeImage3154.zip

...Como bien explican aquí paso a paso como hacerlo funcionar: http://www.sambeauvois.be/blog/2010/05/freeimage-and-x64-projects-yes-you-can/

Necesito esa librería compilada en "AnyCpu" y "x64"

De verdad que yo no puedo abrir el proyecto ni hacer nada con él, no es cuestión de vagancia, podría instalar una maquina virtual e instalar vs alli pero...requiere mucho tiempo y alguno de ustedes puede hacerlo en 5 minutos.

¿Alguien puede hacerlo?.

Un saludo, y gracias...
8700  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 20 Julio 2013, 10:56 am
Una class de ayuda para manejar lo básico de la librería FreeImage

Convertir entre formatos, convertir a escala de grises, rotar, redimensionar, generar un thumbnail...

http://freeimage.sourceforge.net/download.html

Código
  1. #Region " FreeImage Helper "
  2.  
  3.  
  4. ' [ FreeImage Helper ]
  5. '
  6. ' // By Elektro H@cker
  7. '
  8. '
  9. ' INSTRUCTIONS:
  10. ' 1. ADD A REFERENCE FOR "FreeImageNET.dll" IN THE PROJECT.
  11. ' 2. ADD THE "FREEIMAGE.DLL" IN THE PROJECT.
  12. '
  13. '
  14. ' Examples :
  15. '
  16. ' MsgBox(FreeImageHelper.Is_Avaliable() ' Result: True
  17. ' MsgBox(FreeImageHelper.Get_Version()  ' Result: 3.15.1
  18. ' MsgBox(FreeImageHelper.Get_ImageFormat("C:\Test.png")) ' Result: PNG
  19. '
  20. ' FreeImageHelper.Convert("C:\Test.png", "C:\Test.ico", FreeImageAPI.FREE_IMAGE_FORMAT.FIF_ICO)
  21. ' FreeImageHelper.Convert(New Bitmap("C:\Test.png"), "C:\Test.jpg", FreeImageAPI.FREE_IMAGE_FORMAT.FIF_JPEG, FreeImageAPI.FREE_IMAGE_SAVE_FLAGS.JPEG_SUBSAMPLING_444 Or FreeImageAPI.FREE_IMAGE_SAVE_FLAGS.JPEG_QUALITYSUPERB)
  22. '
  23. ' PictureBox1.BackgroundImage = FreeImageHelper.GrayScale(New Bitmap("C:\Test.bmp"))
  24. ' PictureBox1.BackgroundImage = FreeImageHelper.GrayScale("C:\Test.bmp")
  25. '
  26. ' PictureBox1.BackgroundImage = FreeImageHelper.Resize(New Bitmap("C:\Test.bmp"), 32, 32)
  27. ' PictureBox1.BackgroundImage = FreeImageHelper.Resize("C:\Test.bmp", 64, 128)
  28. '
  29. ' PictureBox1.BackgroundImage = FreeImageHelper.Rotate(New Bitmap("C:\Test.bmp"), 90)
  30. ' PictureBox1.BackgroundImage = FreeImageHelper.Rotate("C:\Test.bmp", -90)
  31. '
  32. ' PictureBox1.BackgroundImage = FreeImageHelper.Thumbnail(New Bitmap("C:\Test.png"), 64, True)
  33. ' PictureBox1.BackgroundImage = FreeImageHelper.Thumbnail("C:\Test.png", 64, True)
  34.  
  35.  
  36.  
  37. Imports FreeImageAPI
  38.  
  39. Public Class FreeImageHelper
  40.  
  41.    ' <summary>
  42.    ' Checks if <i>FreeImage.dll</i> is avaliable on the system.
  43.    ' </summary>
  44.    Public Shared Function Is_Avaliable() As Boolean
  45.        Return FreeImage.IsAvailable
  46.    End Function
  47.  
  48.    ' <summary>
  49.    ' Gets the version of FreeImage.dll.
  50.    ' </summary>
  51.    Shared Function Get_Version() As String
  52.        Return FreeImage.GetVersion
  53.    End Function
  54.  
  55.    ' <summary>
  56.    ' Gets the image format of a image file.
  57.    ' </summary>
  58.    Shared Function Get_ImageFormat(ByVal File As String) As String
  59.        Return FreeImage.GetFileType(File, 0).ToString.Substring(4)
  60.    End Function
  61.  
  62.    ' <summary>
  63.    ' Convert a Bitmap object between image formats and save it to disk.
  64.    ' </summary>
  65.    Shared Sub Convert(ByVal bmp As System.Drawing.Bitmap, _
  66.                       ByVal Output As String, _
  67.                       ByVal NewFormat As FREE_IMAGE_FORMAT, _
  68.                       Optional ByVal SaveFlags As FREE_IMAGE_SAVE_FLAGS = FREE_IMAGE_SAVE_FLAGS.DEFAULT)
  69.  
  70.        Try
  71.            FreeImage.SaveBitmap(bmp, Output, NewFormat, SaveFlags)
  72.        Catch ex As Exception
  73.            ' Throw New Exception(ex.Message)
  74.            MsgBox(ex.Message)
  75.        End Try
  76.  
  77.    End Sub
  78.  
  79.    ' <summary>
  80.    ' Convert a image file between image formats and save it to disk.
  81.    ' </summary>
  82.    Shared Sub Convert(ByVal File As String, _
  83.                       ByVal Output As String, _
  84.                       ByVal NewFormat As FREE_IMAGE_FORMAT, _
  85.                       Optional ByVal SaveFlags As FREE_IMAGE_SAVE_FLAGS = FREE_IMAGE_SAVE_FLAGS.DEFAULT)
  86.  
  87.        Try
  88.            FreeImage.Save(NewFormat, FreeImage.LoadEx(File), Output, SaveFlags)
  89.        Catch ex As Exception
  90.            ' Throw New Exception(ex.Message)
  91.            MsgBox(ex.Message)
  92.        End Try
  93.  
  94.    End Sub
  95.  
  96.    ' <summary>
  97.    ' GrayScales a Bitmap object.
  98.    ' </summary>
  99.    Shared Function GrayScale(ByVal bmp As System.Drawing.Bitmap) As System.Drawing.Bitmap
  100.  
  101.        Try
  102.  
  103.            Dim ImageStream As New System.IO.MemoryStream
  104.            bmp.Save(ImageStream, bmp.RawFormat)
  105.  
  106.            Dim Image As FIBITMAP = FreeImage.LoadFromStream(ImageStream)
  107.            ImageStream.Dispose()
  108.  
  109.            Return FreeImage.GetBitmap(FreeImage.ConvertToGreyscale(Image))
  110.  
  111.        Catch ex As Exception
  112.            ' Throw New Exception(ex.Message)
  113.            MsgBox(ex.Message)
  114.            Return Nothing
  115.        End Try
  116.  
  117.    End Function
  118.  
  119.    ' <summary>
  120.    ' GrayScales a image file.
  121.    ' </summary>
  122.    Shared Function GrayScale(ByVal File As String) As System.Drawing.Bitmap
  123.  
  124.        Try
  125.            Return FreeImage.GetBitmap(FreeImage.ConvertToGreyscale(FreeImage.LoadEx(File)))
  126.        Catch ex As Exception
  127.            ' Throw New Exception(ex.Message)
  128.            MsgBox(ex.Message)
  129.            Return Nothing
  130.        End Try
  131.  
  132.    End Function
  133.  
  134.    ' <summary>
  135.    ' Resizes a Bitmap object.
  136.    ' </summary>
  137.    Shared Function Resize(ByVal bmp As System.Drawing.Bitmap, _
  138.                           ByVal X As Int32, _
  139.                           ByVal Y As Int32, _
  140.                           Optional ByVal Quality As FREE_IMAGE_FILTER = FREE_IMAGE_FILTER.FILTER_BILINEAR) As System.Drawing.Bitmap
  141.  
  142.        Try
  143.  
  144.            Dim ImageStream As New System.IO.MemoryStream
  145.            bmp.Save(ImageStream, bmp.RawFormat)
  146.  
  147.            Dim Image As FIBITMAP = FreeImage.LoadFromStream(ImageStream)
  148.            ImageStream.Dispose()
  149.  
  150.            Return FreeImage.GetBitmap(FreeImage.Rescale(Image, X, Y, Quality))
  151.  
  152.        Catch ex As Exception
  153.            ' Throw New Exception(ex.Message)
  154.            MsgBox(ex.Message)
  155.            Return Nothing
  156.        End Try
  157.  
  158.    End Function
  159.  
  160.    ' <summary>
  161.    ' Resizes a image file.
  162.    ' </summary>
  163.    Shared Function Resize(ByVal File As String, _
  164.                           ByVal X As Int32, _
  165.                           ByVal Y As Int32, _
  166.                           Optional ByVal Quality As FREE_IMAGE_FILTER = FREE_IMAGE_FILTER.FILTER_BILINEAR) As System.Drawing.Bitmap
  167.  
  168.        Try
  169.  
  170.            Return FreeImage.GetBitmap(FreeImage.Rescale(FreeImage.LoadEx(File), X, Y, Quality))
  171.  
  172.        Catch ex As Exception
  173.            ' Throw New Exception(ex.Message)
  174.            MsgBox(ex.Message)
  175.            Return Nothing
  176.        End Try
  177.  
  178.    End Function
  179.  
  180.    ' <summary>
  181.    ' Rotates a Bitmap object.
  182.    ' </summary>
  183.    Shared Function Rotate(ByVal bmp As System.Drawing.Bitmap, _
  184.                           ByVal Angle As Double) As System.Drawing.Bitmap
  185.  
  186.        Try
  187.  
  188.            Dim ImageStream As New System.IO.MemoryStream
  189.            bmp.Save(ImageStream, bmp.RawFormat)
  190.  
  191.            Dim Image As FIBITMAP = FreeImage.LoadFromStream(ImageStream)
  192.            ImageStream.Dispose()
  193.  
  194.            Return FreeImage.GetBitmap(FreeImage.Rotate(Image, Angle))
  195.  
  196.        Catch ex As Exception
  197.            ' Throw New Exception(ex.Message)
  198.            MsgBox(ex.Message)
  199.            Return Nothing
  200.        End Try
  201.  
  202.    End Function
  203.  
  204.    ' <summary>
  205.    ' Rotates a image file.
  206.    ' </summary>
  207.    Shared Function Rotate(ByVal File As String, _
  208.                           ByVal Angle As Double) As System.Drawing.Bitmap
  209.  
  210.        Try
  211.  
  212.            Return FreeImage.GetBitmap(FreeImage.Rotate(FreeImage.LoadEx(File), Angle))
  213.  
  214.        Catch ex As Exception
  215.            ' Throw New Exception(ex.Message)
  216.            MsgBox(ex.Message)
  217.            Return Nothing
  218.        End Try
  219.  
  220.    End Function
  221.  
  222.    ' <summary>
  223.    ' Returns a Thumbnail of a Bitmap object.
  224.    ' </summary>
  225.    Shared Function Thumbnail(ByVal bmp As System.Drawing.Bitmap, _
  226.                                   ByVal size As Int32, _
  227.                                   ByVal convert As Boolean) As System.Drawing.Bitmap
  228.  
  229.        Try
  230.  
  231.            Dim ImageStream As New System.IO.MemoryStream
  232.            bmp.Save(ImageStream, bmp.RawFormat)
  233.  
  234.            Dim Image As FIBITMAP = FreeImage.LoadFromStream(ImageStream)
  235.            ImageStream.Dispose()
  236.  
  237.            Return FreeImage.GetBitmap(FreeImage.MakeThumbnail(Image, size, convert))
  238.  
  239.        Catch ex As Exception
  240.            ' Throw New Exception(ex.Message)
  241.            MsgBox(ex.Message)
  242.            Return Nothing
  243.        End Try
  244.  
  245.    End Function
  246.  
  247.    ' <summary>
  248.    ' Returns a Thumbnail of a image file.
  249.    ' </summary>
  250.    Shared Function Thumbnail(ByVal File As String, _
  251.                                   ByVal size As Int32, _
  252.                                   ByVal convert As Boolean) As System.Drawing.Bitmap
  253.  
  254.        Try
  255.            Return FreeImage.GetBitmap(FreeImage.MakeThumbnail(FreeImage.LoadEx(File), size, convert))
  256.        Catch ex As Exception
  257.            ' Throw New Exception(ex.Message)
  258.            MsgBox(ex.Message)
  259.            Return Nothing
  260.        End Try
  261.  
  262.    End Function
  263.  
  264. End Class
  265.  
  266. #End Region





Informa a Windows de cambios en el sistema para refrescar el sistema.

Código
  1. #Region " System Notifier "
  2.  
  3. ' [ System Notifier ]
  4. '
  5. ' Examples :
  6. '
  7. ' SystemNotifier.Notify(SystemNotifier.EventID.FileAssociation_Changed, SystemNotifier.NotifyFlags.DWORD, IntPtr.Zero, IntPtr.Zero)
  8.  
  9. Public Class SystemNotifier
  10.  
  11.    <System.Runtime.InteropServices.DllImport("shell32.dll")> _
  12.    Shared Sub SHChangeNotify( _
  13.        ByVal wEventID As EventID, _
  14.        ByVal uFlags As NotifyFlags, _
  15.        ByVal dwItem1 As IntPtr, _
  16.        ByVal dwItem2 As IntPtr)
  17.    End Sub
  18.  
  19.    Shared Sub Notify(ByVal wEventID As EventID, ByVal uFlags As NotifyFlags, ByVal dwItem1 As IntPtr, ByVal dwItem2 As IntPtr)
  20.        SHChangeNotify(wEventID, uFlags, dwItem1, dwItem2)
  21.    End Sub
  22.  
  23.    <Flags()> _
  24.    Public Enum NotifyFlags
  25.  
  26.        ' <summary>
  27.        ' The <i>dwItem1</i> and <i>dwItem2</i> parameters are DWORD values.
  28.        ' </summary>
  29.        DWORD = &H3
  30.  
  31.        ' <summary>
  32.        ' <i>dwItem1</i> and <i>dwItem2</i> are the addresses of ItemIDList structures,
  33.        ' that represent the item(s) affected by the change.
  34.        ' Each ItemIDList must be relative to the desktop folder.
  35.        ' </summary>
  36.        ItemIDList = &H0
  37.  
  38.        ' <summary>
  39.        ' <i>dwItem1</i> and <i>dwItem2</i> are the addresses of null-terminated strings,
  40.        ' of maximum length MAX_PATH that contain the full path names of the items affected by the change.
  41.        ' </summary>
  42.        PathA = &H1
  43.  
  44.        ' <summary>
  45.        ' <i>dwItem1</i> and <i>dwItem2</i> are the addresses of null-terminated strings,
  46.        ' of maximum length MAX_PATH that contain the full path names of the items affected by the change.
  47.        ' </summary>
  48.        PathW = &H5
  49.  
  50.        ' <summary>
  51.        ' <i>dwItem1</i> and <i>dwItem2</i> are the addresses of null-terminated strings,
  52.        ' that represent the friendly names of the printer(s) affected by the change.
  53.        ' </summary>
  54.        PrinterA = &H2
  55.  
  56.        ' <summary>
  57.        ' <i>dwItem1</i> and <i>dwItem2</i> are the addresses of null-terminated strings,
  58.        ' that represent the friendly names of the printer(s) affected by the change.
  59.        ' </summary>
  60.        PrinterW = &H6
  61.  
  62.        ' <summary>
  63.        ' The function should not return until the notification has been delivered to all affected components.
  64.        ' As this flag modifies other data-type flags it cannot by used by itself.
  65.        ' </summary>
  66.        Flush = &H1000
  67.  
  68.        ' <summary>
  69.        ' The function should begin delivering notifications to all affected components,
  70.        ' but should return as soon as the notification process has begun.
  71.        ' As this flag modifies other data-type flags it cannot by used by itself.
  72.        ' </summary>
  73.        FlushNoWait = &H2000
  74.  
  75.    End Enum
  76.  
  77.    <Flags()> _
  78.    Public Enum EventID
  79.  
  80.        ' <summary>
  81.        ' All events have occurred.
  82.        ' </summary>
  83.        All_Events = &H7FFFFFFF
  84.  
  85.        ' <summary>
  86.        ' A folder has been created.
  87.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  88.        ' <i>dwItem1</i> contains the folder that was created.
  89.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  90.        ' </summary>
  91.        Directory_Created = &H8
  92.  
  93.        ' <summary>
  94.        ' A folder has been removed.
  95.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  96.        ' <i>dwItem1</i> contains the folder that was removed.
  97.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  98.        ' </summary>
  99.        Directory_Deleted = &H10
  100.  
  101.        ' <summary>
  102.        ' The name of a folder has changed.
  103.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  104.        ' <i>dwItem1</i> contains the previous pointer to an item identifier list (PIDL) or name of the folder.
  105.        ' <i>dwItem2</i> contains the new PIDL or name of the folder.
  106.        ' </summary>
  107.        Directory_Renamed = &H20000
  108.  
  109.        ' <summary>
  110.        ' A nonfolder item has been created.
  111.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  112.        ' <i>dwItem1</i> contains the item that was created.
  113.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  114.        ' </summary>
  115.        Item_Created = &H2
  116.  
  117.        ' <summary>
  118.        ' A nonfolder item has been deleted.
  119.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  120.        ' <i>dwItem1</i> contains the item that was deleted.
  121.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  122.        ' </summary>
  123.        Item_Deleted = &H4
  124.  
  125.        ' <summary>
  126.        ' The name of a nonfolder item has changed.
  127.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  128.        ' <i>dwItem1</i> contains the previous PIDL or name of the item.
  129.        ' <i>dwItem2</i> contains the new PIDL or name of the item.
  130.        ' </summary>
  131.        Item_Renamed = &H1
  132.  
  133.        ' <summary>
  134.        ' A drive has been added.
  135.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  136.        ' <i>dwItem1</i> contains the root of the drive that was added.
  137.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  138.        ' </summary>
  139.        Drive_Added = &H100
  140.  
  141.        ' <summary>
  142.        ' A drive has been added and the Shell should create a new window for the drive.
  143.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  144.        ' <i>dwItem1</i> contains the root of the drive that was added.
  145.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  146.        ' </summary>
  147.        Drive_Added_Shell = &H10000
  148.  
  149.        ' <summary>
  150.        ' A drive has been removed. <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  151.        ' <i>dwItem1</i> contains the root of the drive that was removed.
  152.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  153.        ' </summary>
  154.        Drive_Removed = &H80
  155.  
  156.        ' <summary>
  157.        ' Storage media has been inserted into a drive.
  158.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  159.        ' <i>dwItem1</i> contains the root of the drive that contains the new media.
  160.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  161.        ' </summary>
  162.        Media_Inserted = &H20
  163.  
  164.        ' <summary>
  165.        ' Storage media has been removed from a drive.
  166.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  167.        ' <i>dwItem1</i> contains the root of the drive from which the media was removed.
  168.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  169.        ' </summary>
  170.        Media_Removed = &H40
  171.  
  172.        ' <summary>
  173.        ' A folder on the local computer is being shared via the network.
  174.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  175.        ' <i>dwItem1</i> contains the folder that is being shared.
  176.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  177.        ' </summary>
  178.        Net_Shared = &H200
  179.  
  180.        ' <summary>
  181.        ' A folder on the local computer is no longer being shared via the network.
  182.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  183.        ' <i>dwItem1</i> contains the folder that is no longer being shared.
  184.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  185.        ' </summary>
  186.        Net_Unshared = &H400
  187.  
  188.        ' <summary>
  189.        ' The computer has disconnected from a server.
  190.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  191.        ' <i>dwItem1</i> contains the server from which the computer was disconnected.
  192.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  193.        ' </summary>
  194.        Server_Disconnected = &H4000
  195.  
  196.        ' <summary>
  197.        ' The attributes of an item or folder have changed.
  198.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  199.        ' <i>dwItem1</i> contains the item or folder that has changed.
  200.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  201.        ' </summary>
  202.        Attributes_Changed = &H800
  203.  
  204.        ' <summary>
  205.        ' A file type association has changed. <see cref="NotifyFlags.ItemIDList"/>
  206.        ' must be specified in the <i>uFlags</i> parameter.
  207.        ' <i>dwItem1</i> and <i>dwItem2</i> are not used and must be <see langword="null"/>.
  208.        ' </summary>
  209.        FileAssociation_Changed = &H8000000
  210.  
  211.        ' <summary>
  212.        ' The amount of free space on a drive has changed.
  213.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  214.        ' <i>dwItem1</i> contains the root of the drive on which the free space changed.
  215.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  216.        ' </summary>
  217.        Freespace_Changed = &H40000
  218.  
  219.        ' <summary>
  220.        ' The contents of an existing folder have changed but the folder still exists and has not been renamed.
  221.        ' <see cref="NotifyFlags.ItemIDList"/> or <see cref="NotifyFlags.PathA"/> must be specified in <i>uFlags</i>.
  222.        ' <i>dwItem1</i> contains the folder that has changed.
  223.        ' <i>dwItem2</i> is not used and should be <see langword="null"/>.
  224.        ' If a folder has been created, deleted or renamed use Directory_Created, Directory_Removed or Directory_Renamed respectively instead.
  225.        ' </summary>
  226.        Update_Directory = &H1000
  227.  
  228.        ' <summary>
  229.        ' An image in the system image list has changed.
  230.        ' <see cref="NotifyFlags.DWORD"/> must be specified in <i>uFlags</i>.
  231.        ' </summary>
  232.        Update_Image = &H8000
  233.  
  234.    End Enum
  235.  
  236. End Class
  237.  
  238. #End Region
Páginas: 1 ... 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 [870] 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines