Idl file for example at RRS feed

All replies

  • Hi,

    Thank you for posting here.

    >>Can you please share .idl file for sample

    We couldn't find the complete samples for the MSDN code snippets referred to above. So I couldn't share .idl file for sample.

    However, I suggest you could download and ferer to the complete samples as follows:

    Best Regards,

    Jeanine Zhang

    • Proposed as answer by Guido Franzke Monday, September 23, 2019 9:50 AM
    Monday, September 23, 2019 9:44 AM
  • Hello xyzam,

    1. After observing the code for the CLoan class in the sample at the link, I reverse engineered it and emerged the following sample IDL :

    // LoanCOMServer.idl : IDL source for LoanCOMServer
    // This file will be processed by the MIDL tool to
    // produce the type library (LoanCOMServer.tlb) and marshalling code.
    import "oaidl.idl";
    import "ocidl.idl";
    library LoanCOMServerLib
    	interface ILoan : IDispatch {
    		[propget, id(1)] HRESULT OpeningBalance([out, retval] DOUBLE* pVal);
    		[propput, id(1)] HRESULT OpeningBalance([in] DOUBLE newVal);
    		[propget, id(2)] HRESULT Rate([out, retval] DOUBLE* pVal);
    		[propput, id(2)] HRESULT Rate([in] DOUBLE newVal);
    		[propget, id(3)] HRESULT Payment([out, retval] DOUBLE* pVal);
    		[propput, id(3)] HRESULT Payment([in] DOUBLE newVal);
    		[propget, id(4)] HRESULT Term([out, retval] SHORT* pVal);
    		[propput, id(4)] HRESULT Term([in] SHORT newVal);
    		[id(5)] HRESULT ComputePayment([out, retval] DOUBLE* pVal);
    		[id(6)] HRESULT ComputeOpeningBalance([out, retval] DOUBLE* pVal);
    		[id(7)] HRESULT ComputeRate([out, retval] DOUBLE* pVal);
    		[id(8)] HRESULT ComputeTerm([out, retval] SHORT* pVal);
    		[id(9)] HRESULT GetFirstPmtDistribution([in] DOUBLE PmtAmt, [out] DOUBLE* Balance, [out] DOUBLE* PrinPortion, [out] DOUBLE* IntPortion, [out, retval] VARIANT_BOOL* pVal);
    		[id(10)] HRESULT GetNextPmtDistribution([in] DOUBLE PmtAmt, [in] DOUBLE* Balance, [out] DOUBLE* PrinPortion, [out] DOUBLE* IntPortion, [out, retval] VARIANT_BOOL* pVal);
    		[propget, id(11)] HRESULT RiskRating([out, retval] BSTR* pVal);
    		[propput, id(11)] HRESULT RiskRating([in] BSTR newVal);
    	coclass Loan
    		[default] interface ILoan;

    2. Note that the GUIDs listed above are produced by me for testing purposes. They are of course not the ones produced by the original writers of CLoan.

    3. Hope this will be helpful.

    - Bio.

    Please visit my blog :

    Tuesday, September 24, 2019 9:55 AM