001    package org.bridj.cpp.com;
002    
003    import org.bridj.Pointer;
004    
005    /**
006     * Implementing the IDispatch Interface : http://msdn.microsoft.com/en-us/library/ms221037.aspx
007     * Simulating COM Interfaces : http://msdn.microsoft.com/en-us/library/111chfb8.aspx
008     */
009    public class COMCallableWrapper extends IDispatch {
010            Object instance;
011            public COMCallableWrapper(Object instance) {
012                    this.instance = instance;
013            }
014    //      public class IDispatchImpl extends IDispatch {
015                    @Override
016                    public int GetIDsOfNames(Pointer riid,
017                                    Pointer<Pointer<Character>> rgszNames, int cNames,
018                                    int lcid, Pointer<Integer> rgDispId) {
019                            
020                            // TODO
021                            return COMRuntime.E_NOTIMPL;
022                    }
023                    @Override
024                    public int Invoke(int dispIdMember, Pointer<Byte> riid, int lcid,
025                                    short wFlags, Pointer<DISPPARAMS> pDispParams,
026                                    Pointer<VARIANT> pVarResult, Pointer<EXCEPINFO> pExcepInfo,
027                                    Pointer<Integer> puArgErr) {
028                            
029                            // TODO
030                            return COMRuntime.E_NOTIMPL;
031                    }
032                    @Override
033                    public int GetTypeInfo(int iTInfo, int lcid,
034                                    Pointer<Pointer<ITypeInfo>> ppTInfo) {
035                            // TODO
036                            return COMRuntime.E_NOTIMPL;
037                    }
038                    @Override
039                    public int GetTypeInfoCount(Pointer<Integer> pctinfo) {
040                            // TODO
041                            return COMRuntime.E_NOTIMPL;
042                    }
043    //      }
044    }