Capture with User32.dll or hook?
It's very fast, but I wonder if hooking into the API (DirectX) and getting the buffer will be faster than this (I don't know how to do that, though).

I don't know either.
What you have here, probably hasn't been reviewed yet, because there's essentially nothing blatantly wrong with it.

What you've done well
Pretty much everything, as far as I can tell:

Every IDisposable is wrapped in a using block and thus, whether it blows up or not, things get disposed correctly.

try...finally is the best thing you could do here; if there's an exception, it will bubble up, and the finally block will run in all cases, ensuring the resources cleanly get released.

You're working everything in a MemoryStream, which is the only logical thing to do (hitting the file system would be utter nonsense).


Question marks

Returning the MemoryStream means closing and disposing the stream isn't the responsibility of the method that created it - that's a potential issue. I would try to Freeze() the bitmap and return a Bitmap object instead, although there might be a performance penalty in doing that.

If the method is called in a tight loop, does the result of NativeMethods.GetWindowRect(hwnd, out rc); change at all between calls? Perhaps the method could take a Rect as a parameter?

It being static scares me a little, but it's private and you're not showing the class it's a member of... You'll want the method wrapped in an object that you can create and pass around, not just a global/static &quot;helper&quot; method that's part of some undefined ambient context.