Hi Jonathan,
Below is what was posted somewhere in time in the old good TestComplete newsgroup. :)
Hope that it will inspire you with the ideas.
//From: "How can I get Video Memory usage in the script?", Dec 16, 2008
//1. Add the "Microsoft.DirectX.DirectDraw" assembly to the "Selected
// Components" list of the CLR Bridge option (see the "Project Properties -
// CLR Bridge Options" help topic for details).
//2. Use the following script:
function Test_VideoMemory();
var ddDevice, ddCaps : OleVariant;
begin
ddDevice :=
dotNET.Microsoft_DirectX_DirectDraw.Device.zctor(dotNET.Microsoft_DirectX_DirectDraw.CreateFlags.HardwareOnly);
ddCaps := ddDevice.GetCaps();
Log.Message('Free video memory: ' + ddCaps.HardwareCaps.VideoMemoryFree/1024/1024 + ' MB');
end;