Search found 51 matches

by roleg
Mon Jan 04, 2016 9:50 am
Forum: Coding Questions
Topic: RCON Protocol on PB
Replies: 36
Views: 12620

Re: RCON Protocol on PB

Thanks Bernd for your code!
I use this constants:

Code: Select all

#SERVERDATA_AUTH = 3
#SERVERDATA_AUTH_RESPONSE = 0
#SERVERDATA_EXECCOMMAND = 2
#SERVERDATA_RESPONSE_VALUE = 4
work fine for me (RUST dedicated server)
by roleg
Wed Dec 23, 2015 8:11 am
Forum: Coding Questions
Topic: RCON Protocol on PB
Replies: 36
Views: 12620

Re: RCON Protocol on PB

I try to implement this code to my communication with server program, but it's work wrong. After it connected, server print in stdout: "Disconnected: Invalid Password" but passwords is OK and after that my program crashed with that error: "[08:51:30] [ERROR] rcon.pb (Line: 45) [08:51:30] [ERROR ...
by roleg
Mon Sep 22, 2014 8:07 am
Forum: Coding Questions
Topic: Database question
Replies: 3
Views: 1862

Re: Database question

probably the easiest way is with the following:

If DatabaseQuery(db, "SELECT COUNT(*) FROM Tabl_C WHERE Num485=123")
While NextDatabaseRow(db)
counter.i=GetDatabaseLong(db, 0)
Debug counter.i
Wend
FinishDatabaseQuery(db)
EndIf
but I need retrive Kod and others columns in this query
OK, I ...
by roleg
Mon Sep 22, 2014 7:14 am
Forum: Coding Questions
Topic: Database question
Replies: 3
Views: 1862

Database question

Hi all!
I'm try some functionality of PB 5.X to use ODBC conection to my MSSQL database and I don't see function to retrieve num rows affected. Only I see in the help is AffectedDatabaseRows, but it's for DatabaseUpdate() only.
I need retrieve num rows returned from DatabaseQuery() command.

Like ...
by roleg
Thu Dec 05, 2013 12:14 pm
Forum: Coding Questions
Topic: SCrypt algorithm
Replies: 1
Views: 1455

SCrypt algorithm

Hi all !
http://www.zer7.com/software.php?page=cryptsharp
How can I use SCrypt functions from this library?
by roleg
Thu Sep 26, 2013 12:52 pm
Forum: Coding Questions
Topic: Some trouble with NetworkEvents
Replies: 3
Views: 767

Re: Some trouble with NetworkEvents

Bisonte wrote:What do you think ?
How can someone help you to solve, without some code that demonstrate it ?
standart code, from PB Help, only server event handler in thread
by roleg
Thu Sep 26, 2013 12:09 pm
Forum: Coding Questions
Topic: Some trouble with NetworkEvents
Replies: 3
Views: 767

Some trouble with NetworkEvents

I'm writing a Client-Server application (5 clients and one server).

At some point in the test on localhost, after prolonged number of requests sents and received to/from server, the Clients one by one, for unknown reasons, issue #PB_NetworkEvent_Disconnect event. After that, the Server continues to ...
by roleg
Mon Sep 09, 2013 1:25 pm
Forum: Coding Questions
Topic: How to get screen coords of my Icon in System Tray?
Replies: 10
Views: 2760

Re: How to get screen coords of my Icon in System Tray?

yes, I can replace image with another outer layer, this is not a problem.

problem: I cannot find Icon position on the screen...

OpenWindow(0, 100, 150, 300, 100, "Test", #PB_Window_Normal)
DataSection
FileIconLabel:
IncludeBinary "file_server.ico"
EndDataSection
IconID = CatchImage(FileIcon ...
by roleg
Mon Sep 09, 2013 12:25 pm
Forum: Coding Questions
Topic: How to get screen coords of my Icon in System Tray?
Replies: 10
Views: 2760

How to get screen coords of my Icon in System Tray?

I create some Icon in the System Tray.
How can I get its X and Y?

It is necessary to draw over the Icon a pop-up image.
by roleg
Mon Aug 05, 2013 11:40 am
Forum: Coding Questions
Topic: Convert QUAD to BASEn and v.v.
Replies: 2
Views: 1060

Re: Convert QUAD to BASEn and v.v.

Thanks, Little John

#alphanum$="0123456789abcdefghijklmnoprstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZабвгдежзийклмнопрстуфхцчшщъыьэюяАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ!@#$%^&*()_+-=[]{}\|:;'"+Chr(34)+",.<>/?`~ "
Global lenc.i=Len(#alphanum$)

Procedure.s StrX (number.q)
Protected digit.i, ret ...
by roleg
Mon Aug 05, 2013 9:21 am
Forum: Coding Questions
Topic: Convert QUAD to BASEn and v.v.
Replies: 2
Views: 1060

Convert QUAD to BASEn and v.v.

#alphanum$="0123456789abcdefghijklmnoprstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZабвгдежзийклмнопрстуфхцчшщъыьэюяАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ!@#$%^&*()_+-=[]{}\|:;'"+Chr(34)+",.<>/?`~ "
Global lenc.q=Len(#alphanum$)

Procedure.s NumToBase(x.q)
; Convert number to base string.
Protected.s r$
If x > 0 ...
by roleg
Wed Mar 27, 2013 7:50 am
Forum: Tricks 'n' Tips
Topic: HTTP(S) with WININET
Replies: 13
Views: 13872

Re: HTTP(S) with WININET

The number of sites checked grows, filling Map() + content sites temporarily loaded into RAM, and expands by about 100 Mb constantly

P.S. I add small timeout Delay(100) after CloseHandle and it was less falling out with an error.
it seems that the handles do not have time to close and to free :lol ...
by roleg
Tue Mar 26, 2013 3:30 pm
Forum: Tricks 'n' Tips
Topic: HTTP(S) with WININET
Replies: 13
Views: 13872

Re: HTTP(S) with WININET

PB 5.0
CPU: 10-25%
RAM: 100-200 Mb
by roleg
Tue Mar 26, 2013 2:55 pm
Forum: Tricks 'n' Tips
Topic: HTTP(S) with WININET
Replies: 13
Views: 13872

Re: HTTP(S) with WININET

there is a some problem
randomly, after 4-7 hours of work in multithreaded mode
we get a memory error

Image

20 threads
safe threads: ON

tested:
XP, Core2Duo 3 Ghz, 2 Gb
XP, Core i7 3 Ghz, 4 Gb
by roleg
Wed Dec 05, 2012 5:54 pm
Forum: Coding Questions
Topic: Can not decipher BASE64(AES256()) data from web
Replies: 22
Views: 5316

Re: Can not decipher BASE64(AES256()) data from web

It should work with 256 (32byte key)

also with MCRYPT_RIJNDAEL_128

But than your key length decide if 128 or 256
read here:

http://www.chilkatsoft.com/p/php_aes.asp

Bernd
to Bernd

Thank you man!
You're the best!
I never would have found this without u :lol:
Thanks.

P.S. work perfect, but ...