So, what do we do first? First we fire up PowerShell in x86 mode. There should be a "Windows PowerShell (x86)" link available in the start menu. Then we can run the following:
#First get the folder that contains DirectX$dir = (gci (Split-Path ( Split-Path ([Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()) )) | ? {$_.Name -cmatch 'DirectX'}).FullName#Then find the DirectDraw Assembly$assm = ls $dir -Filter *DirectX*DirectDraw.dll -r|select -ExpandProperty FullName#Load the Assembly[void][reflection.assembly]::LoadFile($assm)#Now Create a DirectDraw device$d = new-object Microsoft.DirectX.DirectDraw.Device
From here our device $d allows us to interact with the video card retrieving information:
[font='courier new']PS C:\Users\dwarfsoft> $d.DeviceInformation[/font]
[font='courier new']DeviceGuid : d7b78e66-4266-11cf-1a74-e301a6c2cd35[/font]
[font='courier new']Description : Intel(R) HD Graphics Family[/font]
[font='courier new']Driver : aticfx32.dll[/font]
[font='courier new']WhqlLevel : 1[/font]
[font='courier new']Revision : 9[/font]
[font='courier new']SubSystemId : 568530858[/font]
[font='courier new']DeviceId : 294[/font]
[font='courier new']VendorId : 32902[/font]
[font='courier new']DriverVersion : 0[/font]
[font='courier new']PS C:\Users\dwarfsoft> $d.DisplayMode|Select Height,Width,RefreshRate|fl[/font]
[font='courier new']Height : 768[/font]
[font='courier new']Width : 1366[/font]
[font='courier new']RefreshRate : 60[/font]
Now that we can interact with objects using the Assemblies, the next step is to actually display something on screen.
Cheers, Chris.