Posted July 23, 201015 yr I am trying to create a new process from current running process,am doing this with the zwcreateProcess function.(just for testing purpose).check the code below HANDLE fileHandle; OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING InputString; InputString.Buffer = L"C:\\users\\Tommy\\MyEXE.exe"; InputString.Length = wcslen(L"C:\\users\\Tommy\\MyEXE.exe")*2; InputString.MaximumLength = InputString.Length +2; ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES); ObjectAttirbutes.ObjectName = &InputString; NTSTATUS status = ZwCreateProcess(&fileHandle,PROCESS_CREATRE_PROCESS,&ObjectAttributes,GetCurrentProcess(),true ,NULL,NULL,NULL); status - Invalid ParameterAny suggestions/help is appreciated.
July 24, 201015 yr Your DesiredAccess parameter is wrong. http://msdn.microsoft.com/en-us/library/ms684880%28v=VS.85%29.aspxAnd maybe you didnt initializie the ObjectAttributes correctly.i am using this:#define InitializeObjectAttributes(p,n,a,r,s) \{ \ (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ (p)->ObjectName = n; \ (p)->Attributes = a; \ (p)->RootDirectory = r; \ (p)->SecurityDescriptor = s; \ (p)->SecurityQualityOfService = NULL; \}OBJECT_ATTRIBUTES ObjectAttributes;InitializeObjectAttributes(&ObjectAttributes, 0, 0, 0, 0);
Create an account or sign in to comment