Search found 1834 matches

by Dude
Sat Aug 31, 2019 6:37 am
Forum: Windows
Topic: Default shortcut name pattern
Replies: 7
Views: 2345

Default shortcut name pattern

When you right-click a file in Windows and select "Create shortcut", it defaults to a specific name pattern depending on the OS and language used. Here's an image of "iexplore.exe" with two shortcuts created; one from English Windows, and one from Vietnamese Windows: https://i.im...
by Dude
Tue Jul 16, 2019 10:04 pm
Forum: Feature Requests and Wishlists
Topic: CreateThread: parameter check
Replies: 10
Views: 2310

Re: CreateThread: parameter check

you have untested branches in your code, which is bad Originally it wasn't untested, because my procedure wasn't a thread (it was triggered by a button, as shown in my other example that I linked to). But then I made it a thread for a specific reason but simply forgot that the procedure now needed ...
by Dude
Tue Jul 16, 2019 1:09 pm
Forum: Feature Requests and Wishlists
Topic: CreateThread: parameter check
Replies: 10
Views: 2310

Re: CreateThread: parameter check

PB reported an error. Yes, in such a small non-real-world example. But what about when you compile your exe and don't create the thread until later, like here: https://www.purebasic.fr/english/viewtopic.php?f=13&t=73189 Then the error isn't apparent until the user clicks the button, and thus ru...
by Dude
Tue Jul 16, 2019 9:46 am
Forum: Feature Requests and Wishlists
Topic: CreateThread: parameter check
Replies: 10
Views: 2310

Re: CreateThread: parameter check

What Demivec wanted to say was that you can only need to give CreateThread() a pointer to a procedure and then the compiler does not know which procedure you're actually calling Oh, I didn't realize that. Now I see. But still, my request stands for when a procedure name is directly mentioned in Cre...
by Dude
Tue Jul 16, 2019 9:16 am
Forum: Feature Requests and Wishlists
Topic: CreateThread: parameter check
Replies: 10
Views: 2310

Re: CreateThread: parameter check

I may use this instead 'CreateThread(*procedure(x), *value)' and the feature you requested still wouldn't help. Hi Demivec, I think you misunderstood what I mean. When creating a thread, the procedure being called must be defined to accept one parameter. An example direct from the manual: Procedure...
by Dude
Mon Jul 15, 2019 9:52 pm
Forum: Feature Requests and Wishlists
Topic: CreateThread: parameter check
Replies: 10
Views: 2310

CreateThread: parameter check

Hi Fred, since PureBasic knows each procedure definition while compiling, I would request that when CreateThread() is called for a procedure, that if the procedure has NO parameter then an error be raised. Based on this post: https://www.purebasic.fr/english/viewtopic.php?f=13&t=73189 I literall...
by Dude
Sun Jul 14, 2019 1:56 pm
Forum: General Discussion
Topic: Can the OnError lib report procedures?
Replies: 8
Views: 1951

Re: Can the OnError lib report procedures?

Found the cause of the crashing: viewtopic.php?f=13&t=73189 :oops:

At least I learned how the Purifier works, and the OnError lib. So not a total loss of my time. :)
by Dude
Sun Jul 14, 2019 1:52 pm
Forum: Coding Questions
Topic: CreateThread: procedure parameter needed?
Replies: 2
Views: 1039

Re: CreateThread: procedure parameter needed?

NicTheQuick wrote:If the parameter is missing stack corruption will occur.
Excellent news! Now I know why my exe was crashing: I forgot to add a dummy parameter when I changed a procedure from being run from a button, to being run as a thread. Thanks for confirming! :D
by Dude
Sun Jul 14, 2019 1:32 pm
Forum: Coding Questions
Topic: CreateThread: procedure parameter needed?
Replies: 2
Views: 1039

CreateThread: procedure parameter needed?

When creating a thread by calling a procedure, is it mandatory for the procedure name to have a dummy parameter? I just realised my app did NOT have a parameter for a created thread, and so maybe it's why my app is crashing when built as an exe? But when I tried to crash this test app by NOT having ...
by Dude
Sun Jul 14, 2019 1:43 am
Forum: General Discussion
Topic: Can the OnError lib report procedures?
Replies: 8
Views: 1951

Re: Can the OnError lib report procedures?

Have you already read Fred's blog posting about the purifier? No, because I didn't know about it. Thanks for linking it. However, that blog is still pretty vague, too. From what I read in it, I assume the debugger will stop my app when an overflow is found? The blog doesn't specifically say. I'm si...
by Dude
Sat Jul 13, 2019 5:40 am
Forum: General Discussion
Topic: Can the OnError lib report procedures?
Replies: 8
Views: 1951

Re: Can the OnError lib report procedures?

However, privacy concerns were raised about the OnError library That's no concern to me because I just strip out the path like so: SourceFile$=GetFilePart(ErrorFile()) Anyway, next question: I've added "PurifierGranularity(1,1,1,1)" to my source at the recommendation of another post, but ...
by Dude
Thu Jul 11, 2019 8:52 am
Forum: General Discussion
Topic: Can the OnError lib report procedures?
Replies: 8
Views: 1951

Can the OnError lib report procedures?

I've been using the OnError lib (with line numbering enabled) to try to track down an illegal memory access error, but the reported lines seem to have nothing to do with the crashing. For example, it would say that a line that calls a procedure was the cause, or a simple "a+1" was the caus...
by Dude
Thu Apr 18, 2019 8:41 am
Forum: Windows
Topic: Problem with SetProp/GetProp
Replies: 10
Views: 2315

Re: Problem with SetProp/GetProp

RASHAD wrote:Hi Dude
Check and report
That works fantastic! I knew you could do it. :D Thank you so much, Rashad.
by Dude
Wed Apr 17, 2019 9:57 pm
Forum: Windows
Topic: Problem with SetProp/GetProp
Replies: 10
Views: 2315

Re: Problem with SetProp/GetProp

Each program has its own storage area. When you quit the program, it will be released again. I know that. But window props are supposed to be the official Microsoft solution for that, so that when my app restarts, it can get the window data again, without having to resort to files. Rashad's solutio...
by Dude
Wed Apr 17, 2019 9:54 am
Forum: Windows
Topic: Problem with SetProp/GetProp
Replies: 10
Views: 2315

Re: Problem with SetProp/GetProp

RASHAD wrote:# 2:
Accepts only 2 characters
Thanks... almost there, but is there a way to get at least 255 characters? I need to store long text in the prop, too.