Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

weird .... please help debug

Status
Not open for further replies.

foxup

Programmer
Dec 14, 2010
328
CA
Hi,

I have this code:

Local iMsg,iConf
Declare SHORT InternetGetConnectedState In wininet.Dll;
INTEGER @lpdwFlags, Integer dwReserved
lConnect=displayState()
If lConnect
iMsg = Createobject("CDO.Message")
iConf = Createobject("CDO.Configuration")
Flds = iConf.Fields
With Flds
.Item(" = 2
.Item(" = '999.999.9.99' &&Brutus IP
.Item(" = 25
.Update()
Endwith
With iMsg
.Configuration = iConf
.To = "me@me.com"
.CC = ""
.BCC = ""
.From = m.emal
.Subject = "Test "
.Fields("Priority").Value = 1 && -1=Low, 0=Normal, 1=High
.Fields.Update()
.TextBody = "NEW INTERNET ORDER SUBMITTED"
.Send()
Endwith
iMsg = .Null.
iConf = .Null.
Flds = .Null.
Else
Messagebox("Could not send the message, your internet connection is down.")
Endif
Procedure displayState
Local lConnected
lConnected = .F.
lpdwFlags = 0
If InternetGetConnectedState (@lpdwFlags, 0) = 1
lConnected = .T.
Endif
Return lConnected
Endproc

I've masked the IP address for security reasons but my problem is that I get an message message saying:

Could not send the message, your internet connection is down

BUT it's not really down. I can surf with no problem. Actually, the problem is it's not working on 1 computer (the 1 I get the error message) but it's OK on another (even though I can surf on it).

Please help on what the problem could be.

Any help please.

Thanks,
FOXUP
 
It's OK, never mind. It's a corrupt wininet.Dll file.


Sorry to bother everybody.


Thanks,
FOXUP


PS.: Should I give myself a star (just joking). LOL


Thanks everybody.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top