I got two console processes that second one is created by first one using the API below:
BOOL WINAPI CreateProcess(
__in_opt LPCTSTR lpApplicationName,
__inout_opt LPTSTR lpCommandLine,
__in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in BOOL bInheritHandles,
__in DWORD dwCreationFlags,
__in_opt LPVOID lpEnvironment,
__in_opt LPCTSTR lpCurrentDirectory,
__in LPSTARTUPINFO lpStartupInfo,
__out LPPROCESS_INFORMATION lpProcessInformation
);
Now I wonder that if I pass a pointer to a part of memory of the first process, via IpCommandLine to the second process which is called by first process, will reading the memory to which that pointer points, by the second process definitely cause an access violation error or is it subject to value of some parameter of that API? If I can't use this API alone for my purpose, what method do you propose for the access ?