I'm trying to get a list of Shell Windows:
procedure TForm1.Button1Click(Sender: TObject);
Var ShellWindows: TShellWindows;
ShellWindows := TShellWindows.Create(nil);
For Scan := 0 to ShellWindows.Count - 1 Do
This procedure works fine on my XP computer with the original shDocvw.pas file generated in 1998. However, it did not work on other computers. I recreated the shDocvw file by importing the DLL currently on my computer, and I am now able to duplicate the error.
I get an ...raised exception class EIntfCastError with message 'Interface not supported'.... on the ShellWindows.Count statement.
I checked SHDocVw and Count is a Pubic property for TShellWindows.
Any ideas why this is not working?
Thanks in advance!