Search found 102 matches

by Blankname
Sun Jul 14, 2013 11:51 pm
Forum: Coding Questions
Topic: Enumerating All Modules For A Process
Replies: 2
Views: 2359

Re: Enumerating All Modules For A Process

Try this:

NB*: I noticed I was getting Error: 299 on some processes - then I read...

EnumProcessModules:
If this function is called from a 32-bit application running on WOW64, it can only enumerate the modules of a 32-bit process.
If the process is a 64-bit process, this function fails And the ...
by Blankname
Sun Jul 14, 2013 9:32 pm
Forum: Coding Questions
Topic: Enumerating All Modules For A Process
Replies: 2
Views: 2359

Enumerating All Modules For A Process

I am trying to replicate this, and have it safe to call with the number of modules changing.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682621(v=vs.85).aspx

Here is the code I am using, I am unsure if I am replicating this properly. It returns just the process file name, which is ...
by Blankname
Sun Jul 14, 2013 4:46 am
Forum: Coding Questions
Topic: Alternative for ODBC
Replies: 12
Views: 1965

Re: Alternative for ODBC

Something Fred should really push for is a license to implement native MySQL support. It's the most used database engine and we can't even utilize it without having to setup ODBC (not a very good option) or writing a wrapper for it. :cry:
by Blankname
Sat Jul 13, 2013 9:45 am
Forum: Feature Requests and Wishlists
Topic: Add API Functions
Replies: 7
Views: 1076

Re: Add API Functions

Minimum supported client: Windows XP [desktop apps only]
Since PureBasic supports all the way back to Win 95, these won't be added.
Fred has stated in the past that only APIs made for all Windows get included.

That said, you CAN always call them manually yourself, assuming the relevant
DLLs (or ...
by Blankname
Sat Jul 13, 2013 2:15 am
Forum: Feature Requests and Wishlists
Topic: Add API Functions
Replies: 7
Views: 1076

Add API Functions

I am in need of these API functions support in PB.

Code: Select all

http://msdn.microsoft.com/en-us/library/windows/desktop/ms684894(v=vs.85).aspx
Can they be added in 5.20? Thanks
by Blankname
Thu Jun 27, 2013 8:44 am
Forum: Off Topic
Topic: project autoload
Replies: 6
Views: 2514

Re: project autoload

Preferences -> General -> Auto re-load last open sources.

Un-tick that and apply and ok.
by Blankname
Fri Jun 21, 2013 7:13 am
Forum: Announcement
Topic: PureBasic 5.20 beta 20 is out
Replies: 360
Views: 140838

Re: PureBasic 5.20 beta 1 is ready to test !

Thanks Fred & Team, much appreciated.

I went to http://zlib.net/ to see what the enhancements were in version 1.2.7, and was met with this:

Version 1.2.8 fixes a very rare bug in decompression. All users are encouraged to upgrade immediately.

Figures!!! Not sure if this has any bearing on PB ...
by Blankname
Wed Jun 12, 2013 5:22 am
Forum: Coding Questions
Topic: Thread state
Replies: 13
Views: 3003

Re: Thread state

This works for me, ResumeThread doesn't return true until the specified thread is paused (suspended). So I don't have to suspend the thread at all, this is a much more efficient way to check if a thread is suspended (plus it just resumes it if it was).

Global Thread1, Thread2

Procedure MainThread ...
by Blankname
Tue Jun 11, 2013 8:25 am
Forum: Coding Questions
Topic: Thread state
Replies: 13
Views: 3003

Re: Thread state

I use event handles to accomplish what you want. First create the events, I store them in dimensioned arrays:
For threadNumber=0 To numberThreads
thisEvent(threadNumber) = CreateEvent_(0, 0, 0, #ProgramName + "_Event_" + Str(threadNumber))
Next
Then I create threads for each event:
For ...
by Blankname
Tue Jun 11, 2013 3:05 am
Forum: Coding Questions
Topic: StringGadget Center Text
Replies: 3
Views: 1099

Re: StringGadget Center Text

Windows snippet only I think...

Define.i gf
gf = gf|#PB_Text_Center ; text is centered in the gadget.
;gf = gf|#PB_Text_Right ; text is right aligned.
;gf = gf|0 ; text is left aligned by default.
mystringgadget_n = StringGadget(#PB_Any, x, y, Wd, Ht, Txt$, gf|#ES_NOHIDESEL)

It's a no go, #PB ...
by Blankname
Mon Jun 10, 2013 11:23 pm
Forum: Coding Questions
Topic: StringGadget Center Text
Replies: 3
Views: 1099

StringGadget Center Text

How would I go about center aligning the text inside of a StringGadget.

Image
by Blankname
Mon Jun 10, 2013 10:41 am
Forum: Coding Questions
Topic: Thread state
Replies: 13
Views: 3003

Re: Thread state

I'm spawning a couple of "checker threads" that's sole purpose is to make sure the main thread hasn't ended or been suspended.

Is "the main thread" the executable program being run, and it creates the "checker threads"?
If so, if the exe (and thus, 'the main thread') ends/exits/errors out/crashes ...
by Blankname
Sun Jun 09, 2013 8:36 pm
Forum: The PureBasic Form Designer
Topic: [Done] Few Bugs
Replies: 5
Views: 3319

Re: [PB 5.11] Few Bugs

I can confirm this is due to the form designer using a different font size than the standard font that ships with windows.
by Blankname
Sun Jun 09, 2013 3:39 am
Forum: Coding Questions
Topic: system uptime?
Replies: 5
Views: 952

Re: system uptime?

The elapsed time is stored as a DWORD value. Therefore, the time will wrap around to zero if the system is run continuously for 49.7 days. To avoid this problem, use the GetTickCount64 function. Otherwise, check for an overflow condition when comparing times.
If you need a higher resolution timer ...
by Blankname
Sat Jun 08, 2013 10:18 am
Forum: Coding Questions
Topic: packer problem
Replies: 6
Views: 1739

Re: packer problem

UseZipPacker()

If CreatePack(0, GetHomeDirectory() + "test.zip")
For i = 1 To 100
AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/Geebee2.bmp", "Dir"+Str(i)+"\Geebee"+Str(i)+".bmp")
AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/world.png", "Dir"+Str(i)+"\world"+Str(i ...