Jump to content
Tuts 4 You

PureBasic Adventures...

Sign in to follow this  
  • entries
    7
  • comments
    10
  • views
    32,359

About this blog

 

 

 

Entries in this blog

 

ExtractIconEx Revisited...

With the excitement of Windows 10 and a host of bug fixes out of the way I can now concentrate some time on Tuts 4 You which also allows me to post some code on this blog. This blog entry is in regard to a recent query from LCF on viewing icons contained within DLL's, executables, icon files, etc. I coded a small tool for this a while ago that enabled me to quickly view icons contained primarily within shell32.dll and imageres.dll so that I could take advantage of those icons in other cod

Teddy Rogers

Teddy Rogers

 

System Up-Time Since BootTime...

Last week I read a blog entry by Raymond Chan regarding the way Task Manager computes the systems up-time and it reminded me of a bug I noticed in AID64's implementation. On Sunday I had a bit of free time before the Manchester United vs Arsenal game kicked off and decided to see what I could come up with.   There are a dozen different methods for calculating up-time, some methods are better and some of these do factor in leap years. Raymo

Teddy Rogers

Teddy Rogers

 

Calendar Date Format...

A query was raised last week about how to determine the calendar date format for different regions; year/month/day, day/month/year, etc. After a bit of fruitless pondering whether this could be achieved via API I decided to see if it could be done via the registry. Multiple editions of Windows support the International registry subkey and from there we can use either sShortDate or sLongDate to help us reach our goal. The operating system kindly finds and formats the calendar date in the c

Teddy Rogers

Teddy Rogers

 

DebugBlocker()

Here is a simple example in PureBasic code for using a self-debugger, commonly referred to as Debug Blocker. Compile (or run one of the attached executables in the archive) and click on the "CLICK ME!" button to create a duplicate process being self-debugged. Any queries about the code please comment below...   ; ------------------------------------------------------------------ ; ; PureBasic DebugBlocker() function, creates a co

Teddy Rogers

Teddy Rogers

 

PW_RENDERFULLCONTENT

Apparently... Windows 8.1 came with a new flag for PrintWindow called, PW_RENDERFULLCONTENT. This allows PrintWindow to properly capture window content that is displaying DirectX through DWM.   Below are some screenshots taken of Unreal Tournament. The first is how PrintWindow normally captures a window with DirectX content being rendered inside it, notice the window border is missing and there is corrupted graphics on the right. The secon

Teddy Rogers

Teddy Rogers

 

IsUserAnAdministrator()

I needed some code in PureBasic to check if the logged in user and/or running process is a member of the Administrator group. There is IsUserAnAdmin function, it works and is easy to include in your code...   If IsUserAnAdmin_() Debug "Running as an Adminstrator" Else Debug "Running as a Limited User" EndIf   Unfortunately as Microsoft states on MSDN it's a wrapper on a shor

Teddy Rogers

Teddy Rogers

 

PureBasic Adventures...

Last year a friend of mine was talking about PureBasic and how easy and good it was for coding and how much he liked working with it. I didn't really take much notice of it - it was just another Basic language, right?! Earlier this year he started showing off some of his remade old school crack intro's and demos from way back in the early 80's and 90's from the Amiga scene including some general effects so I decided to download a copy of PureBasic and tried out some of the features of the

Teddy Rogers

Teddy Rogers

Sign in to follow this  
×
×
  • Create New...