Each WinAPI page has a description of the API and a list of the parameters needed to call them. It should be straight forward as long as you understand data types and such.
For example, ReadProcessMemory:
ReadProcessMemory function (Windows)
The page states:
Reads data from an area of memory in a specified process. The entire area to be read must be accessible or the operation fails.
The prototype is:
Code:
BOOL WINAPI ReadProcessMemory(
_In_ HANDLE hProcess,
_In_ LPCVOID lpBaseAddress,
_Out_ LPVOID lpBuffer,
_In_ SIZE_T nSize,
_Out_ SIZE_T *lpNumberOfBytesRead
);
_In_ means that the variable is an incoming value. The function will read the value and use it.
_Out_ means that the variable is an outgoing value. The function will write to the pointer given for that parameter.
In this case, we have lpBuffer as an _Out_ value, which is an LPVOID. This means it expects a pointer to write the data to. The area of memory that the pointer point to should be of at least the nSize parameters value in size.
So you would have for example:
Code:
unsigned char btBuffer[10] = { 0 };
HANDLE hHandle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, 1234 );
ReadProcessMemory( hHandle, (LPVOID)0x12345678, &btBuffer, 10, NULL );
If you read the page information for each parameter you'll see that the last param, lpNumberOfBytesRead, is optional. So we can just use NULL to ignore it.