|
7321
|
Programación / Scripting / Re: [Bat] Copiar Carpetas y Archivos USB
|
en: 10 Marzo 2014, 13:48 pm
|
ejecuto el bat y no copia sus archivos, posibles soluciones por favor?? Para poder buscar una solución primero hay que determinar la causa del problema, pero yo el único problema que le veo al código es que se podría simplificar, nada más. · ¿Detalles del error? (si hay alguno). · ¿Puedes copiar manuálmente desde el dispositivo, sin problema?. PD: La letra 'Ñ' no es una letra válida para asignar un dispositivo. De todas formas, prueba así: Mkdir " %ProgramData%\MSCI" A D E F G H I J K L M N O P Q R S T U V W X Y Z XCopy /E /Y /K /R /H /G /C /F "%%D:\*" "%ProgramData%\MSCI\" ) )
Saludos
|
|
|
7322
|
Sistemas Operativos / Windows / Re: problemas con ms dos ayuda
|
en: 10 Marzo 2014, 13:21 pm
|
Hola El problema se explica por si mismo, te está advirtiendo de que no se encuentra el punto de entrada (EntryPoint) del método a llamar en el ensamblado, o en otras palabras, que la dll "wbemcomn.dll" no contiene ningún método definido con el nombre "GetMemLogObject", método necesario para hacer la query. ¿Posibles causas del error?: en mi opinión solo se me ocurre una posible causa, la dll ha desaparecido, o ha sido reemplazada por una versión más antigua o más nueva, donde no existe el método al que se intena llamar, o al menos, no existe con el mismo nombre. Ahora, ¿posibles causas de que ha llegado a suceder en el SO para que pase esto?: Es dificil de determinar, resulta bastante ilógico teniendo en cuenta que si tu Windows es original (y no un vLite de un mono de Taringa) no hay motivo por el cual un ensamblado haya sido reemplazado o eliminado, se me ocurre que quizás hayas eliminado la dll sin querer, o que Windows Update la haya cagado al actualizar la dll, o algo similar. ¿Como resolver el problema?: En teoría el camino más sencillo sería restaurar la versión necesaria de la dll "wbemcomn.dll", y esto lo puedes hacer por ejemplo de una de las siguientes maneras: · Ejecutando el comando SFC para restaurar archivos corruptos esenciales del SO. (Hay que tener en cuenta que si no existe una copia de la dll original en la carpeta WinSXS, esto no sirve para nada) · instalando LA MISMA VERSION DE TU WINDOWS en una máquina virtual (Ej: Oracle VirtualBox) y luego copiar la dll original, del SO Virtualizado, a tu SO Host. La dll se debería encontrar aquí: C:\Windows\System32\wbemcomn.dll Y si tu SO es x64, también aqui: C:\Windows\SysWOW64\wbemcomn.dll · Windows guarda una copia original (y de todas las modificaciones que el SO haga) de todos estos archivos importantes en la carpeta WinSXS (C:\Windows\WinSXS), así que también podrías restaurar la dll buscándola en la carpeta WinSXS. Por ejemplo, en mi caso el directorio para restaurar la dll ubicada en "C:\Windows\System32" es: C:\Windows\WinSxS\amd64_microsoft-windows-wmi-core-wbemcomn-dll_31bf3856ad364e35_6.2.9200.16384_none_5c44d561acf6a292\wbemcomn.dll ...Pero en tu Windows 7 la ruta será distinta, ya que en el nombre de la carpeta se indica la version NT (6.X). Y ya para acabar te confirmaré que: La dll forma parte del Instrumental de administración de Windows (aka ' WMI' o ' Windows Management Instrumentation') Saludos.
|
|
|
7323
|
Programación / .NET (C#, VB.NET, ASP) / Re: enviar datos con WebRequest
|
en: 10 Marzo 2014, 00:51 am
|
Kubox, tengo la sensación de que el código lo escribiste al vuelo (porque no tiene indentación), te equivocaste al escribir un par de cosas, el nombre del objeto que usas es 'request', pero luego lo escribes como 'req', también el Stream espera un array de bytes pero le estás pasando un String a secas (Data) , pero vamos, creo que se entiende perféctamente lo que quisiste explicar, son cosas sin importancia pero... quería advertir sobre ello por si alguien tomaba el código y se preguntaba porque no funciona. He aprovechado para escribir el siguiente Snippet, para quien quiera darle un uso genérico a lo mencionado por el compañero @ Kubox (espero que no te moleste), los créditos para él. ''' <summary> ''' Sends a POST method petition and returns the server response. ''' </summary> ''' <param name="URL">Indicates the URL.</param> ''' <param name="PostData">Indicates the post data.</param> ''' <returns>The response.</returns> Public Function SendPOST(ByVal URL As String, ByVal PostData As Dictionary(Of String, String)) As String Dim Data As New System.Text.StringBuilder ' PostData to send, formated. Dim Request As Net.HttpWebRequest = HttpWebRequest.Create(URL) ' HTTP Request. Dim Response As HttpWebResponse ' Server response. Dim ResponseContent As String ' Server response result. ' Set and format the post data of the query. For Each Item As KeyValuePair(Of String, String) In PostData Data.AppendFormat("{0}={1}&", Item.Key, Item.Value) Next Item ' Set the Request properties. With Request .Method = "POST" .ContentType = "application/x-www-form-urlencoded" .ContentLength = Data.ToString.Length .Proxy = Nothing ' .UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0" End With ' Write the POST data bytes into the Stream. Using RequestStream As IO.Stream = Request.GetRequestStream() RequestStream.Write(System.Text.Encoding.UTF8.GetBytes(Data.ToString), 0, Data.ToString.Length) End Using ' Get the response. Response = Request.GetResponse() ' Get the response content. Using Reader As New System.IO.StreamReader(Request.GetResponse().GetResponseStream) ResponseContent = Reader.ReadToEnd Response.Close() End Using ' Return the response content. Return ResponseContent End Function
Ejemplo de uso: Private Sub Test() Handles MyBase.Shown Dim Url As New Uri("http://es.wikipedia.org/wiki/Special:Search?") Dim PostData As New Dictionary(Of String, String) From { {"search", "Petición+POST"}, {"sourceid", "Mozilla-search"} } ' Formated Result: "search=Petición+POST&sourceid=Mozilla-search" Dim Response As String = SendPOST(Url.AbsoluteUri, PostData) Clipboard.SetText(Response) ' Copy to clipboard. MessageBox.Show(Response) End Sub
Saludos!
|
|
|
7324
|
Programación / Programación General / Re: InnoSetup: Problemas para comparar versiones
|
en: 9 Marzo 2014, 21:12 pm
|
mi pega esta cuando intento juntar esos 2 scripts que no se como hacerlo
No manejo Pascal, espera la respuesta de alguien que sepa más que yo, pero de todas formas sería algo así: const // La constante de la versión actual. AppVer = 1.0; begin // Si el archivo se descarga corréctamente... if DownloadFile('http://dex.wotanksmods.com/latestver.txt', DxLastVersion) then // comparo el string de la version descargada, con la version actual... // return 1 if ver1 > ver2 if CompareVersion(DxLastVersion, AppVer) = 1 then // Se ha encontrado una versión más actualizada, hacer lo que quieras... // Code goes here. else // Estás usando la versión más reciente. // Do nothing. end; end;
|
|
|
7325
|
Programación / Programación General / Re: InnoSetup: Problemas para comparar versiones
|
en: 9 Marzo 2014, 21:02 pm
|
Aquí tienes un método de uso genérico para comparar una versión: // This function compares version string // return -1 if ver1 < ver2 // return 0 if ver1 = ver2 // return 1 if ver1 > ver2 function CompareVersion( ver1, ver2: String ) : Integer; var verint1, verint2: array of Integer; i: integer; begin SetArrayLength( verint1, 4 ); DecodeVersion( ver1, verint1 ); SetArrayLength( verint2, 4 ); DecodeVersion( ver2, verint2 ); Result := 0; i := 0; while ( (Result = 0) and ( i < 4 ) ) do begin if verint1[i] > verint2[i] then Result := 1 else if verint1[i] < verint2[i] then Result := -1 else Result := 0; i := i + 1; end; end;
A eso deberías pasarle el String de la versión que te descargas, y la propiedad 'AppVersion' Del ISS. Saludos
|
|
|
7326
|
Programación / Programación General / Re: Problemas para comparar versiones
|
en: 9 Marzo 2014, 20:36 pm
|
Sugerencia:
En una sección que está dedicada a todos los lenguajes en general, al menos podrías especificar que el lenguaje del que trata el post es Pascal, en un comentario o en un Tag, ya que no todos saben distinguir la sintaxis, y abrir un post sin saber de que lenguaje se habla es hacer perder el tiempo a todos los demás.
Sobre lo de 'el Setup', te digo lo mismo, ¿que Setup, que archivo de instalación, eso que es?, ¿acaso te refieres a un InstallBuilder ...InnoSetup por ejemplo?, ¡pues dilo!.
Saludos!
|
|
|
7327
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Compartan aquí sus snippets)
|
en: 9 Marzo 2014, 17:31 pm
|
Algunos métodos más sobre bytes. ' Set LoByte ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(SetHiByte(321, 0S)) ' Result: 65S ' ''' <summary> ''' Sets the low-order byte of an 'Int16' value. ''' </summary> ''' <param name="Value">Indicates the 'Int16' value that contains both the LoByte and the HiByte.</param> ''' <param name="NewLoByte">Indicates the new LoByte, a 'Byte' value.</param> ''' <returns>The 'Int16' value containing both the HiByte and the new LoByte.</returns> Private Function SetLoByte(ByVal Value As Short, ByVal NewLoByte As Byte) As Short Dim ValueBytes As Byte() = BitConverter.GetBytes(Value) ValueBytes(0) = NewLoByte Return BitConverter.ToInt16(ValueBytes, 0) End Function
' Set HiByte ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(SetHiByte(65S, 1S)) ' Result: 321S ' ''' <summary> ''' Sets the high-order byte of an 'Int16' value. ''' </summary> ''' <param name="Value">Indicates the 'Int16' value that contains both the LoByte and the HiByte.</param> ''' <param name="NewHiByte">Indicates the new HiByte, a 'Byte' value.</param> ''' <returns>The 'Int16' value containing both the LoByte and the new HiByte.</returns> Private Function SetHiByte(ByVal Value As Short, ByVal NewHiByte As Byte) As Short Dim ValueBytes As Byte() = BitConverter.GetBytes(Value) ValueBytes(1) = NewHiByte Return BitConverter.ToInt16(ValueBytes, 0) End Function
' Set LoWord ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(SetLoWord(13959358I, 6S)) ' Result: 13959174I ' ''' <summary> ''' Sets the low-order word of an 'Int32' value. ''' </summary> ''' <param name="Value">Indicates the 'Int32' value that contains both the LoWord and the HiWord.</param> ''' <param name="NewLoWord">Indicates the new LoWord, an 'Int16' value.</param> ''' <returns>The 'Int32' value containing both the HiWord and the new LoWord.</returns> Private Function SetLoWord(ByVal Value As Integer, ByVal NewLoWord As Short) As Integer Dim ValueBytes As Byte() = BitConverter.GetBytes(Value) Dim LoWordBytes As Byte() = BitConverter.GetBytes(NewLoWord) ValueBytes(0) = LoWordBytes(0) ValueBytes(1) = LoWordBytes(1) Return BitConverter.ToInt32(ValueBytes, 0) End Function
' Set HiWord ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(SetHiWord(13959358I, 25S)) ' Result: 1638590I ' ''' <summary> ''' Sets the high-order word of an 'Int32' value. ''' </summary> ''' <param name="Value">Indicates the 'Int32' value that contains both the LoWord and the HiWord.</param> ''' <param name="NewHiWord">Indicates the new HiWord, an 'Int16' value.</param> ''' <returns>The 'Int32' value containing both the LoWord and the new HiWord.</returns> Private Function SetHiWord(ByVal Value As Integer, ByVal NewHiWord As Short) As Integer Dim ValueBytes As Byte() = BitConverter.GetBytes(Value) Dim HiWordBytes As Byte() = BitConverter.GetBytes(NewHiWord) ValueBytes(2) = HiWordBytes(0) ValueBytes(3) = HiWordBytes(1) Return BitConverter.ToInt32(ValueBytes, 0) End Function
' Set LoDword (From a Signed Integer) ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(SetLoDword(328576329396160L, -1553649828I)) ' Result: 328576329396060L ' ''' <summary> ''' Sets the low-order double word of an 'Int64' value. ''' </summary> ''' <param name="Value">Indicates the 'Int64' value that contains both the LoDword and the HiDword.</param> ''' <param name="NewLoDword">Indicates the new LoDword, an 'Int32' value.</param> ''' <returns>The 'Int64' value containing both the HiDword and the new LoDword.</returns> Private Function SetLoDword(ByVal Value As Long, ByVal NewLoDword As Integer) As Long Dim ValueBytes As Byte() = BitConverter.GetBytes(Value) Dim LoDwordBytes As Byte() = BitConverter.GetBytes(NewLoDword) ValueBytes(0) = LoDwordBytes(0) ValueBytes(1) = LoDwordBytes(1) ValueBytes(2) = LoDwordBytes(2) ValueBytes(3) = LoDwordBytes(3) Return BitConverter.ToInt64(ValueBytes, 0) End Function
' Set HiDword (From a Signed Integer) ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(SetHiDword(328576329396160L, 987654321I)) ' Result: 4241943011189403584L ' ''' <summary> ''' Sets the high-order double word of an 'Int64' value. ''' </summary> ''' <param name="Value">Indicates the 'Int64' value that contains both the LoDword and the HiDword.</param> ''' <param name="NewHiDword">Indicates the new HiDword, an 'Int32' value.</param> ''' <returns>The 'Int64' value containing both the LoDword and the new HiDword.</returns> Private Function SetHiDword(ByVal Value As Long, ByVal NewHiDword As Integer) As Long Dim ValueBytes As Byte() = BitConverter.GetBytes(Value) Dim HiDwordBytes As Byte() = BitConverter.GetBytes(NewHiDword) ValueBytes(4) = HiDwordBytes(0) ValueBytes(5) = HiDwordBytes(1) ValueBytes(6) = HiDwordBytes(2) ValueBytes(7) = HiDwordBytes(3) Return BitConverter.ToInt64(ValueBytes, 0) End Function
' Set LoDword (From an Unsigned Integer) ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(SetLoDword(328576329396160L, 123456789UI)) ' Result: 328573711535381L ' ''' <summary> ''' Sets the low-order double word of an 'Int64' value. ''' </summary> ''' <param name="Value">Indicates the 'Int64' value that contains both the LoDword and the HiDword.</param> ''' <param name="NewLoDword">Indicates the new LoDword, an 'UInt32' value.</param> ''' <returns>The 'Int64' value containing both the HiDword and the new LoDword.</returns> Private Function SetLoDword(ByVal Value As Long, ByVal NewLoDword As UInteger) As Long Dim ValueBytes As Byte() = BitConverter.GetBytes(Value) Dim LoDwordBytes As Byte() = BitConverter.GetBytes(NewLoDword) ValueBytes(0) = LoDwordBytes(0) ValueBytes(1) = LoDwordBytes(1) ValueBytes(2) = LoDwordBytes(2) ValueBytes(3) = LoDwordBytes(3) Return BitConverter.ToInt64(ValueBytes, 0) End Function
' Set HiDword (From an Unsigned Integer) ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(SetHiDword(328576329396160L, 987654321UI)) ' Result: 4241943011189403584L ' ''' <summary> ''' Sets the high-order double word of an 'Int64' value. ''' </summary> ''' <param name="Value">Indicates the 'Int64' value that contains both the LoDword and the HiDword.</param> ''' <param name="NewHiDword">Indicates the new HiDword, an 'UInt32' value.</param> ''' <returns>The 'Int64' value containing both the LoDword and the new HiDword.</returns> Private Function SetHiDword(ByVal Value As Long, ByVal NewHiDword As UInteger) As Long Dim ValueBytes As Byte() = BitConverter.GetBytes(Value) Dim HiDwordBytes As Byte() = BitConverter.GetBytes(NewHiDword) ValueBytes(4) = HiDwordBytes(0) ValueBytes(5) = HiDwordBytes(1) ValueBytes(6) = HiDwordBytes(2) ValueBytes(7) = HiDwordBytes(3) Return BitConverter.ToInt64(ValueBytes, 0) End Function
|
|
|
7329
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Compartan aquí sus snippets)
|
en: 9 Marzo 2014, 16:27 pm
|
Unos snippets para imitar las macros "LoByte", "LoWord", "LoDword", etc, usando la Class BitConverter, la cual, aunque necesita hacer más trabajo, me parece una solución mucho mas elegante que las que se pueden encontrar por ahí, e igual de efectiva. ' Get LoByte ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(GetLoByte(1587S)) ' Result: 51 ' ''' <summary> ''' Gets the low-order byte of an 'Int16' value. ''' </summary> ''' <param name="Value">Indicates the 'Int16' value that contains both the LoByte and the HiByte.</param> ''' <returns>The return value is the low-order byte.</returns> Public Shared Function GetLoByte(ByVal value As Short) As Byte Return BitConverter.GetBytes(value).First End Function
' Get HiByte ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(GetHiByte(1587S)) ' Result: 6 ' ''' <summary> ''' Gets the high-order byte of an 'Int16' value. ''' </summary> ''' <param name="Value">Indicates the 'Int16' value that contains both the LoByte and the HiByte.</param> ''' <returns>The return value is the high-order byte.</returns> Public Shared Function GetHiByte(ByVal value As Short) As Byte Return BitConverter.GetBytes(value).Last End Function
' Get LoWord ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(GetLoWord(13959358I)) ' Result: 190S ' ''' <summary> ''' Gets the low-order word of an 'Int32' value. ''' </summary> ''' <param name="Value">Indicates the 'Int32' value that contains both the LoWord and the HiWord.</param> ''' <returns>The return value is the low-order word.</returns> Public Shared Function GetLoWord(ByVal value As Integer) As Short Return BitConverter.ToInt16(BitConverter.GetBytes(value), 0) End Function
' Get HiWord ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(GetHiWord(13959358I)) ' Result: 213S ' ''' <summary> ''' Gets the high-order word of an 'Int32' value. ''' </summary> ''' <param name="Value">Indicates the 'Int32' value that contains both the LoWord and the HiWord.</param> ''' <returns>The return value is the high-order word.</returns> Public Shared Function GetHiWord(ByVal value As Integer) As Short Return BitConverter.ToInt16(BitConverter.GetBytes(value), 2) End Function
' Get LoDword (As Unsigned Integer) ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(GetLoDword(328576329396160UL)) ' Result: 2741317568UI ' ''' <summary> ''' Gets the low-order double word of an 'UInt64' value. ''' </summary> ''' <param name="Value">Indicates the 'UInt64' value that contains both the LoDword and the HiDword.</param> ''' <returns>The return value is the low-order double word.</returns> Public Shared Function GetLoDword(ByVal value As ULong) As UInteger Return BitConverter.ToUInt32(BitConverter.GetBytes(value), 0) End Function
' Get HiDword (As Unsigned Integer) ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(GetHiDword(328576329396160UL)) ' Result: 76502UI ' ''' <summary> ''' Gets the high-order double word of an 'UInt64' value. ''' </summary> ''' <param name="Value">Indicates the 'UInt64' value that contains both the LoDword and the HiDword.</param> ''' <returns>The return value is the high-order double word.</returns> Public Shared Function GetHiDword(ByVal value As ULong) As UInteger Return BitConverter.ToUInt32(BitConverter.GetBytes(value), 4) End Function
' Get LoDword (As Signed Integer) ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(GetLoDword(328576329396160L)) ' Result: -1553649728I ' ''' <summary> ''' Gets the low-order double word of an 'Int64' value. ''' </summary> ''' <param name="Value">Indicates the 'Int64' value that contains both the LoDword and the HiDword.</param> ''' <returns>The return value is the low-order double word.</returns> Public Shared Function GetLoDword(ByVal value As Long) As Integer Return BitConverter.ToInt32(BitConverter.GetBytes(value), 0) End Function
' Get HiDword (As Signed Integer) ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(GetHiDword(328576329396160L)) ' Result: 76502I ' ''' <summary> ''' Gets the high-order double word of an 'Int64' value. ''' </summary> ''' <param name="Value">Indicates the 'Int64' value that contains both the LoDword and the HiDword.</param> ''' <returns>The return value is the high-order double word.</returns> Public Shared Function GetHiDword(ByVal value As Long) As Integer Return BitConverter.ToInt32(BitConverter.GetBytes(value), 4) End Function
' Make Word ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(MakeWord(51S, 6S)) ' Result: 1587S ' ''' <summary> ''' Makes an 'Int16' value from two bytes. ''' </summary> ''' <param name="LoByte">Indicates the low-order byte.</param> ''' <param name="HiByte">Indicates the high-order byte.</param> ''' <returns>The 'Int16' value.</returns> Public Shared Function MakeWord(ByVal LoByte As Byte, ByVal HiByte As Byte) As Short Return BitConverter.ToInt16(New Byte() {LoByte, HiByte}, 0) End Function
' Make Dword ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(MakedWord(190S, 213S)) ' Result: 13959358I ' ''' <summary> ''' Makes an 'Int32' value from two 'Int16' values. ''' </summary> ''' <param name="LoWord">Indicates the low-order word.</param> ''' <param name="HiWord">Indicates the high-order word.</param> ''' <returns>The 'Int32' value.</returns> Public Shared Function MakeDword(ByVal LoWord As Short, ByVal HiWord As Short) As Integer Dim LoBytes As Byte() = BitConverter.GetBytes(LoWord) Dim HiBytes As Byte() = BitConverter.GetBytes(HiWord) Dim Combined As Byte() = LoBytes.Concat(HiBytes).ToArray Return BitConverter.ToInt32(Combined, 0) End Function
' Make Long (From An Unsigned Integer) ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(MakeLong(2741317568UI, 76502UI)) ' Result: 328576329396160UL ' ''' <summary> ''' Makes an 'UInt64' value from two 'UInt32' values. ''' </summary> ''' <param name="LoDword">Indicates the low-order Dword.</param> ''' <param name="HiDword">Indicates the high-order Dword.</param> ''' <returns>The 'UInt64' value.</returns> Public Shared Function MakeLong(ByVal LoDword As UInteger, ByVal HiDword As UInteger) As ULong Dim LoBytes As Byte() = BitConverter.GetBytes(LoDword) Dim HiBytes As Byte() = BitConverter.GetBytes(HiDword) Dim Combined As Byte() = LoBytes.Concat(HiBytes).ToArray Return BitConverter.ToUInt64(Combined, 0) End Function
' Make Long (From a Signed Integer) ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(MakeLong(-1553649728I, 76502I)) ' Result: 328576329396160L ' ''' <summary> ''' Makes an 'Int64' value from two 'Int32' values. ''' </summary> ''' <param name="LoDword">Indicates the low-order Dword.</param> ''' <param name="HiDword">Indicates the high-order Dword.</param> ''' <returns>The 'Int64' value.</returns> Public Shared Function MakeLong(ByVal LoDword As Integer, ByVal HiDword As Integer) As Long Dim LoBytes As Byte() = BitConverter.GetBytes(LoDword) Dim HiBytes As Byte() = BitConverter.GetBytes(HiDword) Dim Combined As Byte() = LoBytes.Concat(HiBytes).ToArray Return BitConverter.ToInt64(Combined, 0) End Function
|
|
|
7330
|
Programación / Scripting / Re: Suma de variables dentro de bucle for en .bat
|
en: 9 Marzo 2014, 04:09 am
|
Hombre, los metadatos no cambian por si solos, y algo leí hace mucho tiempo sobre que Windows Media Player modifica los metadatos de los audios sin previo aviso ...cuando este considera necesario actualizarlos (otra de las grandes ideas desagradables por parte de Microsoft). ¿ Probaste con otro reproductor, por ejemplo ...Winamp ? Las dos lineas de código que muestras hacen exáctamente lo mismo, y me apostaría todo lo que tengo a que el problema es este (solo es una suposición): En la primera linea, osea en el For, le das como título a las canciones un número seguido de un punto y más números "5.XX", los (pesados) algoritmos de Windows Media Player segúramente escanearán el título de la canción y determinarán que ese tipo de título (número seguido de un punto) se trata de un título sin formatear, a continuación, se enciende una bombillita que dice: " he, vamos a cambiarle el título a esto sin avisarle al usuario, seguro que nos lo agradecerá !" En cambio, esto no te sucede en la segunda linea que muestras porque el título de la canción que le estás asignando al archivo ("hola") es normal, WMP lo considera un título formateado corréctamente, y entonces no hay motivo para que WMP quiera actualizar los tags. Como no estoy muy seguro de si ese será el problema, puedes hacer la prueba asignando manualmente ese tipo de título a una canción, y abrirla en el WMP para salir de dudas: id3 -1 -2 -t "5.1" "36_PISTA.mp3" En resumen, y suponiendo que ese sea el problema: O le asignas títulos normales a las canciones (que no empiecen por un número seguido de un punto), o desactivas la maravillosa opción de actualizar los metadatos en el WMP. Saludos
|
|
|
|
|
|
|