in my program i create and start a remote thread in another process using CreateRemoteThread.
Befor i do this i have to allocate some memory in the destination process' address space (VirtualAllocEx) and copy my function into the allocated area (WriteProcessMemory).

Everything works fine, but how can i get the size of my function?

For example if i have a function

DWORD WINAPI ThreadProc(LPVOID lpParameter)
int x;
int y;

return 0;

How big will this function be? 10 Bytes? 100 Bytes? 1000 Bytes?

At the moment i estimate the size to be maximal 16384 Bytes, but i need more exact information.

Any hints appreciated