Friday, July 18, 2008

Darwin Race of Languages - Day 3 Part 1

I've been reading through tons of examples of using WMI with Delphi, and I've tried running what seems like the most likely candidate for what I want to do (return the CPU temperature). However, I keep getting the error below.


It seems like I am unable to use Sinkclass.DefaultInterface when I call Services.ExecNotificationQueryAsync. Since the "Sink" is supposed to be an eventhandler that fires upon receipt of an event from Services, I guess this is a good error, since I don't have any code defined to handle the event, and I have absolutely no clue where DefaultInterface is in my Sink object. 

I'm not sure if I will be able to complete the project before the deadline, but I'll keep trying until the time runs out.

4 comments:

  1. Check Binh Ly's great COM documents on http://www.techvanguards.com/

    His free and great EventSinkImp tool is probably what you need.

    ReplyDelete
  2. Maybe if you post a bit more of your code someone can be of assistance. From the screendump it's unclear what you try to accomplish I'm afraid.

    ReplyDelete
  3. DO you know that you can presse Ctrl+C inside an error dialog box to copy just the text instead of getting a screenshot?

    ReplyDelete
  4. I'll post the code that I was working on. I can't call it "my code", cause it's basically a copy and paste from someone else's Delphi/WMI example. I was still in "reverse engineer to learn WMI" stage when I got stuck.

    ReplyDelete

Note: Only a member of this blog may post a comment.