ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

NTSTATUS NTAPI SmExecPgm ( IN HANDLE  SmApiPort,
IN PRTL_USER_PROCESS_INFORMATION  ProcessInformation,
IN BOOLEAN  DebugFlag 
)

Definition at line 20 of file smclient.c.

Referenced by SmpExecPgm(), and SmpExecuteInitialCommand().

{
    NTSTATUS Status;
    SM_API_MSG SmApiMsg;

#if 0 //def _WIN64 // You can take care of this Timo
    /* 64-bit SMSS needs to talk to 32-bit processes so do the LPC conversion */
    if (SmpIsWow64Process())
    {
        return SmpWow64ExecPgm(SmApiPort, ProcessInformation, DebugFlag);
    }
#endif

    /* Initialize the generic LPC header */
    SmApiMsg.h.u2.ZeroInit = 0;
    SmApiMsg.h.u1.s1.DataLength = sizeof(SM_EXEC_PGM_MSG) + 8;
    SmApiMsg.h.u1.s1.TotalLength = sizeof(SmApiMsg);

    /* Initalize this specific API's parameters */
    SmApiMsg.ApiNumber = SmExecPgmApi;
    RtlCopyMemory(&SmApiMsg.u.ExecPgm.ProcessInformation,
                  ProcessInformation,
                  sizeof(SmApiMsg.u.ExecPgm.ProcessInformation));
    SmApiMsg.u.ExecPgm.DebugFlag = DebugFlag;

    /* Send the message to SMSS */
    Status = NtRequestWaitReplyPort(SmApiPort, &SmApiMsg.h, &SmApiMsg.h);
    if (!NT_SUCCESS(Status))
    {
        DPRINT1("SmExecPgm: NtRequestWaitReply Failed %lx\n", Status);
    }
    else
    {
        /* Upon success, we use the API's return value */
        Status = SmApiMsg.ReturnValue;
    }

    /* Close the handles that the parent passed in and return status */
    NtClose(ProcessInformation->ProcessHandle);
    NtClose(ProcessInformation->ThreadHandle);
    return Status;
}

Generated on Mon May 28 2012 05:58:20 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.