There is no tool which would do this automatically, but there is a site called pinvoke.net which offers lots of P/Invoke signatures and examples. For your question, here is the link: TwIdentity (twain_32).
Also, there are open source libraries available which wrap the native functionality into managed classes, like: Saraff.Twain.NET or twain-in-dotnet, so looking at their source code you will probably find all the definitions you need.