PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
WM - Como tratar conexão lenta ou sinal muito fraco com o Windev Mobile e webservice?
WM - Como tratar conexão lenta ou sinal muito fraco com o Windev Mobile e webservice?
Started by BOLLER, Oct., 31 2016 10:20 PM - No answer
Connect yourself…
BOLLER
#1
Registered member
3,659 messages
Popularité : +175 (223 votes)
Posted on October, 31 2016 - 10:20 PM
Boa noite
Entao...
Se usar webservice tudo é possivele com garantia de dados
Para isso webservice deve ter no metodo:
- o token de segurança = senha unica que só existe no servidor
- o md5 do que sera enviado
- o que sera enviado
Chegando no servidor os dados, o webservice do metodo deve compara com o md5 com o que veio
Se diferente, deve dizer que veio incompleto = erro
Se webservice bateu md5 com o que veio deve retornar = ok
Simples assim....
Se deu erro a multi thread no Windev mobile deve ficar em loop tentando mandar
Olha que legal e simples de fazer
http://help.windev.com/en-US/…
http://help.windev.com/en-US/…
http://help.windev.com/en-US/…
http://help.windev.com/en-US/…
// Calculate the Hash of values for two edit controls
Hash1 is Buffer
=
HashString
(
HA_MD5_128
,
EDT_
Edit1
)
Hash2 is Buffer
=
HashString
(
HA_MD5_128
,
EDT_
Edit2
)
// Compare the two Hash
IF
Hash1
=
Hash2
THEN
Info
(
"The two strings are identical."
)
// Calculate the Hash of two files
Hash1 is Buffer
=
HashFile
(
HA_MD5_128
,
"C:\My files\FileA.txt"
)
Hash2 is Buffer
=
HashFile
(
HA_MD5_128
,
"D:\My files\FileB.txt"
)
// Compare the two Hash
IF
Hash1
=
Hash2
THEN
Info
(
"The two files are identical."
)
// Check the password:
// - Password typed in the "EDT_TypePassword" control
// - The password Hash is found in the "User.HashPassword" item
IF
HashCheckString
(
HA_MD5_128
,
EDT_
TypePassword
, ...
User.HashPassword
) =
True
THEN
Info
(
"Password OK."
)
// Rest of process
// ...
ELSE
Error
(
"Wrong password."
)
// Resume the input
ReturnToCapture
(
EDT_
TypePassword
)
END
// Calculate the Hash of the "C:\Temp\File.txt" file
HashMyFile is
string
HashMyFile
=
HashFile
(
HA_MD5_128
,
"C:\Temp\File.txt"
)
// Process on the file
// ...
// Checks whether the file was modified
IF
HashCheckFile
(
HA_MD5_128
,
"C:\Temp\File.txt"
, ...
HashMyFile
) =
False
THEN
Info
(
"The file was modified."
)
END
Bons estudos
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Message modified, October, 31 2016 - 10:25 PM
Report
0
1
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text