| 1 | /* $Id: stubs.cpp,v 1.1 2001-07-07 04:36:06 bird Exp $ | 
|---|
| 2 | * | 
|---|
| 3 | * Stubs. | 
|---|
| 4 | * | 
|---|
| 5 | * Copyright (c) 2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no) | 
|---|
| 6 | * | 
|---|
| 7 | * Project Odin Software License can be found in LICENSE.TXT | 
|---|
| 8 | * | 
|---|
| 9 | */ | 
|---|
| 10 |  | 
|---|
| 11 |  | 
|---|
| 12 | /******************************************************************************* | 
|---|
| 13 | *   Header Files                                                               * | 
|---|
| 14 | *******************************************************************************/ | 
|---|
| 15 | #include <windows.h> | 
|---|
| 16 | #include <objbase.h> | 
|---|
| 17 | #include <urlmon.h> | 
|---|
| 18 | #include <debugtools.h> | 
|---|
| 19 |  | 
|---|
| 20 |  | 
|---|
| 21 | /******************************************************************************* | 
|---|
| 22 | *   Structures and Typedefs                                                    * | 
|---|
| 23 | *******************************************************************************/ | 
|---|
| 24 | typedef void IBindStatusCallback; | 
|---|
| 25 |  | 
|---|
| 26 | /** | 
|---|
| 27 | * Executes a hyperlink jump to a new document or object. | 
|---|
| 28 | * | 
|---|
| 29 | * @returns Returns S_OK if successful, or an error value otherwise. | 
|---|
| 30 | * @param   szTarget    String that helps identify the hyperlink target. This string is resolved into a | 
|---|
| 31 | *                      moniker for underlying binding operations through MkParseDisplayNameEx. If this is | 
|---|
| 32 | *                      NULL, the navigation is within a document. This parameteris required. (IN) | 
|---|
| 33 | * @param   szLocation  Optional. String that specifies the location within the hyperlink target for the | 
|---|
| 34 | *                      new hyperlink. (IN) | 
|---|
| 35 | * @param   szTargetFrameName    Optional. String that specifies the name of the target frame for the | 
|---|
| 36 | *                      hyperlink navigation. This argument only affects navigation within a document | 
|---|
| 37 | *                      container that supports framesets. (IN) | 
|---|
| 38 | * @param   pUnk        Address of the IUnknown interface on the document or object that is initiating the | 
|---|
| 39 | *                      hyperlink. If this is NULL, it is assumed the hyperlink originates from an | 
|---|
| 40 | *                      Microsoft© ActiveX©-unaware application. Note that if the caller of this function is | 
|---|
| 41 | *                      an ActiveX control or document object, you must pass a valid value for this | 
|---|
| 42 | *                      parameter for navigation to succeed. (IN) | 
|---|
| 43 | * @param   pbc         Address of the IBindCtx interface on the bind context to use for any moniker binding | 
|---|
| 44 | *                      performed during the navigation. This must not be NULL. (IN) | 
|---|
| 45 | * @param   pbsc        Address of the IBindStatusCallback interface on the bind-status-callback to use for | 
|---|
| 46 | *                      any asynchronous moniker binding performed during the navigation. The bind-status-callback | 
|---|
| 47 | *                      will only return the standard IUnknown methods: AddRef and QueryInterface. When navigating | 
|---|
| 48 | *                      in a new window, the only IBindStatusCallback method that gets called is | 
|---|
| 49 | *                      IBindStatusCallback::GetBindInfo. If this is NULL, the caller does not receive progress | 
|---|
| 50 | *                      notification, cancellation, pausing, or low-level binding information. (IN) | 
|---|
| 51 | * @param   grfHLNF     Unsigned long integer value that specifies one of the HLNF values. (IN) | 
|---|
| 52 | * @param   dwReserved  Reserved for future (yeah sure!) use; must be set to NULL. (IN) | 
|---|
| 53 | * @status  stub | 
|---|
| 54 | * @author  knut st. osmundsen (knut.stange.osmundsen@mynd.no) | 
|---|
| 55 | * @remark  http://msdn.microsoft.com/library/default.asp?url=/workshop/misc/hlink/reference/functions/HlinkSimpleNavigateToString.asp | 
|---|
| 56 | */ | 
|---|
| 57 | HRESULT WIN32API HlinkSimpleNavigateToString( | 
|---|
| 58 | LPCWSTR             szTarget, | 
|---|
| 59 | LPCWSTR             szLocation, | 
|---|
| 60 | LPCWSTR             szTargetFrameName, | 
|---|
| 61 | IUnknown *          pUnk, | 
|---|
| 62 | IBindCtx *          pbc, | 
|---|
| 63 | IBindStatusCallback *pbsc, | 
|---|
| 64 | DWORD               grfHLNF, | 
|---|
| 65 | DWORD               dwReserved | 
|---|
| 66 | ) | 
|---|
| 67 | { | 
|---|
| 68 | dprintf(("URLMON:HlinkSimpleNavigateToString(%ls %ls %ls 0x%x 0x%x 0x%x 0x%x 0x%x) - STUB\n", | 
|---|
| 69 | szTarget, szLocation ? szLocation : (LPCWSTR)L"<NULL>" , szTargetFrameName ? szTargetFrameName : (LPCWSTR)L"<NULL>" , | 
|---|
| 70 | pUnk, pbc, pbsc, grfHLNF, dwReserved)); | 
|---|
| 71 | return S_FALSE; | 
|---|
| 72 | } | 
|---|
| 73 |  | 
|---|
| 74 |  | 
|---|
| 75 |  | 
|---|
| 76 | /** | 
|---|
| 77 | * Registers a callback interface with an existing bind context. | 
|---|
| 78 | * | 
|---|
| 79 | * @returns S_OK on Success. E_INVALIDARG if one or more parameters are invalid. | 
|---|
| 80 | *          E_OUTOFMEMORY if there was insufficient memory to register the callback with the bind context. (IN) | 
|---|
| 81 | * @param   pbc             Address of the IBindCtx interface from which to receive callbacks. (IN) | 
|---|
| 82 | * @param   pbsc            Address of the IBindStatusCallback interface implementation to be registered. (IN) | 
|---|
| 83 | * @param   ppbscPrevious   Address of a pointer to a previously registered instance of IBindStatusCallback. (OUT) | 
|---|
| 84 | * @param   dwReserved      Reserved - Must be set to zero. (yeah, sure!) | 
|---|
| 85 | * @status  stub | 
|---|
| 86 | * @author  knut st. osmundsen (knut.stange.osmundsen@mynd.no) | 
|---|
| 87 | * @remark  http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/moniker/reference/functions/RegisterBindStatusCallback.asp | 
|---|
| 88 | */ | 
|---|
| 89 | HRESULT WIN32API RegisterBindStatusCallback( | 
|---|
| 90 | IBindCtx *              pbc, | 
|---|
| 91 | IBindStatusCallback *   pbsc, | 
|---|
| 92 | IBindStatusCallback **  ppbscPrevious, | 
|---|
| 93 | DWORD                   dwReserved | 
|---|
| 94 | ) | 
|---|
| 95 | { | 
|---|
| 96 | dprintf(("URLMON: RegisterBindStatusCallback(%x, %x, %x, %x) - STUB\n", | 
|---|
| 97 | pbc, pbsc, ppbscPrevious, dwReserved)); | 
|---|
| 98 | return E_INVALIDARG; | 
|---|
| 99 | } | 
|---|