If you can't Invoke all APIs its alright just a few and me I finish thats no problem mate just make the work a little easier for me
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCita de: Danyfirex en 24 Noviembre 2012, 14:59 PM
I think you are so lazy, You At least should come here with some doubt. But you always are here as if the people here work for you.
can someone make me a FUD,
can someone make my work for me, then go to my house and help me with my wife,
maybe someone can bring me money.
maybe can go to my work for me.
also make my homework.
Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hFtpSession As Long, ByVal lpszLocalFile As String, ByVal lpszRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUserName As String, ByVal sPassword As String, ByVal nService As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal nAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal nFlags As Long) As Long
Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer
Declare Function InternetOpenUrlA Lib "wininet" (ByVal hInternetSession As Long, ByVal lpszUrl As String, ByVal lpszHeaders As String, ByVal dwHeadersLength As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Const INTERNET_SERVICE_FTP = 1: Global sURL As String
Function FTPUpload(sFile As String, sHost As String, sUser As String, sPass As String)
Dim hINetSession, hSession, sTemp() As String: sTemp = Split(sFile, "\")
hINetSession = InternetOpen("project", 0, vbNullString, vbNullString, 0)
hSession = InternetConnect(hINetSession, sHost, "21", sUser, sPass, INTERNET_SERVICE_FTP, 0, 0)
If FtpPutFile(hSession, sFile, sTemp(UBound(sTemp)), 1, 0) = False Then
Call InternetCloseHandle(hSession): Call InternetCloseHandle(hINetSession)
End If
End Function
Option Explicit
Private Const MICROSOFT_CDO_CONFIGURATION$ = "http://schemas.microsoft.com/cdo/configuration/"
Private Declare Function GetFileAttributesW Lib "KERNEL32" (ByVal lpFileName As Long) As Long
Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal dwReserved As Long) As Long
Private lngPort&, strUser$, strPass$, strFrom$, strServer$, strSubject$, strMessage$, strDestinatary$, strAttachedFile$
Private objCDO As Object, bolUseAuntentificacion As Boolean, bolSSL As Boolean
Friend Property Let Server(ByRef Value$): strServer = Value: End Property
Friend Property Let Destinatary(ByRef Value$): strDestinatary = Value: End Property
Friend Property Let From(ByRef Value$): strFrom = Value: End Property
Friend Property Let Subject(ByRef Value$): strSubject = Value: End Property
Friend Property Let Message(ByRef Value$): strMessage = Value: End Property
Friend Property Let AttachedFile(ByRef Value$): strAttachedFile = Value: End Property
Friend Property Let Port(ByVal Value&): lngPort = Value: End Property
Friend Property Let User(ByRef Value$): strUser = Value: End Property
Friend Property Let Password(ByRef Value$): strPass = Value: End Property
Friend Property Let UseAuntentificacion(ByVal Value As Boolean): bolUseAuntentificacion = Value: End Property
Friend Property Let SSL(ByVal Value As Boolean): bolSSL = Value: End Property
Friend Function SendMail() As Boolean
On Error GoTo FatalError
If InternetGetConnectedState(&H0&, &H0&) Then
If (LenB(strPass) = 0) Or (LenB(strUser) = 0) Or (LenB(strFrom) = 0) Or (LenB(strServer) = 0) Or (LenB(strDestinatary) = 0) Or ((lngPort < 0) Or (lngPort > &HFDE8&)) Then Exit Function
With objCDO
With .Configuration
.Fields(MICROSOFT_CDO_CONFIGURATION & "smtpserver") = strServer
.Fields(MICROSOFT_CDO_CONFIGURATION & "sendusing") = &H2&
With .Fields
.Item(MICROSOFT_CDO_CONFIGURATION & "smtpserverport") = lngPort
.Item(MICROSOFT_CDO_CONFIGURATION & "smtpauthenticate") = Abs(bolUseAuntentificacion)
.Item(MICROSOFT_CDO_CONFIGURATION & "smtpconnectiontimeout") = &HA&
If bolUseAuntentificacion Then
.Item(MICROSOFT_CDO_CONFIGURATION & "sendusername") = strUser
.Item(MICROSOFT_CDO_CONFIGURATION & "sendpassword") = strPass
.Item(MICROSOFT_CDO_CONFIGURATION & "smtpusessl") = bolSSL
End If
.Update
End With
End With
.To = strDestinatary: .From = strFrom: .Subject = strSubject: .TextBody = strMessage
If LenB(strAttachedFile) Then
If GetFileAttributesW(StrPtr(strAttachedFile)) > -1 Then .AddAttachment (strAttachedFile)
End If
.Send
End With
SendMail = True
End If
FatalError:
End Function
Private Sub Class_Initialize()
Set objCDO = CreateObject("CDO.Message")
End Sub
Private Sub Class_Terminate()
Set objCDO = Nothing
End Sub
Cita de: Danyfirex en 14 Noviembre 2012, 19:20 PM
many people is able. but none work for you.
at least try make something, show the code that you have till now.
Cita de: MCKSys Argentina en 11 Noviembre 2012, 01:37 AM
That's the idea. Once you understand how the format is and works, you can create the code to handle it.
Cita de: MCKSys Argentina en 10 Noviembre 2012, 04:58 AM
Create one with the VB resource editor, put the file inside, save it, and then analyze the contents of the .res with an hex editor...