IDL file generated by ATL wizards. All I did was add the Test method.
// TestIDL.idl : IDL source for TestIDL
//
// This file will be processed by the MIDL tool to
// produce the type library (TestIDL.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(58b7154c-9a1f-42ae-9df3-a137ffa37420),
dual,
nonextensible,
pointer_default(unique)
]
interface ITest : IDispatch
{
[id(1)] HRESULT Test([in] LONG_PTR x, [out, retval] LONG_PTR *p);
};
[
uuid(479c8a97-9e62-45c1-915d-9472dcfa2e06),
version(1.0),
]
library TestIDLLib
{
importlib("stdole2.tlb");
[
uuid(e692375c-f763-4ea2-beb1-3667da07393f)
]
coclass Test
{
[default] interface ITest;
};
};
import "shobjidl.idl";
Header from 32-bit MIDL compile -
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 8.01.0622 */
/* at Mon Jan 18 22:14:07 2038
*/
/* Compiler settings for TestIDL.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __TestIDL_i_h__
#define __TestIDL_i_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __ITest_FWD_DEFINED__
#define __ITest_FWD_DEFINED__
typedef interface ITest ITest;
#endif /* __ITest_FWD_DEFINED__ */
#ifndef __Test_FWD_DEFINED__
#define __Test_FWD_DEFINED__
#ifdef __cplusplus
typedef class Test Test;
#else
typedef struct Test Test;
#endif /* __cplusplus */
#endif /* __Test_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#include "shobjidl.h"
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __ITest_INTERFACE_DEFINED__
#define __ITest_INTERFACE_DEFINED__
/* interface ITest */
/* [unique][nonextensible][dual][uuid][object] */
EXTERN_C const IID IID_ITest;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("58b7154c-9a1f-42ae-9df3-a137ffa37420")
ITest : public IDispatch
{
public:
virtual /* [id] */ HRESULT STDMETHODCALLTYPE Test(
/* [in] */ LONG_PTR x,
/* [retval][out] */ LONG_PTR *p) = 0;
};
#else /* C style interface */
typedef struct ITestVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ITest * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
ITest * This);
ULONG ( STDMETHODCALLTYPE *Release )(
ITest * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
ITest * This,
/* [out] */ UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
ITest * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
ITest * This,
/* [in] */ REFIID riid,
/* [size_is][in] */ LPOLESTR *rgszNames,
/* [range][in] */ UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
ITest * This,
/* [annotation][in] */
_In_ DISPID dispIdMember,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][in] */
_In_ LCID lcid,
/* [annotation][in] */
_In_ WORD wFlags,
/* [annotation][out][in] */
_In_ DISPPARAMS *pDispParams,
/* [annotation][out] */
_Out_opt_ VARIANT *pVarResult,
/* [annotation][out] */
_Out_opt_ EXCEPINFO *pExcepInfo,
/* [annotation][out] */
_Out_opt_ UINT *puArgErr);
/* [id] */ HRESULT ( STDMETHODCALLTYPE *Test )(
ITest * This,
/* [in] */ LONG_PTR x,
/* [retval][out] */ LONG_PTR *p);
END_INTERFACE
} ITestVtbl;
interface ITest
{
CONST_VTBL struct ITestVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ITest_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ITest_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ITest_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ITest_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define ITest_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define ITest_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define ITest_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define ITest_Test(This,x,p) \
( (This)->lpVtbl -> Test(This,x,p) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ITest_INTERFACE_DEFINED__ */
#ifndef __TestIDLLib_LIBRARY_DEFINED__
#define __TestIDLLib_LIBRARY_DEFINED__
/* library TestIDLLib */
/* [version][uuid] */
EXTERN_C const IID LIBID_TestIDLLib;
EXTERN_C const CLSID CLSID_Test;
#ifdef __cplusplus
class DECLSPEC_UUID("e692375c-f763-4ea2-beb1-3667da07393f")
Test;
#endif
#endif /* __TestIDLLib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif
Header form 64-bit MIDL compile -
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 8.01.0622 */
/* at Mon Jan 18 22:14:07 2038
*/
/* Compiler settings for TestIDL.idl:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
protocol : all , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __TestIDL_i_h__
#define __TestIDL_i_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __ITest_FWD_DEFINED__
#define __ITest_FWD_DEFINED__
typedef interface ITest ITest;
#endif /* __ITest_FWD_DEFINED__ */
#ifndef __Test_FWD_DEFINED__
#define __Test_FWD_DEFINED__
#ifdef __cplusplus
typedef class Test Test;
#else
typedef struct Test Test;
#endif /* __cplusplus */
#endif /* __Test_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#include "shobjidl.h"
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __ITest_INTERFACE_DEFINED__
#define __ITest_INTERFACE_DEFINED__
/* interface ITest */
/* [unique][nonextensible][dual][uuid][object] */
EXTERN_C const IID IID_ITest;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("58b7154c-9a1f-42ae-9df3-a137ffa37420")
ITest : public IDispatch
{
public:
virtual /* [id] */ HRESULT STDMETHODCALLTYPE Test(
/* [in] */ LONG_PTR x,
/* [retval][out] */ LONG_PTR *p) = 0;
};
#else /* C style interface */
typedef struct ITestVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ITest * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
ITest * This);
ULONG ( STDMETHODCALLTYPE *Release )(
ITest * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
ITest * This,
/* [out] */ UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
ITest * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
ITest * This,
/* [in] */ REFIID riid,
/* [size_is][in] */ LPOLESTR *rgszNames,
/* [range][in] */ UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
ITest * This,
/* [annotation][in] */
_In_ DISPID dispIdMember,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][in] */
_In_ LCID lcid,
/* [annotation][in] */
_In_ WORD wFlags,
/* [annotation][out][in] */
_In_ DISPPARAMS *pDispParams,
/* [annotation][out] */
_Out_opt_ VARIANT *pVarResult,
/* [annotation][out] */
_Out_opt_ EXCEPINFO *pExcepInfo,
/* [annotation][out] */
_Out_opt_ UINT *puArgErr);
/* [id] */ HRESULT ( STDMETHODCALLTYPE *Test )(
ITest * This,
/* [in] */ LONG_PTR x,
/* [retval][out] */ LONG_PTR *p);
END_INTERFACE
} ITestVtbl;
interface ITest
{
CONST_VTBL struct ITestVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ITest_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ITest_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ITest_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ITest_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define ITest_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define ITest_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define ITest_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define ITest_Test(This,x,p) \
( (This)->lpVtbl -> Test(This,x,p) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ITest_INTERFACE_DEFINED__ */
#ifndef __TestIDLLib_LIBRARY_DEFINED__
#define __TestIDLLib_LIBRARY_DEFINED__
/* library TestIDLLib */
/* [version][uuid] */
EXTERN_C const IID LIBID_TestIDLLib;
EXTERN_C const CLSID CLSID_Test;
#ifdef __cplusplus
class DECLSPEC_UUID("e692375c-f763-4ea2-beb1-3667da07393f")
Test;
#endif
#endif /* __TestIDLLib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif