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

static DWORD CALLBACK DesktopThreadProc ( IN OUT LPVOID  lpParameter) [static]

Definition at line 31 of file desktop.c.

Referenced by DesktopCreateWindow().

{
    volatile DESKCREATEINFO *DeskCreateInfo = (volatile DESKCREATEINFO *)lpParameter;
    IShellDesktopTray *pSdt;
    HANDLE hDesktop;
    HRESULT hRet;

    OleInitialize(NULL);

    hRet = ITrayWindow_QueryInterface(DeskCreateInfo->Tray,
                                      &IID_IShellDesktopTray,
                                      (PVOID*)&pSdt);
    if (!SUCCEEDED(hRet))
        return 1;

    hDesktop = SHCreateDesktop(pSdt);

    IShellDesktopTray_Release(pSdt);
    if (hDesktop == NULL)
        return 1;

    (void)InterlockedExchangePointer(&DeskCreateInfo->hDesktop,
                                     hDesktop);

    if (!SetEvent(DeskCreateInfo->hEvent))
    {
        /* Failed to notify that we initialized successfully, kill ourselves
           to make the main thread wake up! */
        return 1;
    }

    SHDesktopMessageLoop(hDesktop);

    /* FIXME: Properly rundown the main thread! */
    ExitProcess(0);

    return 0;
}

Generated on Mon May 28 2012 04:46:18 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.