March 18th, 2008
If you want to program with Microsoft’s Background Intelligent Transfer Service (BITS) then you will need the TLB or header files. These can be generated from the IDL files that come with the Windows XP SP2 Platform SDK, or any of the subsequent platform SDKs, the latest being Windows SDK for Windows Server 2008 and .NET Framework 3.5. You will need MIDL to generate the needed files. It is rather a pain to download that whole SDK and then generate the useful files.To make your life easier I have generated the useful files, and also ran them through Delphi RAD Studio 2007 for Win32 to create Object Pascal wrappers for your Delphi programming pleasure. Then I wrapped it all up in a zip for easy downloading. Much quicker to download.
As a note, you do not need to deploy any of these files, or the files in the SDK with your application. You just need to ensure that the Background Transfer Service is running on the target machine.
For more information, I have created a hub page on Advanced Downloads with Delphi that I will update with more information as I gather it.
Enjoy!
[Download C, TBL, H, PAS archive]
Technorati Tags: BITS, Downloads, Service, SDK, Library, Delphi programming
Tags: , BITS, Delphi programming, Downloads, library, SDK, Service
Posted in CodeGear, Delphi, Microsoft, code, library | 1 Comment »
February 25th, 2008
Back in November I hosted the Delphi Robot Rage competition as part of CodeRage. At the time I was unable to contact the author of D-Robots (the program we used). I am not sure if that was a result of outdated contact information or just poor luck (i.e. spam blockers). Well, I received an email from Marcus Oblak AKA “mrqzzz mrqzzz” and the author of D-Robots. Turns out I misspelled his name, for which I apologize. Hopefully we can work something out to get a slight update to D-Robots and use it for another Delphi Robot Rage. I’ll keep you posted.
Tags: AI, Competition, Delphi, Robots
Posted in CodeRage, Delphi | 3 Comments »
January 26th, 2008
I’ve compiled all my Advanced Downloads links into a single page to make it easy to find for anyone who was in the Seattle Code Camp session on Advanced Downloads.
Tags: CodeCamp Demo Libraries FTP HTTP BITS Downloads Delphi
Posted in Delphi, Seattle, code, free stuff, tools | 1 Comment »
December 27th, 2007
Want to know how much memory your program is using? This Delphi function will do the trick.
uses psAPI;
{...}
function CurrentProcessMemory: Cardinal;
var
MemCounters: TProcessMemoryCounters;
begin
MemCounters.cb := SizeOf(MemCounters);
if GetProcessMemoryInfo(GetCurrentProcess,
@MemCounters,
SizeOf(MemCounters)) then
Result := MemCounters.WorkingSetSize
else
RaiseLastOSError;
end;
Update: Thanks to Andreas for a heap free (no GetMem / FreeMem) method of doing this (via his comment!)
Not sure where I got the basics of this, but I added some better error handling to it and made it a function. WorkingSetSize is the amount of memory currently used. You can use similar code to get other values for the current process (or any process). You will need to include psAPI in your uses statement.
The PROCESS_MEMORY_COUNTERS record includes:
- PageFaultCount
- PeakWorkingSetSize
- WorkingSetSize
- QuotaPeakPagedPoolUsage
- QuotaPagedPoolUsage
- QuotaPeakNonPagedPoolUsage
- QuotaNonPagedPoolUsage
- PagefileUsage
- PeakPagefileUsage
You can find all of these values in Task Manager or Process Explorer.
Maybe this would be a good task for one of Delphi’s new records that include methods. . . .
It would appear
Posted in Delphi, code | 1 Comment »
December 9th, 2007
The official standing of the bots was given during the live broadcast of the final session. Although if you run the bots in a new battle, chances are a different bot may win. There certainly is a bit of luck involved. Never the less, these are the official results.
- 1st Place – Brian Thoman and Codralis of WideOrbit Inc. in Lynnwood, WA
- 2nd Place – Michael Madsen and Kisai of Logos Consult in Denmark
- 3rd Place – Ken Adam and Akadamia of Akadamia Ltd in Midlothian, UK
Thanks to everyone who entered a bot! I’ll be arranging the prizes with you all shortly. Thanks to all of the prize contributors too. A special thanks to everyone at CodeGear who made CodeRage possible!
Bot profiles and other details will continue to be posted.
At this point I am not posting the last battle recording. The quality was terrible, and most everyone can run their own battle with the bots and D-Robots (possibly reaching a different outcome though. . . )
Tags: bot, contest, prizes, robot
Posted in CodeRage, Delphi, news | No Comments »
December 7th, 2007
Thanks to Anders for letting me know the Commodore 64 turned 25!
I was a big fan of the C64, but I didn’t know you could get Pascal for it. My programming was limited to Commodore Basic, but that was when I cut my teeth on programming and knew what I wanted to do when I grew up.
I didn’t know Anders was using WordPress either until I read that post.
Tags: basic, c64, commodore, pascal, programming
Posted in news | No Comments »
December 7th, 2007
My thanks to Andreano Lanusse, the Product Line Manager for Latin America at CodeGear, who just posted a list of 3rd Party Components for Delphi 2007. This is a great resource. Andreano is open to suggestions and feedback on his list too and has provided his email address for everyone.
This has long been one of the strengths of Delphi – the strong collection of 3rd party components. 3rd party component development was of course fostered by the fact that Delphi came with full source for the VCL and RTL. A move the Microsoft if finally duplicating in releasing the source for the .NET framework. Although unlike Delphi, Microsoft will not allow you to modify and recompile the framework in your applications. With Delphi you can tweak the VCL and recompile it (not a trivial task, but allowable and possible) for your applications. Granted doing so makes moving to new versions of Delphi a little more tricky, and you cannot redistribute the modified source.
BTW, notice the link to my TurboPower page on line 27.
Tags: CodeGear, components, Delphi, source, turbopower
Posted in CodeGear, Delphi, code | No Comments »
December 3rd, 2007
This is cool. I figured out a way to assign the same class helper to multiple classes in Delphi 2007. Marco Cantu asked me if I knew how to do this during CodeRage II, and then David I. mentioned that Class Helpers should be used to implement Aspect Orientated Programming (AOP), but since they don’t support assigning the same class helpers to multiple classes that wouldn’t work.
I’ll write this up later. It isn’t a best case scenario, and requires a few extra lines of code, but it accomplishes what I set out to do, and that is pretty dang cool! Hopefully later CodeGear will extend class helpers and make this and other cool stuff easier. . .
Tags: AOP, Aspect Orientated Programming, class helper, Delphi
Posted in CodeGear, Delphi | 4 Comments »
December 3rd, 2007
Check out Alister Christie’s latest movie on CodeGearGuru.com. He covers the elusive Exceptions in Constructors and Destructors. Thanks Alister. That was one of the questions from my Exceptional Exceptions session that I needed to follow up on.
Tags: , Delphi, exceptions, training
Posted in CodeGear, CodeRage, Delphi | 2 Comments »
November 30th, 2007
Wow, what a week. CodeRage II went great. A lot of good content and I enjoyed presenting my sessions. You can get the code, links, etc. from them here:
They all went really well I thought. Unfortunately I pushed the deadline back too far on Delphi Robot Rage and my JIT Presentation didn’t happen on time. Sorry to everyone about that.
Check back often for updates (seriously), or let me know if I missed something you are looking for from my sessions.
Thanks!
Posted in CodeGear, CodeRage, Delphi, code, free stuff | 1 Comment »