vb Code:
Function GetFreeVidMem(lhWnd As Long) As Long
Dim oDX As DirectX7
Set oDX = New DirectX7
Dim oDD As DirectDraw7
Dim hwCaps As DDCAPS
Dim helCaps As DDCAPS
Set oDD = oDX.DirectDrawCreate("")
oDD.SetCooperativeLevel lhWnd, DDSCL_NORMAL
oDD.GetCaps hwCaps, helCaps
GetFreeVidMem = hwCaps.lVidMemFree
Set oDD = Nothing
Set oDX = Nothing
End Function
By using Direct7 i can monitor the amount of total/available video memory. It doesnt count i am opening up new instances of my forms, the value is remains the same, that means it is not using the video memory either. But then, where it reserves memory, i'm want to monitor the available (remaining) amount of it.
Could it be a limitation of the device driver
Ok, but how can i monitor the limits?