Friday, July 18, 2008

Darwin Race of Languages - Day 3 Part 2

Still no luck. All I can find are MSDN articles related to WMI on Microsoft's official languages, such as C++, C#, VB, etc. I can also find many examples of using WMI in Delphi, but there are no comprensive, newbie friendly tutorials on the different WMI components as related to Delphi and RAD Studio. I'm sure it's a simple fix to solve my problem, but those simple problems are the things that a newbie friendly tutorial will help walk me through.

When I was learning C#/.NET, I did most of my learning on MSDN. I've done multithreading, socket connections, registry modification, file encryption, used active directory, so on and so forth. I never once had to ask the wider .NET community for assistance, as MSDN has always been good to me. Ditto for learning Java, Sun's documentation is good as well (at least it was back when I was doing Java, the version 1 days).

uses
  Google, MSDN;

implementation
procedure Will_I_Win;
var
  Delphi: New_Language;
   RAD_Studio: New_IDE;
  WMI: New_Component;
   Success: string;
begin
   RAD_Studio := IDE.Create('CodeGear');
   Delphi  := RAD_Studio.Language;
   WMI := Component.Create('MS');
   success := 'You Fail';
   while OtherProjectsGoingOn do
   begin
     if Solveable(Delphi, RAD_Studio, WMI, "2 weeks") then
     begin
         success := 'yay!';
     end;
   end;
ShowMessage(success);
end;



2 comments:

  1. The problem is not Delphi. It looks you don't know enough about COM and WMI development, while trying to accomplish it in a language new to you. COM is not a friendly framework.

    Those are not Delphi topics, they are broader Windows programming topics - difficult to find a "newbie, friendly tutorial" for such topics.

    Often you'd need to get a C example, and translate it into the language of your choice - even using MSDN.

    ReplyDelete
  2. Heh, your comment is exactly what I was trying to allude to with my pseudocode =P. At this point, I feel comfortable with Delphi, and relatively comfortable with RAD Studio, but I have zero experience with WMI and COM.

    My whole point about newbie friendly tutorial, is that when I was learning C#/.NET, I could use MSDN, and find tutorials that were designed to teach me on my version of Visual Studio, in the current version of C#.

    When I was attempting to learn COM and WMI for Delphi, all I could find were C++ and VB tutorials, and Delphi code examples. I figured I'd attempt to pick apart the Delphi examples, and I have mostly worked out what the different objects do. But when I ran into issues, I have no idea if its because it's for an different version of COM or WMI, is there something in my project that I didn't setup properly, or what.

    Basically I ran into issues trying to reverse engineer other peoples code.

    ReplyDelete