Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

int kldrDyldOSStartExe ( KUPTR  uMainEPAddress,
void *  pvStack,
KSIZE  cbStack 
)

Invokes the main executable entry point with whatever parameters specific to the host OS and/or module format.

Returns:
Parameters:
uMainEPAddress The address of the main entry point.
pvStack Pointer to the stack object.
cbStack The size of the stack object.

Definition at line 105 of file kLdrDyldOS.c.

Referenced by kldrDyldModStartExe().

{
#if K_OS == K_OS_WINDOWS
    /*
     * Invoke the entrypoint on the current stack for now.
     * Deal with other formats and stack switching another day.
     */
    int rc;
    int (*pfnEP)(void);
    pfnEP = (int (*)(void))uMainEPAddress;

    rc = pfnEP();

    TerminateProcess(GetCurrentProcess(), rc);
    kHlpAssert(!"TerminateProcess failed");
    for (;;)
        TerminateProcess(GetCurrentProcess(), rc);
#endif

    return -1;
}


Generated by  Doxygen 1.6.0   Back to index