home *** CD-ROM | disk | FTP | other *** search
/ PC Press 1997 July / Sezamfile97_2.iso / windows / program / activex / axtsamp.exe / TSBRANCH.EXE / STOCLIEN / SINK.CPP < prev    next >
C/C++ Source or Header  |  1996-12-29  |  19KB  |  593 lines

  1. /*+==========================================================================
  2.   File:      SINK.CPP
  3.  
  4.   Summary:   Implementation file for the COPaperSink COM Object Class.
  5.              Connectable object notifications are handled by COPaperSink.
  6.  
  7.              COPaperSink offers a main IUnknown interface and the custom
  8.              IPaperSink interface (with the drawing Paper related event
  9.              features). This multiple interface COM Object Class is
  10.              achieved via the technique of nested classes.  The
  11.              implementation of the IPaperSink interface is nested inside
  12.              the COPaperSink Class.
  13.  
  14.              For a comprehensive tutorial code tour of this module's
  15.              contents and offerings see the tutorial STOCLIEN.HTM
  16.              file. For more specific technical details on the internal
  17.              workings see the comments dispersed throughout the module's
  18.              source code.
  19.  
  20.   Classes:   COPaperSink.
  21.  
  22.   Functions: none.
  23.  
  24.   Origin:    6-10-96: atrent - Editor-inheritance from BALL.CPP in
  25.              the CONSERVE Tutorial Code Sample.
  26.  
  27. ----------------------------------------------------------------------------
  28.   This file is part of the Microsoft ActiveX Tutorial Code Samples.
  29.  
  30.   Copyright (C) Microsoft Corporation, 1997.  All rights reserved.
  31.  
  32.   This source code is intended only as a supplement to Microsoft
  33.   Development Tools and/or on-line documentation.  See these other
  34.   materials for detailed information regarding Microsoft code samples.
  35.  
  36.   THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  37.   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  38.   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  39.   PARTICULAR PURPOSE.
  40. ==========================================================================+*/
  41.  
  42.  
  43. /*---------------------------------------------------------------------------
  44.   We include WINDOWS.H for all Win32 applications.
  45.   We include OLE2.H because we will be calling the COM/OLE Libraries.
  46.   We include OLECTL.H because it has definitions for connectable objects.
  47.   We include APPUTIL.H because we will be building this application using
  48.     the convenient Virtual Window and Dialog classes and other
  49.     utility functions in the APPUTIL Library (ie, APPUTIL.LIB).
  50.   We include IPAPER.H and PAPGUIDS.H for the common paper-related
  51.     Interface class, GUID, and CLSID specifications.
  52.   We include PAPFILE.H because it has the C++ class used for compound file
  53.     storage of drawing paper data.
  54.   We include GUIPAPER.H because it declares the class for the main C++
  55.     object that can service the Sink events.
  56.   We include SINK.H because it has the class COPaperSink declarations.
  57. ---------------------------------------------------------------------------*/
  58. #include <windows.h>
  59. #include <ole2.h>
  60. #include <olectl.h>
  61. #include <apputil.h>
  62. #include <ipaper.h>
  63. #include <papguids.h>
  64. #include "papfile.h"
  65. #include "guipaper.h"
  66. #include "sink.h"
  67.  
  68.  
  69. /*---------------------------------------------------------------------------
  70.   COPaperSink's implementation of its main COM object class including
  71.   Constructor, Destructor, QueryInterface, AddRef, and Release.
  72. ---------------------------------------------------------------------------*/
  73.  
  74. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  75.   Method:   COPaperSink::COPaperSink
  76.  
  77.   Summary:  COPaperSink Constructor. Note the member initializer:
  78.             "m_ImpIPaperSink(this, pUnkOuter)" which is used to pass the
  79.             'this' and pUnkOuter pointers of this constructor function to
  80.             the constructor in the instantiation of the implementation of
  81.             the CImpIPaperSink interface (which is nested inside this
  82.             present COPaperSink Object Class).
  83.  
  84.   Args:     IUnknown* pUnkOuter,
  85.               Pointer to the the outer Unknown.  NULL means this COM Object
  86.               is not being Aggregated.  Non NULL means it is being created
  87.               on behalf of an outside COM object that is reusing it via
  88.               aggregation.
  89.             CGuiPaper* pGuiPaper)
  90.               Pointer to the main C++ object that can service the PaperSink
  91.               events.
  92.  
  93.   Modifies: m_cRefs, m_pUnkOuter, m_pGuiPaper.
  94.  
  95.   Returns:  void
  96. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  97. COPaperSink::COPaperSink(
  98.   IUnknown* pUnkOuter,
  99.   CGuiPaper* pGuiPaper) :
  100.   m_ImpIPaperSink(this, pUnkOuter)
  101. {
  102.   // Zero the COM object's reference count.
  103.   m_cRefs = 0;
  104.  
  105.   // No AddRef necessary if non-NULL, as we're nested.
  106.   m_pUnkOuter = pUnkOuter;
  107.  
  108.   // Assign the pointer to the Sink service C++ object.
  109.   m_pGuiPaper = pGuiPaper;
  110.  
  111.   return;
  112. }
  113.  
  114.  
  115. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  116.   Method:   COPaperSink::~COPaperSink
  117.  
  118.   Summary:  COPaperSink Destructor.
  119.  
  120.   Args:     void
  121.  
  122.   Modifies: .
  123.  
  124.   Returns:  void
  125. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  126. COPaperSink::~COPaperSink(void)
  127. {
  128.   return;
  129. }
  130.  
  131.  
  132. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  133.   Method:   COPaperSink::QueryInterface
  134.  
  135.   Summary:  QueryInterface of the COPaperSink non-delegating
  136.             IUnknown implementation.
  137.  
  138.   Args:     REFIID riid,
  139.               [in] GUID of the Interface being requested.
  140.             PPVOID ppv)
  141.               [out] Address of the caller's pointer variable that will
  142.               receive the requested interface pointer.
  143.  
  144.   Modifies: ...
  145.  
  146.   Returns:  HRESULT
  147. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  148. STDMETHODIMP COPaperSink::QueryInterface(
  149.                REFIID riid,
  150.                PPVOID ppv)
  151. {
  152.   HRESULT hr = E_NOINTERFACE;
  153.  
  154.   *ppv = NULL;
  155.  
  156.   if (IID_IUnknown == riid)
  157.     *ppv = this;
  158.   else if (IID_IPaperSink == riid)
  159.     *ppv = &m_ImpIPaperSink;
  160.  
  161.   if (NULL != *ppv)
  162.   {
  163.     // We've handed out a pointer to the interface so obey the COM rules
  164.     // and AddRef the reference count.
  165.     ((LPUNKNOWN)*ppv)->AddRef();
  166.     hr = NOERROR;
  167.   }
  168.  
  169.  
  170.   return (hr);
  171. }
  172.  
  173.  
  174. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  175.   Method:   COPaperSink::AddRef
  176.  
  177.   Summary:  AddRef of the COPaperSink non-delegating IUnknown
  178.             implementation.
  179.  
  180.   Args:     void
  181.  
  182.   Modifies: m_cRefs.
  183.  
  184.   Returns:  ULONG
  185.               New value of m_cRefs (COM object's reference count).
  186. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  187. STDMETHODIMP_(ULONG) COPaperSink::AddRef(void)
  188. {
  189.   ULONG cRefs;
  190.  
  191.   cRefs = ++m_cRefs;
  192.  
  193.   return cRefs;
  194. }
  195.  
  196.  
  197. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  198.   Method:   COPaperSink::Release
  199.  
  200.   Summary:  Release of the COPaperSink non-delegating IUnknown
  201.             implementation.
  202.  
  203.   Args:     void
  204.  
  205.   Modifies: m_cRefs.
  206.  
  207.   Returns:  ULONG
  208.               New value of m_cRefs (COM object's reference count).
  209. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  210. STDMETHODIMP_(ULONG) COPaperSink::Release(void)
  211. {
  212.   ULONG cRefs;
  213.  
  214.   cRefs = --m_cRefs;
  215.  
  216.   if (0 == cRefs)
  217.   {
  218.     // We artificially bump the main ref count to prevent reentrancy
  219.     // via the main object destructor.  Not really needed in this
  220.     // COPaperSink but a good practice because we are aggregatable and
  221.     // may at some point in the future add something entertaining like
  222.     // some Releases to the COPaperSink destructor.
  223.     m_cRefs++;
  224.     delete this;
  225.   }
  226.  
  227.   return cRefs;
  228. }
  229.  
  230.  
  231. /*---------------------------------------------------------------------------
  232.   COPaperSink's nested implementation of the IPaperSink interface
  233.   including Constructor, Destructor, QueryInterface, AddRef, Release,
  234.   Locked, Unlocked, Loaded, Saved, InkStart, InkDraw, InkStop, Erased,
  235.   and Resized. Methods in this interface are called by COM objects on
  236.   the server side to send notifications to the client.
  237. ---------------------------------------------------------------------------*/
  238.  
  239. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  240.   Method:   COPaperSink::CImpIPaperSink::CImpIPaperSink
  241.  
  242.   Summary:  Constructor for the CImpIPaperSink interface instantiation.
  243.  
  244.   Args:     COPaperSink* pBackObj,
  245.               Back pointer to the parent outer object.
  246.             IUnknown* pUnkOuter
  247.               Pointer to the outer Unknown.  For delegation.
  248.  
  249.   Modifies: m_pBackObj, m_pUnkOuter.
  250.  
  251.   Returns:  void
  252. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  253. COPaperSink::CImpIPaperSink::CImpIPaperSink(
  254.   COPaperSink* pBackObj,
  255.   IUnknown* pUnkOuter)
  256. {
  257.   // Init the Back Object Pointer to point to the parent object.
  258.   m_pBackObj = pBackObj;
  259.  
  260.   // Init the CImpIPaperSink interface's delegating Unknown pointer.  We
  261.   // use the Back Object pointer for IUnknown delegation here if we are
  262.   // not being aggregated.  If we are being aggregated we use the supplied
  263.   // pUnkOuter for IUnknown delegation.  In either case the pointer
  264.   // assignment requires no AddRef because the CImpIPaperSink lifetime is
  265.   // quaranteed by the lifetime of the parent object in which
  266.   // CImpIPaperSink is nested.
  267.   if (NULL == pUnkOuter)
  268.     m_pUnkOuter = pBackObj;
  269.   else
  270.     m_pUnkOuter = pUnkOuter;
  271.  
  272.   return;
  273. }
  274.  
  275.  
  276. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  277.   Method:   COPaperSink::CImpIPaperSink::~CImpIPaperSink
  278.  
  279.   Summary:  Destructor for the CImpIPaperSink interface instantiation.
  280.  
  281.   Args:     void
  282.  
  283.   Modifies: .
  284.  
  285.   Returns:  void
  286. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  287. COPaperSink::CImpIPaperSink::~CImpIPaperSink(void)
  288. {
  289.   return;
  290. }
  291.  
  292.  
  293. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  294.   Method:   COPaperSink::CImpIPaperSink::QueryInterface
  295.  
  296.   Summary:  The QueryInterface IUnknown member of this IPaperSink interface
  297.             implementation that delegates to m_pUnkOuter, whatever it is.
  298.  
  299.   Args:     REFIID riid,
  300.               [in] GUID of the Interface being requested.
  301.             PPVOID ppv)
  302.               [out] Address of the caller's pointer variable that will
  303.               receive the requested interface pointer.
  304.  
  305.   Modifies: .
  306.  
  307.   Returns:  HRESULT
  308.               Returned by the delegated outer QueryInterface call.
  309. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  310. STDMETHODIMP COPaperSink::CImpIPaperSink::QueryInterface(
  311.                REFIID riid,
  312.                PPVOID ppv)
  313. {
  314.   // Delegate this call to the outer object's QueryInterface.
  315.   return m_pUnkOuter->QueryInterface(riid, ppv);
  316. }
  317.  
  318.  
  319. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  320.   Method:   COPaperSink::CImpIPaperSink::AddRef
  321.  
  322.   Summary:  The AddRef IUnknown member of this IPaperSink interface
  323.             implementation that delegates to m_pUnkOuter, whatever it is.
  324.  
  325.   Args:     void
  326.  
  327.   Modifies: .
  328.  
  329.   Returns:  ULONG
  330.               Returned by the delegated outer AddRef call.
  331. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  332. STDMETHODIMP_(ULONG) COPaperSink::CImpIPaperSink::AddRef(void)
  333. {
  334.   // Delegate this call to the outer object's AddRef.
  335.   return m_pUnkOuter->AddRef();
  336. }
  337.  
  338.  
  339. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  340.   Method:   COPaperSink::CImpIPaperSink::Release
  341.  
  342.   Summary:  The Release IUnknown member of this IPaperSink interface
  343.             implementation that delegates to m_pUnkOuter, whatever it is.
  344.  
  345.   Args:     void
  346.  
  347.   Modifies: .
  348.  
  349.   Returns:  ULONG
  350.               Returned by the delegated outer Release call.
  351. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  352. STDMETHODIMP_(ULONG) COPaperSink::CImpIPaperSink::Release(void)
  353. {
  354.   // Delegate this call to the outer object's Release.
  355.   return m_pUnkOuter->Release();
  356. }
  357.  
  358.  
  359. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  360.   Method:   COPaperSink::CImpIPaperSink::Locked
  361.  
  362.   Summary:  The COPaper object was locked by a client.
  363.  
  364.   Args:     void
  365.  
  366.   Modifies: ...
  367.  
  368.   Returns:  HRESULT
  369.               Standard result code. NOERROR for success.
  370. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  371. STDMETHODIMP COPaperSink::CImpIPaperSink::Locked(
  372.                void)
  373. {
  374.   HRESULT hr = NOERROR;
  375.  
  376.   // For future evolution.
  377.  
  378.   return hr;
  379. }
  380.  
  381.  
  382. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  383.   Method:   COPaperSink::CImpIPaperSink::Unlocked
  384.  
  385.   Summary:  The COPaper object was Unlocked by a client.
  386.  
  387.   Args:     void
  388.  
  389.   Modifies: ...
  390.  
  391.   Returns:  HRESULT
  392.               Standard result code. NOERROR for success.
  393. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  394. STDMETHODIMP COPaperSink::CImpIPaperSink::Unlocked(
  395.                void)
  396. {
  397.   HRESULT hr = NOERROR;
  398.  
  399.   // For future evolution.
  400.  
  401.   return hr;
  402. }
  403.  
  404.  
  405. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  406.   Method:   COPaperSink::CImpIPaperSink::Loaded
  407.  
  408.   Summary:  The COPaper object's ink drawing data was loaded from a
  409.             client's compound file.
  410.  
  411.   Args:     void
  412.  
  413.   Modifies: ...
  414.  
  415.   Returns:  HRESULT
  416.               Standard result code. NOERROR for success.
  417. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  418. STDMETHODIMP COPaperSink::CImpIPaperSink::Loaded(
  419.                void)
  420. {
  421.   HRESULT hr;
  422.  
  423.   // We have been notified that a load was done. Thus, a whole new array
  424.   // of ink data must be displayed in a cleared window of this client.
  425.   m_pBackObj->m_pGuiPaper->ClearWin();
  426.   hr = m_pBackObj->m_pGuiPaper->PaintWin();
  427.  
  428.   return hr;
  429. }
  430.  
  431.  
  432. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  433.   Method:   COPaperSink::CImpIPaperSink::Saved
  434.  
  435.   Summary:  The COPaper object's drawing paper data was saved to a
  436.             client's compound file.
  437.  
  438.   Args:     void
  439.  
  440.   Modifies: ...
  441.  
  442.   Returns:  HRESULT
  443.               Standard result code. NOERROR for success.
  444. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  445. STDMETHODIMP COPaperSink::CImpIPaperSink::Saved(
  446.                void)
  447. {
  448.   HRESULT hr = NOERROR;
  449.  
  450.   // For future evolution.
  451.  
  452.   return hr;
  453. }
  454.  
  455.  
  456. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  457.   Method:   COPaperSink::CImpIPaperSink::InkStart
  458.  
  459.   Summary:  Client is being told to start a display ink drawing sequence.
  460.  
  461.   Args:     SHORT nX,
  462.               X coordinate of the start point.
  463.             SHORT nY,
  464.               Y coordinate of the start point.
  465.             SHORT nWidth,
  466.               Ink Width in pixels.
  467.             COLORREF crInkColor)
  468.               RGB Ink color to be used in the subsequent inking sequence.
  469.  
  470.   Modifies: ...
  471.  
  472.   Returns:  HRESULT
  473.               Standard result code. NOERROR for success.
  474. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  475. STDMETHODIMP COPaperSink::CImpIPaperSink::InkStart(
  476.                                             SHORT nX,
  477.                                             SHORT nY,
  478.                                             SHORT nWidth,
  479.                                             COLORREF crInkColor)
  480. {
  481.   // Turn off ink saving to the COPaper object.
  482.   m_pBackObj->m_pGuiPaper->InkSaving(FALSE);
  483.  
  484.   // Play the data back to the CGuiPaper for display only.
  485.   m_pBackObj->m_pGuiPaper->InkWidth(nWidth);
  486.   m_pBackObj->m_pGuiPaper->InkColor(crInkColor);
  487.   m_pBackObj->m_pGuiPaper->InkStart(nX, nY);
  488.  
  489.   return NOERROR;
  490. }
  491.  
  492.  
  493. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  494.   Method:   COPaperSink::CImpIPaperSink::InkDraw
  495.  
  496.   Summary:  Client is being told to draw/display ink drawing sequence data.
  497.  
  498.   Args:     SHORT nX,
  499.               X coordinate of the start point.
  500.             SHORT nY,
  501.               Y coordinate of the start point.
  502.  
  503.   Modifies: ...
  504.  
  505.   Returns:  HRESULT
  506.               Standard result code. NOERROR for success.
  507. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  508. STDMETHODIMP COPaperSink::CImpIPaperSink::InkDraw(
  509.                                             SHORT nX,
  510.                                             SHORT nY)
  511. {
  512.   // Play the data back to the CGuiPaper for display only.
  513.   m_pBackObj->m_pGuiPaper->InkDraw(nX, nY);
  514.  
  515.   return NOERROR;
  516. }
  517.  
  518.  
  519. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  520.   Method:   COPaperSink::CImpIPaperSink::InkStop
  521.  
  522.   Summary:  Client is being told to stop an ink drawing sequence.
  523.  
  524.   Args:     SHORT nX,
  525.               X coordinate of the start point.
  526.             SHORT nY,
  527.               Y coordinate of the start point.
  528.  
  529.   Modifies: ...
  530.  
  531.   Returns:  HRESULT
  532.               Standard result code. NOERROR for success.
  533. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  534. STDMETHODIMP COPaperSink::CImpIPaperSink::InkStop(
  535.                                             SHORT nX,
  536.                                             SHORT nY)
  537. {
  538.   // Stop the play of the data back to the CGuiPaper for display.
  539.   m_pBackObj->m_pGuiPaper->InkStop(nX, nY);
  540.  
  541.   // Turn Ink Data saving back on.
  542.   m_pBackObj->m_pGuiPaper->InkSaving(TRUE);
  543.  
  544.   return NOERROR;
  545. }
  546.  
  547.  
  548. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  549.   Method:   COPaperSink::CImpIPaperSink::Erased
  550.  
  551.   Summary:  The COPaper object's drawing paper data was erased by a client.
  552.  
  553.   Args:     void
  554.  
  555.   Modifies: ...
  556.  
  557.   Returns:  HRESULT
  558.               Standard result code. NOERROR for success.
  559. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  560. STDMETHODIMP COPaperSink::CImpIPaperSink::Erased(
  561.                void)
  562. {
  563.   HRESULT hr = NOERROR;
  564.  
  565.   // For future evolution.
  566.  
  567.   return hr;
  568. }
  569.  
  570.  
  571. /*M+M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M+++M
  572.   Method:   COPaperSink::CImpIPaperSink::Resized
  573.  
  574.   Summary:  The COPaper object's drawing rectangle was resized by a client.
  575.  
  576.   Args:     void
  577.  
  578.   Modifies: ...
  579.  
  580.   Returns:  HRESULT
  581.               Standard result code. NOERROR for success.
  582. M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M---M-M*/
  583. STDMETHODIMP COPaperSink::CImpIPaperSink::Resized(
  584.                SHORT nWidth,
  585.                SHORT nHeight)
  586. {
  587.   HRESULT hr = NOERROR;
  588.  
  589.   // For future evolution.
  590.  
  591.   return hr;
  592. }
  593.