Exemplo n.º 1
0
ULONG_PTR __fastcall HostAddRef( )
{
	LPUNKNOWN pUnknown;

	if (SHGetInstanceExplorer(&pUnknown) == S_OK)
		return((ULONG_PTR)pUnknown);
	else
		return(0);
}
Exemplo n.º 2
0
/*************************************************************************
* SHOpenFolderWindow			[BROWSEUI.102]
* see SHOpenNewFrame below for remarks
*/
extern "C" HRESULT WINAPI SHOpenFolderWindow(PIE_THREAD_PARAM_BLOCK parameters)
{
    HANDLE                                  threadHandle;
    DWORD                                   threadID;

    WCHAR debugStr[MAX_PATH + 1];
    SHGetPathFromIDListW(parameters->directoryPIDL, debugStr);

    DbgPrint("SHOpenFolderWindow %p(%S)\n", parameters->directoryPIDL, debugStr);

    PIE_THREAD_PARAM_BLOCK paramsCopy = SHCloneIETHREADPARAM(parameters);

    SHGetInstanceExplorer(&(paramsCopy->offsetF8));
    threadHandle = CreateThread(NULL, 0x10000, BrowserThreadProc, paramsCopy, 0, &threadID);
    if (threadHandle != NULL)
    {
        CloseHandle(threadHandle);
        return S_OK;
    }
    SHDestroyIETHREADPARAM(paramsCopy);
    return E_FAIL;
}
Exemplo n.º 3
0
/*************************************************************************
 *      _SHGetInstanceExplorer	[SHLWAPI.@]
 *
 * Get an interface to the shell explorer.
 *
 * PARAMS
 *  lppUnknown [O] Destination for explorers IUnknown interface.
 *
 * RETURNS
 *  Success: S_OK. lppUnknown contains the explorer interface.
 *  Failure: An HRESULT error code.
 */
HRESULT WINAPI _SHGetInstanceExplorer(IUnknown **lppUnknown)
{
  /* This function is used within SHLWAPI only to hold the IE reference
   * for threads created with the CTF_PROCESS_REF flag set. */
    return SHGetInstanceExplorer(lppUnknown);
}