VB.60
Instalar Dll escrita en .NET en COM+
by MigueliTUX on Dec.06, 2010, under C#, VB.60, VB.NET, Windows
Si te toco hacer una DLL en .NET (como me ocurrió a mí) pero necesitaba que esta DLL estuviera en el COM+, y no sabes como hacerlo aquí les dejo las secuencias de comandos que utilice para lograr el objetivo
Lo primero es ir al directorio del FrameWork
cd C:\WINNT\Microsoft.NET\Framework\v2.0.50727
una vez dentro del directorio escribir
regasm.exe /tlb “<ubicación de la DLL>”
Ejemplo
regasm.exe /tlb “E:\Mi_DLL\DllEjemplo.dll”
Luego
regsvcs.exe “<ubicación de la DLL>”
Ejemplo
regsvcs.exe “E:\Mi_DLL\DllEjemplo.dll”
y Listo
ahora ve y verifica en el COM+
Formatear Números con ceros a la izquierda
by MigueliTUX on Aug.07, 2009, under VB.60
Aquí les dejo una función escrita en VB para formatear números
1 2 3 4 | Function FormatNumero(ByVal IStr As String, ByVal Longitud As Integer) As String 'formatea como número con ceros a la izquierda return String(Longitud - Len(IStr), "0") & IStr End Function |
XSL - XML
by MigueliTUX on Oct.28, 2008, under VB.60, Windows
Aqui les dejo un codigo que inclui en una componente. Se trata de dos metodos que hacen lo mismo, transformar el xml con un xsl a una pagina web.
Option Explicit
****** Esta funcion transforma el archivo XML con el Archivo XSL ******
****** Retorna el string que despues en la pagina asp se dibuja con
****** request.write(string)
Public Function TransXML2String(ByVal xmlFile As String, ByVal xslFile As String) As String
Dim source As New Msxml2.DOMDocument30
Dim stylesheet As New Msxml2.DOMDocument30
Dim myErr
Dim msgReturn As String
‘ Load data.
source.async = False
source.Load (xmlFile)
If (source.parseError.errorCode <> 0) Then
Set myErr = source.parseError
msgReturn = myErr.reason
Else
‘ Load style sheet.
stylesheet.async = False
stylesheet.Load (xslFile)
If (stylesheet.parseError.errorCode <> 0) Then
Set myErr = stylesheet.parseError
msgReturn = myErr.reason
Else
‘ Do the transform.
msgReturn = source.transformNode(stylesheet)
End If
End If
TransXML2String = msgReturn
End Function
****** Esta funcion transforma el string XML con el Archivo XSL ******
****** Retorna el string que despues en la pagina asp se dibuja con
****** request.write(string)
Public Function TransStringXML2String(ByVal xmlString As String, ByVal xslFile As String) As String
Dim source As New Msxml2.DOMDocument30
Dim stylesheet As New Msxml2.DOMDocument30
Dim myErr
Dim msgReturn As String
‘ Load data.
source.async = False
source.loadXML (xmlString)
If (source.parseError.errorCode <> 0) Then
Set myErr = source.parseError
msgReturn = myErr.reason
Else
‘ Load style sheet.
stylesheet.async = False
stylesheet.Load (xslFile)
If (stylesheet.parseError.errorCode <> 0) Then
Set myErr = stylesheet.parseError
msgReturn = myErr.reason
Else
‘ Do the transform.
msgReturn = source.transformNode(stylesheet)
End If
End If
TransStringXML2String = msgReturn
End Function