each time your run the code you start a new process. this code get infos from the current process so you cannot keep data from the previous run which was from a another process.
from msdn :
When a process terminates, the system automatically closes handles and deletes objects created by the ...
Search found 272 matches
- Sun Jan 06, 2013 9:38 am
- Forum: General Discussion
- Topic: Is there anyway to recover the memory that requesters eat up
- Replies: 8
- Views: 2920
- Sat Jan 05, 2013 10:13 am
- Forum: General Discussion
- Topic: Is there anyway to recover the memory that requesters eat up
- Replies: 8
- Views: 2920
Re: Is there anyway to recover the memory that requesters ea
there is no memory leak. GetOpenFileName (winapi) load a lot a dlls and also create a fair amount a of threads and kernel objects which are not freed. most of them are needed for the thumbnails (ex: load the appropriate codecs for the videos.)
Import "Kernel32.lib"
GetProcessHandleCount(a.i, *b ...
Import "Kernel32.lib"
GetProcessHandleCount(a.i, *b ...
- Sun Sep 16, 2012 8:09 am
- Forum: Windows
- Topic: kernel32 usage question
- Replies: 3
- Views: 2510
Re: kernel32 usage question
first one is larger because OpenLibrary, CallFunction, ... are functions from a purebasic library wich must be included into the executable code. also note that kernel32.lib is not a static lib but a import lib. the dynamic linking informations are wrote into the import table of the executable by ...
- Sun Aug 26, 2012 8:00 am
- Forum: Off Topic
- Topic: windows 8 spy on you
- Replies: 5
- Views: 2607
Re: windows 8 spy on you
ultimate version here and honestly i was not aware about smartscreen.
Most modern antivirus tools and firewalls do this all the time.
true for the crappy cloud oriented ones otherwise a antivirus download a database on your system.
I still must say, I think Windows 8 is one of the best OSes I've ...
Most modern antivirus tools and firewalls do this all the time.
true for the crappy cloud oriented ones otherwise a antivirus download a database on your system.
I still must say, I think Windows 8 is one of the best OSes I've ...
- Sat Aug 25, 2012 7:08 pm
- Forum: Off Topic
- Topic: windows 8 spy on you
- Replies: 5
- Views: 2607
- Sat Aug 25, 2012 5:48 pm
- Forum: Feature Requests and Wishlists
- Topic: Grouping function for user32-handles
- Replies: 8
- Views: 2859
Re: Grouping function for user32-handles
simpler
Macro GetHandle(id)
PeekI(id)
EndMacro
Define testA.i = OpenWindow(#PB_Any, 10, 10, 100, 100, "hello")
Define testB.i = LoadFont(#PB_Any, "courrier", 10)
Define testC.i = ButtonGadget(#PB_Any, 10, 10, 200, 20, "Standard Button")
Debug Str(WindowID(testA))+" : "+Str(GetHandle(testA ...
Macro GetHandle(id)
PeekI(id)
EndMacro
Define testA.i = OpenWindow(#PB_Any, 10, 10, 100, 100, "hello")
Define testB.i = LoadFont(#PB_Any, "courrier", 10)
Define testC.i = ButtonGadget(#PB_Any, 10, 10, 200, 20, "Standard Button")
Debug Str(WindowID(testA))+" : "+Str(GetHandle(testA ...
- Sat Aug 25, 2012 2:07 pm
- Forum: Feature Requests and Wishlists
- Topic: Grouping function for user32-handles
- Replies: 8
- Views: 2859
Re: Grouping function for user32-handles
i don't recommend this but
Procedure.i GetHandle (id.i)
If (IsWindow(id))
ProcedureReturn WindowID(id)
ElseIf (IsFont(id))
ProcedureReturn FontID(id)
ElseIf (IsFile(id))
ProcedureReturn FileID(id)
ElseIf (IsThread(id))
ProcedureReturn ThreadID(id)
ElseIf (IsGadget(id))
ProcedureReturn ...
Procedure.i GetHandle (id.i)
If (IsWindow(id))
ProcedureReturn WindowID(id)
ElseIf (IsFont(id))
ProcedureReturn FontID(id)
ElseIf (IsFile(id))
ProcedureReturn FileID(id)
ElseIf (IsThread(id))
ProcedureReturn ThreadID(id)
ElseIf (IsGadget(id))
ProcedureReturn ...
- Sat Aug 25, 2012 1:35 pm
- Forum: Feature Requests and Wishlists
- Topic: Grouping function for user32-handles
- Replies: 8
- Views: 2859
Re: Grouping function for user32-handles
i don't recommend this but
Procedure.i GetHandle (id.i)
If (IsWindow(id))
ProcedureReturn WindowID(id)
ElseIf (IsFont(id))
ProcedureReturn FontID(id)
ElseIf (IsFile(id))
ProcedureReturn FileID(id)
ElseIf (IsThread(id))
ProcedureReturn ThreadID(id)
ElseIf (IsGadget(id))
ProcedureReturn ...
Procedure.i GetHandle (id.i)
If (IsWindow(id))
ProcedureReturn WindowID(id)
ElseIf (IsFont(id))
ProcedureReturn FontID(id)
ElseIf (IsFile(id))
ProcedureReturn FileID(id)
ElseIf (IsThread(id))
ProcedureReturn ThreadID(id)
ElseIf (IsGadget(id))
ProcedureReturn ...
- Mon Aug 20, 2012 10:59 am
- Forum: Feature Requests and Wishlists
- Topic: str/const request
- Replies: 0
- Views: 1279
str/const request
Open to add xlib stuff ? y: could u add these structs and constants please.
#VisualNoMask = $0
#VisualIDMask = $1
#VisualScreenMask = $2
#VisualDepthMask = $4
#VisualClassMask = $8
#VisualRedMaskMask = $10
#VisualGreenMaskMask = $20
#VisualBlueMaskMask = $40
#VisualColormapSizeMask = $80 ...
#VisualNoMask = $0
#VisualIDMask = $1
#VisualScreenMask = $2
#VisualDepthMask = $4
#VisualClassMask = $8
#VisualRedMaskMask = $10
#VisualGreenMaskMask = $20
#VisualBlueMaskMask = $40
#VisualColormapSizeMask = $80 ...
- Sun Aug 19, 2012 5:23 pm
- Forum: Tricks 'n' Tips
- Topic: Small cross-platform OpenGL demo
- Replies: 46
- Views: 37626
Re: Small cross-platform OpenGL demo
linux version has also a depth buffer by default
#GLX_DEPTH_SIZE = 12
ImportC "-lX11"
XGetVisualInfo.i(*display, vinfo_mask.i, *vinfo_template, *nitems_return)
XLoadQueryFont.i(*display, name.p-ascii)
EndImport
ImportC "-lGL"
glXGetCurrentDisplay.i()
glXGetConfig.i(*dpy, *vis, attrib.l ...
#GLX_DEPTH_SIZE = 12
ImportC "-lX11"
XGetVisualInfo.i(*display, vinfo_mask.i, *vinfo_template, *nitems_return)
XLoadQueryFont.i(*display, name.p-ascii)
EndImport
ImportC "-lGL"
glXGetCurrentDisplay.i()
glXGetConfig.i(*dpy, *vis, attrib.l ...
- Wed Aug 15, 2012 7:49 am
- Forum: Tricks 'n' Tips
- Topic: Small cross-platform OpenGL demo
- Replies: 46
- Views: 37626
Re: Small cross-platform OpenGL demo
the windows context has zbuffer by default now
InitSprite()
OpenWindow(0, 100, 100, 1280, 800, "gl" , #PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0), 0, 0, 1280, 800, 1, 0, 0, #PB_Screen_NoSynchronization)
Define pfd.PIXELFORMATDESCRIPTOR
Define hdc.i = wglGetCurrentDC_()
Define ...
InitSprite()
OpenWindow(0, 100, 100, 1280, 800, "gl" , #PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0), 0, 0, 1280, 800, 1, 0, 0, #PB_Screen_NoSynchronization)
Define pfd.PIXELFORMATDESCRIPTOR
Define hdc.i = wglGetCurrentDC_()
Define ...
- Tue Aug 14, 2012 5:33 pm
- Forum: General Discussion
- Topic: PureBasic or Q7Basic?
- Replies: 83
- Views: 24510
Re: PureBasic or Q7Basic?
So what engine do you use, as far as I can see from the 3d demos, it is very possible to program a full game, no probs, its just a matter of head down and arse up, you are just looking for a very easy and simple solution to create a full on 3d game, why do you think the top 3d game programmers are ...
- Mon Aug 13, 2012 9:47 pm
- Forum: Feature Requests and Wishlists
- Topic: strange code generation with float (x64)
- Replies: 0
- Views: 1213
strange code generation with float (x64)
hi
please take a look at the following generated code from pb x64
Declare.f retFloat (*this, valFloat.f)
Interface FloatTest
retFloat.f (valFloat.f)
EndInterface
DataSection
vmt:
Data.i @retFloat()
EndDataSection
Structure FLOATTEST_STR
*vmt
EndStructure
Procedure.i FloatTest ()
Define ...
please take a look at the following generated code from pb x64
Declare.f retFloat (*this, valFloat.f)
Interface FloatTest
retFloat.f (valFloat.f)
EndInterface
DataSection
vmt:
Data.i @retFloat()
EndDataSection
Structure FLOATTEST_STR
*vmt
EndStructure
Procedure.i FloatTest ()
Define ...
- Mon Aug 13, 2012 7:24 pm
- Forum: General Discussion
- Topic: PureBasic or Q7Basic?
- Replies: 83
- Views: 24510
Re: PureBasic or Q7Basic?
i am agree with auser. the 3d engine is barely usable do to a full game. for example there is a no way to render a HUD. ogre3d is fully made on a object model, there are classes everywhere for every single thing. Maintaining a C interface alone is reckless. another sad thing is referencing model ...
- Mon Aug 13, 2012 1:00 am
- Forum: Announcement
- Topic: PureBasic 4.70 beta 1 is ready !
- Replies: 39
- Views: 15428
Re: PureBasic 4.70 beta 1 is ready !
just to know, which flags was used ?- Updated: Use of VC++ 2010 instead of VC++ 2005 to compile the Windows libraries (32-bit and 64-bit), resulting of better optimized code