Project: Cliente Correo SMTP.vbp |
|
Cliente Correo SMTP.vbp
STDOLE2
SendMail
MSWINSCK
CMDIALOG
frmSendMailEx.frm (frmMain)
frmSendMailEx.frx
globales mail.bas (Module1)
frmLibreta.frm (frmLibreta)
frmLibreta.frx
interprop.Frm (interprop)
interprop.frx
frmabout.frm (frmAbout)
frmabout.frx
pase.frm (pase)
pase.frx
SETPGP.bas (SETPGP)
COMCTL
DecINI.bas (DecINI)
Cliente Correo SMTP.vbw
HHCTRL.OCX (HHCTRL)
ADVAPI32.DLL (ADVAPI32)
SPGP.DLL (SPGP)
KERNEL32.DLL (KERNEL32)
Module index
Procedure index
Module name: frmMain
(declarations of frmMain)
AgregaEnviados
cmdBrowse_Click
encriptar
Form_Initialize
Form_Load
Form_Unload
Image1_Click
Label3_Click
List1_DblClick
poSendMail_SendFailed
poSendMail_SendSuccesful
poSendMail_Status
Toolbar1_ButtonClick
txtFrom_KeyPress
txtFromName_KeyPress
TxtMsg_DblClick
txtServer_KeyPress
txtToName_Click
Vars/Consts/Types/Enums in (declarations) of frmMain |
|
Private poSendMail As SendMail.clsSendMail |
|
frmSendMailEx.frm
Assigned by Form_Initialize in this module
Assigned by Form_Unload in this module
Referenced by Toolbar1_ButtonClick in this module
Referenced by Toolbar1_ButtonClick in this module
Referenced by Toolbar1_ButtonClick in this module
Referenced by Toolbar1_ButtonClick in this module
Referenced by Toolbar1_ButtonClick in this module
Referenced by Toolbar1_ButtonClick in this module
Referenced by Toolbar1_ButtonClick in this module
Referenced by Toolbar1_ButtonClick in this module
Referenced by Toolbar1_ButtonClick in this module
Referenced by Toolbar1_ButtonClick in this module
(declarations of frmMain) |
|
Private WithEvents poSendMail As SendMail.clsSendMail
Attribute poSendMail.VB_VarHelpID = -1
Option Compare Text
Option Explicit
'
' ENCRIPTAR Y FIRMAR ARCHIVO
'
Private Sub encriptar()
'
Dim CryptKeyID As String * 256, SignKeyID As String * 256, SignKeyPass As String * 256, IDEAPass As String * 256, Comment As String * 256
Dim i As Long
vFileIn = "mensaje.txt" + Chr(0)
vFileOut = "mensaje.asc" + Chr(0)
vEncrypt = 1
vSign = 1
vSignAlg = 1
vConventional = 0
vConventionalAlg = 1
vArmor = 1
vTextMode = 1
vClear = 1
vCompress = 0
vEyesOnly = 0
vMIME = 0
vCryptKeyID = Trim(clavepgp) + Chr(0)
vSignKeyID = "0x0FA4B5A5" + Chr(0)
vSignKeyPass = "" + Chr(0)
vIDEAPass = "" + Chr(0)
vComment = "Enviado el " + Str(Date) + " a las " + Str(Time) + Chr(0)
vMIMEsep = "" + Chr(0)
i = spgp_EncodeFile(vFileIn, _
vFileOut, _
vEncrypt, _
vSign, _
vSignAlg, _
vConventional, _
vConventionalAlg, _
vArmor, _
vTextMode, _
vClear, _
0, _
0, _
vMIME, _
vCryptKeyID, _
vSignKeyID, _
vSignKeyPass, _
vIDEAPass, _
vComment, _
vMIMEsep)
End Sub
- Toolbar1_ButtonClick
- spgp_EncodeFile in module SPGP
Sub AgregaEnviados()
Dim ultimo As Integer
Dim puntero As Integer
Dim codigo2 As Integer
Open ArEnviados For Random As 1
Get 1, 1, env
ultimo = Val(env.fecha)
If Val(ultimo) = 0 Then ultimo = 1
puntero = ultimo + 1
env.fecha = puntero
Put 1, 1, env
codigo2 = puntero
env.fecha = Date
env.hora = Time
env.para = txtTo.Text
env.ref = txtSubject.Text
env.adjunto = txtAttach.Text
Put 1, puntero, env
Close
End Sub
Private Sub cmdBrowse_Click()
cmDialog.ShowOpen
txtAttach.Text = cmDialog.FileName
End Sub
Private Sub Form_Initialize()
Set poSendMail = New clsSendMail
End Sub
Private Sub Form_Load()
Dim z As Integer
lVersion.Caption = "Ver " & App.Major & "." & App.Minor & "." & App.Revision
sINIFile = App.Path & "\correo.ini"
sUserName = sGetINI(sINIFile, "Settings", "NombreUsuario", "?")
sUserEmail = sGetINI(sINIFile, "Settings", "EmailUsuario", "?")
sUserServer = sGetINI(sINIFile, "Settings", "ServidorUsuario", "?")
If sUserName = "?" Then
sUserName = InputBox$("Nombre de Usuario")
writeini sINIFile, "Settings", "NombreUsuario", sUserName
sUserEmail = InputBox$("E-mail de Usuario")
writeini sINIFile, "Settings", "EmailUsuario", sUserEmail
sUserServer = InputBox$("Servidor de Usuario")
writeini sINIFile, "Settings", "ServidorUsuario", sUserServer
End If
vUser = sUserName
vServer = sUserServer
vFrom = sUserEmail
Open "libreta" For Random As 1
For z = 2 To 100
Get 1, z, lib
txtToName.AddItem Trim(lib.nombre)
direlec(z - 1) = Trim(lib.email)
clave(z - 1) = Trim(lib.clave)
Next z
cmDialog.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly
End Sub
- sGetINI in module DecINI
- writeini in module DecINI
Private Sub Form_Unload(Cancel As Integer)
Set poSendMail = Nothing
End Sub
Private Sub Image1_Click()
Frame3.Visible = True
Label2(2).Visible = True
Label2(3).Visible = True
Label3(0).Visible = True
txtServer.Visible = False
txtFromName.Visible = False
txtFrom.Visible = False
lblServer.Visible = False
lblFrom.Visible = False
lblFromName.Visible = False
End Sub
Private Sub Label3_Click(Index As Integer)
Load interprop
interprop.Show
End Sub
Private Sub List1_DblClick()
List1.Visible = False
End Sub
Private Sub poSendMail_SendFailed(Explanation As String)
lblStatus.Caption = ""
MsgBox ("Error: " & vbCrLf & Explanation)
End Sub
Private Sub poSendMail_SendSuccesful()
lblStatus.Caption = ""
MsgBox "Enviado con Exito!"
End Sub
Private Sub poSendMail_Status(Status As String)
lblStatus.Caption = Status
lblStatus.Refresh
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
'On Error Resume Next
Dim orden As Variant
Dim x As Variant
Dim ultimo As Integer
Dim z1 As Integer
Select Case Button.Key
Case "escribir"
If Dir$("mensaje.txt") <> "" Then Kill "mensaje.txt"
SendKeys "{ENTER}"
orden = "notepad.exe"
x = Shell(orden & " mensaje.txt", vbNormalFocus)
Case "encriptar"
If Dir$("mensaje.txt") = "" Then
MsgBox "No ha escrito ningún mensaje"
Exit Sub
End If
If txtTo.Text = "" Then
MsgBox "No ha elegido destinatario"
Exit Sub
End If
encriptar
Close
List1.Visible = False
Dim linesFromFile2, Nextline2 As String
Open "mensaje.asc" For Input As #1
Dim lin As Integer
Do While Not EOF(1)
lin = lin + 1
Line Input #1, Nextline2
linesFromFile2 = linesFromFile2 + Nextline2 + Chr(13) + Chr(10)
Loop
TxtMsg = Trim(linesFromFile2)
TxtMsg.Visible = True
Close
Case "enviar"
Close
Dim linesFromFile, Nextline As String
Open "mensaje.asc" For Input As #1
Do Until EOF(1)
Line Input #1, Nextline
linesFromFile = linesFromFile + Nextline + Chr(13) + Chr(10)
Loop
TxtMsg = Trim(linesFromFile)
TxtMsg.Visible = True
Close
If Mid(TxtMsg.Text, 1, 27) <> "-----BEGIN PGP MESSAGE-----" Then
MsgBox "Solo puede enviar mensajes encriptados"
Exit Sub
End If
Screen.MousePointer = vbHourglass
poSendMail.SMTPHost = vServer
poSendMail.from = vFrom
poSendMail.FromDisplayName = vUser
poSendMail.Recipient = txtTo.Text
poSendMail.RecipientDisplayName = txtToName.Text
poSendMail.ReplyToAddress = vFrom
poSendMail.Subject = txtSubject.Text
poSendMail.Message = TxtMsg.Text
poSendMail.Attachment = Trim(txtAttach.Text)
poSendMail.Send
Screen.MousePointer = vbDefault
TxtMsg.Visible = False
Case "direcciones"
Load frmLibreta
frmLibreta.Show
Case "vercorreo"
Dim archivo As String * 300
archivo = "C:\Archivos de programa\The Bat!\thebat.exe"
x = Shell(archivo, 1)
Case "mailbox"
sUserName = InputBox$("Nombre de Usuario")
writeini sINIFile, "Settings", "NombreUsuario", sUserName
sUserEmail = InputBox$("E-mail de Usuario")
writeini sINIFile, "Settings", "EmailUsuario", sUserEmail
sUserServer = InputBox$("Servidor de Usuario")
writeini sINIFile, "Settings", "ServidorUsuario", sUserName
Case "PGPkeys"
x = Shell("C:\Archivos de programa\PGP\PGP602i\PGPkeys.exe", 1)
Case "sin_encriptar"
List1.Visible = False
Close
Open "mensaje.txt" For Input As #1
Do Until EOF(1)
Line Input #1, Nextline2
linesFromFile2 = linesFromFile2 + Nextline2 + Chr(13) + Chr(10)
Loop
TxtMsg = Trim(linesFromFile2)
TxtMsg.Visible = True
Close
Case "enviados"
Close
Open ArEnviados For Random As 1
Get 1, 1, env
ultimo = Val(env.fecha)
List1.Visible = True
List1.Refresh
For z1 = 2 To ultimo
Get 1, z1, env
List1.AddItem env.fecha + env.para + env.ref
Next z1
Close
End Select
End Sub
- encriptar
- writeini in module DecINI
Private Sub txtFrom_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Close
Open "datosfij.dat" For Random As 1
datfij.server = txtServer.Text
datfij.from = txtFrom.Text
datfij.remitente = txtFromName.Text
Put 1, 1, datfij
Close
End If
End Sub
Private Sub txtFromName_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Close
Open "datosfij.dat" For Random As 1
datfij.server = txtServer.Text
datfij.from = txtFrom.Text
datfij.remitente = txtFromName.Text
Put 1, 1, datfij
Close
End If
End Sub
Private Sub TxtMsg_DblClick()
TxtMsg.Visible = False
End Sub
Private Sub txtServer_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Close
Open "datosfij.dat" For Random As 1
datfij.server = txtServer.Text
datfij.from = txtFrom.Text
datfij.remitente = txtFromName.Text
Put 1, 1, datfij
Close
End If
End Sub
Private Sub txtToName_Click()
txtTo.Text = direlec(txtToName.ListIndex + 1)
clavepgp = clave(txtToName.ListIndex + 1)
End Sub
Module name: Module1
(declarations of Module1)
Vars/Consts/Types/Enums in (declarations) of Module1 |
|
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
Public vFileOut As String |
|
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
Public vConventional As Long |
|
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
Public vConventionalAlg As Long |
|
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
globales mail.bas
Assigned by encriptar in module frmMain
Dead
globales mail.bas
Assigned by encriptar in module frmMain
Dead
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
Public vCryptKeyID As String |
|
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
Public vSignKeyID As String |
|
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
Public vSignKeyPass As String |
|
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
Public vIDEAPass As String |
|
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
Public vComment As String |
|
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
Public vMIMEsep As String |
|
globales mail.bas
Assigned by encriptar in module frmMain
Referenced by encriptar in module frmMain
globales mail.bas
Assigned by Form_Load in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
globales mail.bas
Assigned by Form_Load in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
globales mail.bas
Assigned by Form_Load in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Global datfij As datosfijos |
|
globales mail.bas
Assigned by txtFrom_KeyPress in module frmMain
Assigned by txtFrom_KeyPress in module frmMain
Assigned by txtFrom_KeyPress in module frmMain
Referenced by txtFrom_KeyPress in module frmMain
Assigned by txtFromName_KeyPress in module frmMain
Assigned by txtFromName_KeyPress in module frmMain
Assigned by txtFromName_KeyPress in module frmMain
Referenced by txtFromName_KeyPress in module frmMain
Assigned by txtServer_KeyPress in module frmMain
Assigned by txtServer_KeyPress in module frmMain
Assigned by txtServer_KeyPress in module frmMain
Referenced by txtServer_KeyPress in module frmMain
Global lib As libretadirecciones |
|
globales mail.bas
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Command1_Click in module frmLibreta
Referenced by Command1_Click in module frmLibreta
Assigned by Command1_Click in module frmLibreta
Referenced by Command1_Click in module frmLibreta
Assigned by Command1_Click in module frmLibreta
Assigned by Command1_Click in module frmLibreta
Assigned by Command1_Click in module frmLibreta
Referenced by Command1_Click in module frmLibreta
Referenced by Command1_Click in module frmLibreta
Referenced by Command1_Click in module frmLibreta
Referenced by Command1_Click in module frmLibreta
Assigned by Command2_Click in module frmLibreta
Assigned by Command2_Click in module frmLibreta
Assigned by Command2_Click in module frmLibreta
Referenced by Command2_Click in module frmLibreta
Referenced by Command2_Click in module frmLibreta
Referenced by Command2_Click in module frmLibreta
Referenced by Form_Load in module frmLibreta
Referenced by Form_Load in module frmLibreta
Referenced by List1_Click in module frmLibreta
Referenced by List1_Click in module frmLibreta
Referenced by List1_Click in module frmLibreta
Referenced by List1_Click in module frmLibreta
Referenced by (declarations of interprop) in module interprop
Referenced by (declarations of frmAbout) in module frmAbout
Referenced by (declarations of frmAbout) in module frmAbout
Referenced by (declarations of frmAbout) in module frmAbout
Referenced by (declarations of SETPGP) in module SETPGP
Referenced by (declarations of DecINI) in module DecINI
Referenced by (declarations of DecINI) in module DecINI
globales mail.bas
Referenced by (declarations of Module1) in this module
Global clavepgp [Variant] |
|
globales mail.bas
Assigned by txtToName_Click in module frmMain
Referenced by encriptar in module frmMain
Global codigoitem [Variant] |
|
globales mail.bas
Referenced by Command2_Click in module frmLibreta
Assigned by List1_Click in module frmLibreta
Referenced by List1_Click in module frmLibreta
Global env As correoenviado |
|
globales mail.bas
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by AgregaEnviados in module frmMain
Referenced by AgregaEnviados in module frmMain
Assigned by AgregaEnviados in module frmMain
Referenced by AgregaEnviados in module frmMain
Assigned by AgregaEnviados in module frmMain
Assigned by AgregaEnviados in module frmMain
Assigned by AgregaEnviados in module frmMain
Assigned by AgregaEnviados in module frmMain
Assigned by AgregaEnviados in module frmMain
Referenced by AgregaEnviados in module frmMain
Global Const ArEnviados = "enviados.dat" |
|
globales mail.bas
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by AgregaEnviados in module frmMain
Global direlec(100) [Variant] |
|
globales mail.bas
Assigned by Form_Load in module frmMain
Referenced by txtToName_Click in module frmMain
Global clave(100) [Variant] |
|
globales mail.bas
Assigned by Form_Load in module frmMain
Referenced by txtToName_Click in module frmMain
Referenced by (declarations of Module1) in this module
Global sINIFile As String |
|
globales mail.bas
Assigned by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Global sUserName As String |
|
globales mail.bas
Assigned by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Assigned by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Assigned by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Global sUserEmail As String |
|
globales mail.bas
Assigned by Form_Load in module frmMain
Assigned by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Assigned by Toolbar1_ButtonClick in module frmMain
Referenced by Toolbar1_ButtonClick in module frmMain
Global sUserServer As String |
|
globales mail.bas
Assigned by Form_Load in module frmMain
Assigned by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Referenced by Form_Load in module frmMain
Assigned by Toolbar1_ButtonClick in module frmMain
server As String * 30
from As String * 40
remitente As String * 40
camino As String * 5
globales mail.bas
Referenced by (declarations of Module1) in this module
nombre As String * 30
email As String * 30
clave As String * 50
globales mail.bas
Referenced by (declarations of Module1) in this module
fecha As String * 8
hora As String * 10
para As String * 30
correo As String * 30
ref As String * 30
adjunto As String * 15
globales mail.bas
Referenced by (declarations of Module1) in this module
(declarations of Module1) |
|
'********************************************
'
' Tomas Bradanovic Computación
' Codornices 1520 fonos 231211 - 253956
' Arica, Chile
'
' Aplicación de Correo Electrónico Seguro para
' Investigaciones de Chile
'
' Ejecutable : correo seguro.exe
' Ultima modificación el 21-11-99
'
'*********************************************
Option Explicit
Public vFileIn As String, vFileOut As String, vEncrypt As Long, vSign As Long, vSignAlg As Long, vConventional As Long, vConventionalAlg As Long, vArmor As Long, vTextMode As Long, vClear As Long, vCompress As Long, vEyesOnly As Long, vMIME As Long, vCryptKeyID As String, vSignKeyID As String, vSignKeyPass As String, vIDEAPass As String, vComment As String, vMIMEsep As String
Public vUser, vServer, vFrom
Type datosfijos
server As String * 30
from As String * 40
remitente As String * 40
camino As String * 5
End Type
Type libretadirecciones
nombre As String * 30
email As String * 30
clave As String * 50
End Type
Type correoenviado
fecha As String * 8
hora As String * 10
para As String * 30
correo As String * 30
ref As String * 30
adjunto As String * 15
End Type
Global datfij As datosfijos
Global lib As libretadirecciones
Global camino
Global clavepgp
Global codigoitem 'libreta de direcciones
Global env As correoenviado
Global Const ArEnviados = "enviados.dat"
Global direlec(100)
Global clave(100)
Global sINIFile As String
Global sUserName As String
Global sUserEmail As String
Global sUserServer As String
Module name: frmLibreta
(declarations of frmLibreta)
Command1_Click
Command2_Click
Command3_Click
Form_Load
Image7_Click
List1_Click
Text1_GotFocus
Text1_KeyPress
Vars/Consts/Types/Enums in (declarations) of frmLibreta |
|
(declarations of frmLibreta) |
|
Private Sub Command1_Click()
Open "libreta" For Random As 1
Get 1, 1, lib
ultimo = Val(lib.nombre)
If Val(ultimo) = 0 Then ultimo = 1
puntero = ultimo + 1
lib.nombre = puntero
Put 1, 1, lib
codigo2 = puntero
lib.nombre = Text1(0).Text
lib.email = Text1(1).Text
lib.clave = Text1(2).Text
Put 1, puntero, lib
List1.AddItem lib.nombre
List1.Clear
For z = 2 To 100
Get 1, z, lib
List1.AddItem lib.nombre
Next z
Close
End Sub
Private Sub Command2_Click()
Open "libreta" For Random As 1
lib.nombre = Text1(0).Text
lib.email = Text1(1).Text
lib.clave = Text1(2).Text
Put 1, codigoitem, lib
List1.Clear
For z = 2 To 100
Get 1, z, lib
List1.AddItem lib.nombre
Next z
Close
End Sub
Private Sub Command3_Click()
Text1(0) = ""
Text1(1) = ""
Text1(2) = ""
End Sub
Private Sub Form_Load()
Close
Open "libreta" For Random As 1
List1.Clear
For z = 2 To 100
Get 1, z, lib
List1.AddItem lib.nombre
Next z
Close
End Sub
Private Sub Image7_Click()
Unload frmLibreta
End Sub
Private Sub List1_Click()
codigoitem = (List1.ListIndex) + 2
Open "libreta" For Random As 1
Get 1, codigoitem, lib
Text1(0).Text = lib.nombre
Text1(1).Text = lib.email
Text1(2).Text = lib.clave
Close
End Sub
Private Sub Text1_GotFocus(Index As Integer)
' MarcaTodo Text1
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then
Text1(0).Text = UCase(Text1(0).Text)
Text1(1).Text = LCase(Text1(1).Text)
Text1(2).Text = UCase(Text1(2).Text)
SendKeys "{TAB}", True
KeyAscii = 0 ' para evitar un 'beep' indeseado
End If
End Sub
Module name: interprop
(declarations of interprop)
Command1_Click
Form_Load
Image7_Click
Image8_Click
lblURL_Click
Vars/Consts/Types/Enums in (declarations) of interprop |
|
HH_DISPLAY_TOPIC = &H0
HH_HELP_FINDER = &H0
HH_DISPLAY_TOC = &H1
HH_DISPLAY_INDEX = &H2
HH_DISPLAY_SEARCH = &H3
HH_SET_WIN_TYPE = &H4
HH_GET_WIN_TYPE = &H5
HH_GET_WIN_HANDLE = &H6
HH_GET_INFO_TYPES = &H7
HH_SET_INFO_TYPES = &H8
HH_SYNC = &H9
HH_ADD_NAV_UI = &HA
HH_ADD_BUTTON = &HB
HH_GETBROWSER_APP = &HC
HH_KEYWORD_LOOKUP = &HD
HH_DISPLAY_TEXT_POPUP = &HE
HH_HELP_CONTEXT = &HF
HH_TP_HELP_CONTEXTMENU
HH_TP_HELP_WM_HELP = &H11
HH_CLOSE_ALL = &H12
HH_ALINK_LOOKUP = &H13
interprop.Frm
Referenced by (declarations of interprop) in this module
(declarations of interprop) |
|
'------------------------------------------------------------------
'Form de prueba para HTML Help Workshop (28/Jun/98)
'
'©Guillermo 'guille' Som, 1998
'------------------------------------------------------------------
Option Explicit
'En Microsoft TechNet puedes encontrar este artículo:
'HOWTO: Use HTML Help API in a Visual Basic 5.0 Application
'PSS ID Number: Q183434
'
'Aunque la definición de la Enumeración y la primera declaración
'es de las news
'
'Htmlhelp consts
Private Enum HH_COMMAND
HH_DISPLAY_TOPIC = &H0
HH_HELP_FINDER = &H0 ' WinHelp equivalent
HH_DISPLAY_TOC = &H1 ' not currently implemented
HH_DISPLAY_INDEX = &H2 ' not currently implemented
HH_DISPLAY_SEARCH = &H3 ' not currently implemented
HH_SET_WIN_TYPE = &H4
HH_GET_WIN_TYPE = &H5
HH_GET_WIN_HANDLE = &H6
HH_GET_INFO_TYPES = &H7 ' not currently implemented
HH_SET_INFO_TYPES = &H8 ' not currently implemented
HH_SYNC = &H9
HH_ADD_NAV_UI = &HA ' not currently implemented
HH_ADD_BUTTON = &HB ' not currently implemented
HH_GETBROWSER_APP = &HC ' not currently implemented
HH_KEYWORD_LOOKUP = &HD
HH_DISPLAY_TEXT_POPUP = &HE ' display string resource id
' or text in a popup window
HH_HELP_CONTEXT = &HF ' display mapped numeric value
' in dwData
HH_TP_HELP_CONTEXTMENU ' Text pop-up help, similar to
' WinHelp's HELP_CONTEXTMENU.
HH_TP_HELP_WM_HELP = &H11 ' text pop-up help, similar to
' WinHelp's HELP_WM_HELP.
HH_CLOSE_ALL = &H12 ' close all windows opened directly
' or indirectly by the caller
HH_ALINK_LOOKUP = &H13 ' ALink version of HH_KEYWORD_LOOKUP
End Enum
'HtmlHelp api call
'NOTA: Si se usa esta forma, hay que indicar el último parámetro
' con la palabra ByVal delante...
'Private Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller As Long, ByVal pszFile As String, _
ByVal uCommand As HH_COMMAND, dwData As Any) As Long
'Con esta funciona perfectamente
Private Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller As Long, ByVal pszFile As String, _
ByVal uCommand As HH_COMMAND, ByVal dwData As Long) As Long
Private Sub Command1_Click()
Load frmAbout
frmAbout.Show
End Sub
Private Sub Form_Load()
Dim e(30)
Dim z As Integer
e(0) = "CAPJ - INVESTIGACIONES DE CHILE"
e(1) = "*****************************************"
e(2) = "Nombre ejecutable: correo.exe"
e(3) = "Archivo de datos: correomov.dat"
e(4) = "Archivo de datos: libreta.dat"
e(5) = "Archivo de datos: correo.INI"
e(6) = "Tipo de archivos de datos:"
e(7) = "ASCII plano, sin indexación"
e(8) = "La primera posición almacena"
e(9) = "la cantidad de registros."
e(10) = "Lenguaje programa:"
e(11) = "Microsoft Visual Basic 6.0"
e(12) = "(Profesional Edition)"
e(13) = "Encriptación Diffie-Hellman: PGP 6.2i"
e(14) = "Envio SMTP - Recepcion POP3"
e(15) = "(Outlook)"
e(16) = "DLLs: SendMail.dll, PGPTools.dll"
e(17) = "****************************"
e(18) = " (r) Tomás Bradanovic"
e(19) = " Programación y Asesoría"
For z = 0 To 19
List1.AddItem e(z)
Next z
End Sub
Private Sub Image7_Click()
Unload interprop
End Sub
Private Sub Image8_Click()
Load frmAbout
frmAbout.Show
End Sub
Private Sub lblURL_Click()
Dim nfile As Integer
'escribir un archivo URL temporal
nfile = FreeFile
Open App.Path & "\temp.url" For Output As #nfile
Print #nfile, "[InternetShortcut]"
Print #nfile, "URL=" & lblURL.Caption
Close #nfile
'arrancar el explores
Shell "rundll32.exe shdocvw.dll,OpenURL " & App.Path & "\temp.url", vbNormalFocus
'eliminar el archivo temporal
Kill App.Path & "\temp.url"
End Sub
Module name: frmAbout
(declarations of frmAbout)
cmdSysInfo_Click
Form_Load
GetKeyValue
Image7_Click
StartSysInfo
Vars/Consts/Types/Enums in (declarations) of frmAbout |
|
Const READ_CONTROL = &H20000 |
|
frmabout.frm
Referenced by (declarations of frmAbout) in this module
Const KEY_QUERY_VALUE = &H1 |
|
frmabout.frm
Referenced by (declarations of frmAbout) in this module
Const KEY_SET_VALUE = &H2 |
|
frmabout.frm
Referenced by (declarations of frmAbout) in this module
Const KEY_CREATE_SUB_KEY = &H4 |
|
frmabout.frm
Referenced by (declarations of frmAbout) in this module
Const KEY_ENUMERATE_SUB_KEYS = &H8 |
|
frmabout.frm
Referenced by (declarations of frmAbout) in this module
frmabout.frm
Referenced by (declarations of frmAbout) in this module
Const KEY_CREATE_LINK = &H20 |
|
frmabout.frm
Referenced by (declarations of frmAbout) in this module
Const KEY_ALL_ACCESS = KEY_QUERY_VALUE + KEY_SET_VALUE + KEY_CREATE_SUB_KEY + KEY_E |
|
frmabout.frm
Referenced by GetKeyValue in this module
Const HKEY_LOCAL_MACHINE = &H80000002 |
|
frmabout.frm
Referenced by StartSysInfo in this module
Referenced by StartSysInfo in this module
frmabout.frm
Referenced by GetKeyValue in this module
Referenced by GetKeyValue in this module
frmabout.frm
Referenced by GetKeyValue in this module
frmabout.frm
Referenced by GetKeyValue in this module
Const gREGKEYSYSINFOLOC = "SOFTWARE\Microsoft\Shared Tools Location" |
|
frmabout.frm
Referenced by StartSysInfo in this module
Const gREGVALSYSINFOLOC = "MSINFO" |
|
frmabout.frm
Referenced by StartSysInfo in this module
Const gREGKEYSYSINFO = "SOFTWARE\Microsoft\Shared Tools\MSINFO" |
|
frmabout.frm
Referenced by StartSysInfo in this module
Const gREGVALSYSINFO = "PATH" |
|
frmabout.frm
Referenced by StartSysInfo in this module
(declarations of frmAbout) |
|
Option Explicit
' Opciones de seguridad de clave del Registro...
Const READ_CONTROL = &H20000
Const KEY_QUERY_VALUE = &H1
Const KEY_SET_VALUE = &H2
Const KEY_CREATE_SUB_KEY = &H4
Const KEY_ENUMERATE_SUB_KEYS = &H8
Const KEY_NOTIFY = &H10
Const KEY_CREATE_LINK = &H20
Const KEY_ALL_ACCESS = KEY_QUERY_VALUE + KEY_SET_VALUE + _
KEY_CREATE_SUB_KEY + KEY_ENUMERATE_SUB_KEYS + _
KEY_NOTIFY + KEY_CREATE_LINK + READ_CONTROL
' Tipos ROOT de clave del Registro...
Const HKEY_LOCAL_MACHINE = &H80000002
Const ERROR_SUCCESS = 0
Const REG_SZ = 1 ' Cadena Unicode terminada en valor nulo
Const REG_DWORD = 4 ' Número de 32 bits
Const gREGKEYSYSINFOLOC = "SOFTWARE\Microsoft\Shared Tools Location"
Const gREGVALSYSINFOLOC = "MSINFO"
Const gREGKEYSYSINFO = "SOFTWARE\Microsoft\Shared Tools\MSINFO"
Const gREGVALSYSINFO = "PATH"
Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long
Public Sub StartSysInfo()
On Error GoTo SysInfoErr
Dim SysInfoPath As String
' Intentar obtener ruta de acceso y nombre del programa de Info. del sistema a partir del Registro...
If GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO, SysInfoPath) Then
' Intentar obtener sólo ruta del programa de Info. del sistema a partir del Registro...
ElseIf GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFOLOC, gREGVALSYSINFOLOC, SysInfoPath) Then
' Validar la existencia de versión conocida de 32 bits del archivo
If (Dir(SysInfoPath & "\MSINFO32.EXE") <> "") Then
SysInfoPath = SysInfoPath & "\MSINFO32.EXE"
' Error: no se puede encontrar el archivo...
Else
GoTo SysInfoErr
End If
' Error: no se puede encontrar la entrada del Registro...
Else
GoTo SysInfoErr
End If
Call Shell(SysInfoPath, vbNormalFocus)
Exit Sub
SysInfoErr:
MsgBox "La información del sistema no está disponible en este momento", vbOKOnly
End Sub
- cmdSysInfo_Click
- GetKeyValue
Public Function GetKeyValue(KeyRoot As Long, KeyName As String, SubKeyRef As String, ByRef KeyVal As String) As Boolean
Dim i As Long ' Contador de bucle
Dim rc As Long ' Código de retorno
Dim hKey As Long ' Controlador de una clave de Registro abierta
Dim KeyValType As Long ' Tipo de datos de una clave de Registro
Dim tmpVal As String ' Almacenamiento temporal para un valor de clave de Registro
Dim KeyValSize As Long ' Tamaño de variable de clave de Registro
'------------------------------------------------------------
' Abrir clave de registro bajo KeyRoot {HKEY_LOCAL_MACHINE...}
'------------------------------------------------------------
rc = RegOpenKeyEx(KeyRoot, KeyName, 0, KEY_ALL_ACCESS, hKey) ' Abrir clave de Registro
If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Error de controlador...
tmpVal = String$(1024, 0) ' Asignar espacio de variable
KeyValSize = 1024 ' Marcar tamaño de variable
'------------------------------------------------------------
' Obtener valor de clave de Registro...
'------------------------------------------------------------
rc = RegQueryValueEx(hKey, SubKeyRef, 0, _
KeyValType, tmpVal, KeyValSize) ' Obtener o crear valor de clave
If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Controlar errores
If (Asc(Mid(tmpVal, KeyValSize, 1)) = 0) Then ' Win95 agregar cadena terminada en valor nulo...
tmpVal = Left(tmpVal, KeyValSize - 1) ' Encontrado valor nulo, se va a quitar de la cadena
Else ' En WinNT las cadenas no terminan en valor nulo...
tmpVal = Left(tmpVal, KeyValSize) ' No se ha encontrado valor nulo, sólo se va a extraer la cadena
End If
'------------------------------------------------------------
' Determinar tipo de valor de clave para conversión...
'------------------------------------------------------------
Select Case KeyValType ' Buscar tipos de datos...
Case REG_SZ ' Tipo de datos String de clave de Registro
KeyVal = tmpVal ' Copiar valor de cadena
Case REG_DWORD ' Tipo de datos Double Word de clave del Registro
For i = Len(tmpVal) To 1 Step -1 ' Convertir cada bit
KeyVal = KeyVal + Hex(Asc(Mid(tmpVal, i, 1))) ' Generar valor carácter a carácter
Next
KeyVal = Format$("&h" + KeyVal) ' Convertir Double Word a cadena
End Select
GetKeyValue = True ' Se ha devuelto correctamente
rc = RegCloseKey(hKey) ' Cerrar clave de Registro
Exit Function ' Salir
GetKeyError: ' Borrar después de que se produzca un error...
KeyVal = "" ' Establecer valor a cadena vacía
GetKeyValue = False ' Fallo de retorno
rc = RegCloseKey(hKey) ' Cerrar clave de Registro
End Function
- StartSysInfo
- RegOpenKeyEx in module ADVAPI32
- RegQueryValueEx in module ADVAPI32
- RegCloseKey in module ADVAPI32
Private Sub cmdSysInfo_Click()
Call StartSysInfo
End Sub
- StartSysInfo
Private Sub Form_Load()
Me.Caption = "Acerca de " & App.Title
lblVersion.Caption = "Versión " & App.Major & "." & App.Minor & "." & App.Revision
lblTitle.Caption = App.Title
End Sub
Private Sub Image7_Click()
Unload Me
End Sub
Module name: pase
(declarations of pase)
Text1_KeyPress
Vars/Consts/Types/Enums in (declarations) of pase |
|
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Trim(Text1.Text) <> "231211" Then
Text1.Text = ""
Beep
ElseIf Trim(Text1.Text) = "231211" Then
Unload pase
Load frmMain
frmMain.Show
End If
End If
End Sub
Module name: SETPGP
(declarations of SETPGP)
Vars/Consts/Types/Enums in (declarations) of SETPGP |
|
'SPGP.BAS
'version 2.4.0.0, 24 February 00
'added functions spgpKeyGenerate, spgpSubKeyGenerate, spgpSdkApiVersion
'--------------------------------------------------------
' function names exported from the dll are case-sensitive.
' encrypt/decrypt
Declare Function spgp_EncodeFile Lib "spgp.dll" Alias "spgp_encodefile" (ByVal FileIn As String, ByVal FileOut As String, ByVal Encrypt As Long, ByVal Sign As Long, ByVal SignAlg As Long, ByVal Conventional As Long, ByVal ConventionalAlg As Long, ByVal Armor As Long, ByVal TextMode As Long, ByVal Clear As Long, ByVal Compress As Long, ByVal EyesOnly As Long, ByVal MIME As Long, ByVal CryptKeyID As String, ByVal SignKeyID As String, ByVal SignKeyPass As String, ByVal ConventionalPass As String, ByVal Comment As String, ByVal MIMESeparator As String) As Long
Module name: DecINI
(declarations of DecINI)
sGetINI
writeini
Vars/Consts/Types/Enums in (declarations) of DecINI |
|
'DECLARACIONES APÌ PARA ARCHIVOS INI
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Public Sub writeini(sINIFile As String, sSection As String, sKey As String, sValue As String)
Dim n As Integer
Dim sTemp As String
sTemp = sValue
'reemplaza CR/LF con espacios
For n = 1 To Len(sValue)
If Mid$(sValue, n, 1) = vbCr Or Mid$(sValue, n, 1) = vbLf Then Mid$(sValue, n, 1) = " "
Next n
n = WritePrivateProfileString(sSection, sKey, sTemp, sINIFile)
End Sub
- Form_Load in module frmMain
- Toolbar1_ButtonClick in module frmMain
- WritePrivateProfileString in module KERNEL32
Public Function sGetINI(sINIFile As String, sSection As String, sKey As String, sDefault As String) As String
Dim sTemp As String * 256
Dim nLength As Integer
sTemp = Space$(256)
nLength = GetPrivateProfileString(sSection, sKey, sDefault, sTemp, 255, sINIFile)
sGetINI = Left$(sTemp, nLength)
End Function
- Form_Load in module frmMain
- GetPrivateProfileString in module KERNEL32
Module name: HHCTRL
HtmlHelp
Declared in interprop
Private Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hwndCaller As Long, ByVal pszFile As String, ByVal uCommand As HH_COMMAND, ByVal dwData As Long) As Long
Module name: ADVAPI32
RegCloseKey
RegOpenKeyEx
RegQueryValueEx
Declared in frmAbout
Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long
- GetKeyValue in module frmAbout
Declared in frmAbout
Private Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long
- GetKeyValue in module frmAbout
Declared in frmAbout
Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long
- GetKeyValue in module frmAbout
Module name: SPGP
spgp_EncodeFile
Declared in SETPGP
Declare Function spgp_EncodeFile Lib "spgp.dll" Alias "spgp_encodefile" (ByVal FileIn As String, ByVal FileOut As String, ByVal Encrypt As Long, ByVal Sign As Long, ByVal SignAlg As Long, ByVal Conventional As Long, ByVal ConventionalAlg As Long, ByVal Arm
- encriptar in module frmMain
Module name: KERNEL32
GetPrivateProfileString
WritePrivateProfileString
Declared in DecINI
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As Strin
- sGetINI in module DecINI
WritePrivateProfileString |
|
Declared in DecINI
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
- writeini in module DecINI
ADVAPI32 (ADVAPI32.DLL)
DecINI (DecINI.bas)
frmAbout (frmabout.frm)
frmLibreta (frmLibreta.frm)
frmMain (frmSendMailEx.frm)
HHCTRL (HHCTRL.OCX)
interprop (interprop.Frm)
KERNEL32 (KERNEL32.DLL)
Module1 (globales mail.bas)
pase (pase.frm)
SETPGP (SETPGP.bas)
SPGP (SPGP.DLL)
AgregaEnviados (frmMain)
cmdBrowse_Click (frmMain)
cmdSysInfo_Click (frmAbout)
Command1_Click (frmLibreta)
Command1_Click (interprop)
Command2_Click (frmLibreta)
Command3_Click (frmLibreta)
encriptar (frmMain)
Form_Initialize (frmMain)
Form_Load (frmLibreta)
Form_Load (interprop)
Form_Load (frmMain)
Form_Load (frmAbout)
Form_Unload (frmMain)
GetKeyValue (frmAbout)
GetPrivateProfileString (KERNEL32)
HtmlHelp (HHCTRL)
Image1_Click (frmMain)
Image7_Click (frmLibreta)
Image7_Click (interprop)
Image7_Click (frmAbout)
Image8_Click (interprop)
Label3_Click (frmMain)
lblURL_Click (interprop)
List1_Click (frmLibreta)
List1_DblClick (frmMain)
poSendMail_SendFailed (frmMain)
poSendMail_SendSuccesful (frmMain)
poSendMail_Status (frmMain)
RegCloseKey (ADVAPI32)
RegOpenKeyEx (ADVAPI32)
RegQueryValueEx (ADVAPI32)
sGetINI (DecINI)
spgp_EncodeFile (SPGP)
StartSysInfo (frmAbout)
Text1_GotFocus (frmLibreta)
Text1_KeyPress (pase)
Text1_KeyPress (frmLibreta)
Toolbar1_ButtonClick (frmMain)
txtFrom_KeyPress (frmMain)
txtFromName_KeyPress (frmMain)
TxtMsg_DblClick (frmMain)
txtServer_KeyPress (frmMain)
txtToName_Click (frmMain)
writeini (DecINI)
WritePrivateProfileString (KERNEL32)
Project Analyzer 5.2.07 (28/07/00) cliente correo smtp.vbp v1.2.2