Search found 85 matches

by Etayson
Wed Apr 24, 2024 6:55 pm
Forum: Coding Questions
Topic: Screen capture issue
Replies: 8
Views: 163

Re: Screen capture issue

Windows 7 x64 The Task Manager shows me that the number of GDI objects is constantly increasing. I think only 10,000 are allowed, but I'm not sure. With my slow PC it takes a long time to count up, I've only cracked the 3,000 mark. Edit: Here there was the first error with 9.999 GDI objects. Peter ...
by Etayson
Wed Apr 24, 2024 6:07 pm
Forum: Coding Questions
Topic: Screen capture issue
Replies: 8
Views: 163

Re: Screen capture issue

PeDe wrote: Wed Apr 24, 2024 5:54 pm Perhaps the error is in 'BMPHandle.l''? Integer would be correct.
Peter
Yeah, it was originally BMPHandle.i then I saw somewhere that use BMPHandle.l. Anyway result is the same.
by Etayson
Wed Apr 24, 2024 5:40 pm
Forum: Coding Questions
Topic: Screen capture issue
Replies: 8
Views: 163

Re: Screen capture issue

Try with this at the top of your code: #CAPTUREBLT = $40000000 And then apply the flag to your BitBllt command: bitBlt = BitBlt_(trgDC, 0, 0, ScreenWidth, ScreenHeight, srcDC, 0, 0, #SRCCOPY|#CAPTUREBLT) If you don't use the CAPTUREBLT flag layered windows won't get included. I tried this and tried...
by Etayson
Wed Apr 24, 2024 5:38 pm
Forum: Coding Questions
Topic: Screen capture issue
Replies: 8
Views: 163

Re: Screen capture issue

Hi, I have no problems here (Windows 10 x64, PB 6.11 Beta 1 x64 ASM). What is "over time"? Some seconds, minutes, hours?? A thing to mention: The whole ScreenWidth/ScreenHeight-thing, do you expect the screen to change resolution? If not, I wouldn't put this inside the loop. I just took o...
by Etayson
Wed Apr 24, 2024 4:15 pm
Forum: Coding Questions
Topic: Screen capture issue
Replies: 8
Views: 163

Screen capture issue

Here is a small piece of code that captures the screen. Over time (It’s always different) the capture stops working(BitBlt_ doesn`t capture new image) or breaks with an error => ImageOutput(0) is NULL (0 value) What is the problem can be? [Windows 10, Unicode mode, threadSafe, PB 5.31 x64] Procedure...
by Etayson
Mon Jul 06, 2020 1:55 pm
Forum: Coding Questions
Topic: Passing buffers & pointers between procedures
Replies: 4
Views: 931

Re: Passing buffers & pointers between procedures

Never mind that I don't know what the hell I am doing.....In the below procedure, I am doing a few things I need to do and filling the contents of *FileBuffer with the data from a photo off disk. I want this *FileBuffer to be available to my general save routine that saves more than just this buffe...
by Etayson
Sat Jul 04, 2020 7:58 am
Forum: Coding Questions
Topic: Pointer to map element????
Replies: 22
Views: 2669

Re: Pointer to map element????

I like the pointer list idea, only added a 'stack'. -snip- [/code] it is exacly what i need :D I only add function Procedure.i ReturnElement(id) With range_mapper ForEach *range_task() If *range_task()\id = id \ptr(\count+1) = *range_task() DeleteElement(*range_task(),1) \count + 1 EndIf Next EndWi...
by Etayson
Fri Jul 03, 2020 8:53 pm
Forum: Coding Questions
Topic: Pointer to map element????
Replies: 22
Views: 2669

Re: Pointer to map element????

I grew up in the era of sinclair zx spectrum where every byte and every tick of the processor mattered. That's why I want the programs to be as fast as possible. :) I couldn't afford it. It was only enough for a sinclair ZX81 with 1kB memory. It's still lying around somewhere. I was have all serise...
by Etayson
Fri Jul 03, 2020 8:11 pm
Forum: Coding Questions
Topic: Pointer to map element????
Replies: 22
Views: 2669

Re: Pointer to map element????

Maybe it would be better to use something like a tree instead of a map or a list. Or a sqlite memory database. If you want to stick with your map, you could speed up the code from your first post by using some assembly. I don't know how important it is that things are really random. If you have 1 m...
by Etayson
Fri Jul 03, 2020 8:02 pm
Forum: Coding Questions
Topic: Pointer to map element????
Replies: 22
Views: 2669

Re: Pointer to map element????

I have a small question. Is the map growing during the processing of differdnt sub-ranges or only shrinking? map is not growing on the contrary, map decreases with each completed job. once subrange scanned by client server remove map element from map and select new random number in range 0:mapsize(...
by Etayson
Fri Jul 03, 2020 7:14 pm
Forum: Coding Questions
Topic: Pointer to map element????
Replies: 22
Views: 2669

Re: Pointer to map element????

Hum... You do not need a map for these tasks. A map will be useful for the last 10% staying to be treated. guys I am realy grateful to you for the solutions! let me try again first to explain the gist. We have a huge range. 1 client cannot solve such a range in a short time. Therefore, we divide th...
by Etayson
Fri Jul 03, 2020 5:28 pm
Forum: Coding Questions
Topic: Pointer to map element????
Replies: 22
Views: 2669

Re: Pointer to map element????

I mean what kind of key to get the the map element. Like range("key") In this case "key" is the key. Are you using one of your hash values as a key ? key is just integer. 0,1,2,3.. and so on For ex at the beggining map has key 0,1,2,3,4,5,6,7,8,9 random number for ex 6, Server g...
by Etayson
Fri Jul 03, 2020 5:20 pm
Forum: Coding Questions
Topic: Pointer to map element????
Replies: 22
Views: 2669

Re: Pointer to map element????

@Etayson, what kind of map keys are you using ? Hi, Willbert. Structure RangeStructure rb$ re$ isScan.b isBuzzy.b EndStructure Define NewMap range.RangeStructure(4096) The point of this map is give to clients random selected subranges (rb$,re$) When client scan this subranges he send to server answ...
by Etayson
Fri Jul 03, 2020 4:57 pm
Forum: Coding Questions
Topic: Pointer to map element????
Replies: 22
Views: 2669

Re: Pointer to map element????

Hello, -snip- Hello, Olli. Due to map element deleted from map when i use algorithm above i need reindex array again after deleting element. Deleting elements need to select element only from elements that is not using yet. So i can`t keep already used element in map. When you have map 1000 0000 el...
by Etayson
Fri Jul 03, 2020 4:40 pm
Forum: Coding Questions
Topic: Pointer to map element????
Replies: 22
Views: 2669

Re: Pointer to map element????

Example with Index -snip- [/code] Many thanks, but there is one thing about which I forgot to write: In general, all this is necessary to randomly select ranges .. as soon as a range is selected, this element is removed from the map. And again, a random element selected from the map and so on.. In ...