Search found 894 matches

by RichAlgeni
Tue Jan 21, 2025 10:37 pm
Forum: Tricks 'n' Tips
Topic: Module NetworkTCP - Send and Receive Data over 64kB
Replies: 34
Views: 17336

Re: Module NetworkTCP - Send and Receive Data over 64kB


Your code ...
[08:55:39] [COMPILER] Line 12: Syntax error.

You're right! I apologize. My brain has been in a fog for the last year or so. This should be better: ; ------------------------------------------------------------
; Program name: network_procs.pbi
; Written by: Rich Algeni, Jr.
; Date ...
by RichAlgeni
Tue Jan 21, 2025 1:34 am
Forum: Tricks 'n' Tips
Topic: Module NetworkTCP - Send and Receive Data over 64kB
Replies: 34
Views: 17336

Re: Module NetworkTCP - Send and Receive Data over 64kB


Seems to be an old code for old PB version.
Networking really hasn't changed in the 30 years I've been writing network programs.

In addition, this does not belong to this contribution NetworkTCP

Of course it does. Under the NetworkWrite() procedure, you can send an amount of data equivalent ...
by RichAlgeni
Tue Jan 21, 2025 1:18 am
Forum: Tricks 'n' Tips
Topic: Module NetworkTCP - Send and Receive Data over 64kB
Replies: 34
Views: 17336

Re: Module NetworkTCP - Send and Receive Data over 64kB

skinkairewalker wrote: Mon Jan 20, 2025 8:35 pm how can i use this?
I detected several syntax errors
This is a procedure to help TEACH you how to use networking in PureBasic. Child procedures often use variables defined in calling procedures. If you have specific questions, I will be glad to help you.
by RichAlgeni
Sat Jan 18, 2025 9:33 pm
Forum: Tricks 'n' Tips
Topic: Module NetworkTCP - Send and Receive Data over 64kB
Replies: 34
Views: 17336

Re: Module NetworkTCP - Send and Receive Data over 64kB

Take a look at my network procedure, Let me know if you have any questions. ; Program name: network_procs.pbi
; Written by: Rich Algeni, Jr.
; Date written: 02/17/2011
;
; Purpose: to include network procedures into PB programs
; ------------------------------------------------------------

Global ...
by RichAlgeni
Sat Jan 18, 2025 9:31 pm
Forum: Tricks 'n' Tips
Topic: Module NetworkTCP - Send and Receive Data over 64kB
Replies: 34
Views: 17336

Re: Module NetworkTCP - Send and Receive Data over 64kB

The only way to get the receive process to know how many bytes are sent, is to send the number of bytes you will send at the beginning of the data. You can do this by sending a fixed number of bytes, for instance 6 (which can give you up to 999,999 ascii bytes in length), or use a character ...
by RichAlgeni
Sun Sep 15, 2024 9:04 pm
Forum: Coding Questions
Topic: CreatePack issue
Replies: 2
Views: 601

Re: CreatePack issue

RichAlgeni wrote: Sat Sep 14, 2024 6:57 pm Has anyone run into a CreatePack issue, where the packed file ends up corrupt?
One big piece of information I just found, this is running on a bitlocked machine.
by RichAlgeni
Sat Sep 14, 2024 6:57 pm
Forum: Coding Questions
Topic: CreatePack issue
Replies: 2
Views: 601

CreatePack issue

Has anyone run into a CreatePack issue, where the packed file ends up corrupt?

I am using the following process to pack a 100 MB QuickBooks file, and rename it to a NAS.

packNumber = CreatePack(#PB_Any, "..\qb_backups\keeneStore.7z", #PB_PackerPlugin_Lzma, 7)
If packNumber
result = AddPackFile ...
by RichAlgeni
Mon Jul 22, 2024 7:36 pm
Forum: Tricks 'n' Tips
Topic: GetIdleTime()
Replies: 5
Views: 1842

Re: GetIdleTime()

If only this could work for QuickBooks!!! When people don't logout, we can't do backups.
by RichAlgeni
Tue Jul 16, 2024 12:37 am
Forum: Off Topic
Topic: Please don't smoke!
Replies: 24
Views: 9352

Re: Please don't smoke!

No need to worry, I'm fine. I thought it was important to share a personal anecdote about why I feel the way I do. I must admit, I do find myself losing concentration on things. Probably just old age!
by RichAlgeni
Mon Jul 15, 2024 7:25 pm
Forum: Off Topic
Topic: Please don't smoke!
Replies: 24
Views: 9352

Please don't smoke!

I lost my wife, and our daughters lost their mom on New Years Day last year. Cigarettes had a hold on her that we couldn't break. No one, including Jennifer, knew she had lung cancer. We thought she had pneumonia. Even her Primary Care Physician was shocked. It progressed to stage 4, and ...
by RichAlgeni
Sun Jul 14, 2024 8:55 pm
Forum: Coding Questions
Topic: Uncompress a zipped blob from a website returns -1
Replies: 8
Views: 1315

Re: Uncompress a zipped blob from a website returns -1

CatchPack() works perfectly!!! Forgive me! My mind has been mush since I lost my wife.
by RichAlgeni
Sun Jul 14, 2024 8:43 pm
Forum: Coding Questions
Topic: Uncompress a zipped blob from a website returns -1
Replies: 8
Views: 1315

Re: Uncompress a zipped blob from a website returns -1

Ok, so I'm an idiot! Fred, Freak and the team have already given us CatchPack()!

In the immortal words of Roseanne Roseannadanna..., nevermind!!!
by RichAlgeni
Sun Jul 14, 2024 8:38 pm
Forum: Coding Questions
Topic: Uncompress a zipped blob from a website returns -1
Replies: 8
Views: 1315

Re: Uncompress a zipped blob from a website returns -1

I believe that I am trying to use a function, UncompressMemory() , in a way which it was not designed: to unpack a packed file with directories and files. I'd rather have not had to write the packed file to disk, then read it again as a packed file, but I believe that is what is required. Maybe in ...
by RichAlgeni
Sun Jul 14, 2024 7:22 pm
Forum: Coding Questions
Topic: Uncompress a zipped blob from a website returns -1
Replies: 8
Views: 1315

Re: Uncompress a zipped blob from a website returns -1

Ok, so I took an old text file, and zipped it up using 7z and online winzip. The files both sowed they were valid zip files, but both could not be uncompressed. Is there consensus that this is a bug? Or am I doing something wrong?
EnableExplicit

UseZipPacker()
UseSHA2Fingerprint()

#ProgramName ...
by RichAlgeni
Sun Jul 14, 2024 1:50 am
Forum: Coding Questions
Topic: Uncompress a zipped blob from a website returns -1
Replies: 8
Views: 1315

Re: Uncompress a zipped blob from a website returns -1

Here are the variable assignments. I always use EnableExplicit: Define sha256Hash.s
Define readLength.i = $FFFF
Define outputSize.i = $7FFFF
Define *receiveBuffer = AllocateMemory(readLength + 1)
Define responseText.s = Space(readLength + 1)
Define *outputMemory = AllocateMemory(outputSize)
I didn ...