cpp_quote("#ifndef _MD_IMD_") cpp_quote("#define _MD_IMD_") import "unknwn.idl"; import "wtypes.idl"; import "objidl.idl"; import "ocidl.idl"; import "mddef.idl"; cpp_quote("/* ") cpp_quote("The Main Interface ") cpp_quote("*/ ") #define METADATA_MAX_NAME_LEN 256 cpp_quote("DEFINE_GUID(CLSID_MDCOM, 0xba4e57f0, 0xfab6, 0x11cf, 0x9d, 0x1a, 0x0, 0xaa, 0x0, 0xa7, 0xd, 0x51);") cpp_quote("DEFINE_GUID(IID_IMDCOM, 0xc1aa48c0, 0xfacc, 0x11cf, 0x9d, 0x1a, 0x0, 0xaa, 0x0, 0xa7, 0xd, 0x51);") cpp_quote("DEFINE_GUID(IID_NSECOM, 0x4810a750, 0x4318, 0x11d0, 0xa5, 0xc8, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x52);") cpp_quote("DEFINE_GUID(CLSID_NSEPMCOM, 0x05dc3bb0, 0x4337, 0x11d0, 0xa5, 0xc8, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x52);") cpp_quote("DEFINE_GUID(CLSID_MDCOMEXE, 0xba4e57f1, 0xfab6, 0x11cf, 0x9d, 0x1a, 0x0, 0xaa, 0x0, 0xa7, 0xd, 0x51);") cpp_quote("DEFINE_GUID(CLSID_MDPCOM, 0xf1e08563, 0x1598, 0x11d1, 0x9d, 0x77, 0x0, 0xc0, 0x4f, 0xd7, 0xbf, 0x3e);") //cpp_quote("#define GETMDCLSID(IsService) ((IsService) ? CLSID_MDCOM : CLSID_MDCOMEXE)") cpp_quote("#define GETMDCLSID(IsService) CLSID_MDCOM") cpp_quote("#define GETMDPCLSID(IsService) CLSID_MDPCOM") #ifdef UNICODE cpp_quote("#define IID_IMDCOMSINK IID_IMDCOMSINK_W") #else cpp_quote("#define IID_IMDCOMSINK IID_IMDCOMSINK_A") #endif cpp_quote("DEFINE_GUID(IID_IMDCOMSINK_A, 0x5229ea36, 0x1bdf, 0x11d0, 0x9d, 0x1c, 0x0, 0xaa, 0x0, 0xa7, 0xd, 0x51);") cpp_quote("DEFINE_GUID(IID_IMDCOMSINK_W, 0x6906ee20, 0xb69f, 0x11d0, 0xb9, 0xb9, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);") [object, uuid(C1AA48C0-FACC-11cf-9D1A-00AA00A70D51), pointer_default(unique)] interface IMDCOM : IUnknown { // Interfaces HRESULT ComMDInitialize(); HRESULT ComMDTerminate([in] BOOL bSaveData); HRESULT ComMDShutdown(); HRESULT ComMDAddMetaObjectA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath); HRESULT ComMDAddMetaObjectW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath); HRESULT ComMDDeleteMetaObjectA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath); HRESULT ComMDDeleteMetaObjectW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath); HRESULT ComMDDeleteChildMetaObjectsA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath); HRESULT ComMDDeleteChildMetaObjectsW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath); HRESULT ComMDEnumMetaObjectsA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [out, size_is(METADATA_MAX_NAME_LEN)] unsigned char *pszMDName, [in] DWORD dwMDEnumObjectIndex); HRESULT ComMDEnumMetaObjectsW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [out, size_is(METADATA_MAX_NAME_LEN)] LPWSTR pszMDName, [in] DWORD dwMDEnumObjectIndex); HRESULT ComMDCopyMetaObjectA([in] METADATA_HANDLE hMDSourceHandle, [unique, in, string] unsigned char *pszMDSourcePath, [in] METADATA_HANDLE hMDDestHandle, [unique, in, string] unsigned char *pszMDDestPath, [in] BOOL bMDOverwriteFlag, [in] BOOL bMDCopyFlag); HRESULT ComMDCopyMetaObjectW([in] METADATA_HANDLE hMDSourceHandle, [unique, in, string] LPCWSTR pszMDSourcePath, [in] METADATA_HANDLE hMDDestHandle, [unique, in, string] LPCWSTR pszMDDestPath, [in] BOOL bMDOverwriteFlag, [in] BOOL bMDCopyFlag); HRESULT ComMDRenameMetaObjectA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [unique, in, string] unsigned char *pszMDNewName); HRESULT ComMDRenameMetaObjectW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [unique, in, string] LPCWSTR pszMDNewName); HRESULT ComMDSetMetaDataA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [in] PMETADATA_RECORD pmdrMDData); HRESULT ComMDSetMetaDataW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [in] PMETADATA_RECORD pmdrMDData); HRESULT ComMDGetMetaDataA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [in, out] PMETADATA_RECORD pmdrMDData, [out] DWORD *pdwMDRequiredDataLen); HRESULT ComMDGetMetaDataW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [in, out] PMETADATA_RECORD pmdrMDData, [out] DWORD *pdwMDRequiredDataLen); HRESULT ComMDDeleteMetaDataA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [in] DWORD dwMDIdentifier, [in] DWORD dwMDDataType); HRESULT ComMDDeleteMetaDataW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [in] DWORD dwMDIdentifier, [in] DWORD dwMDDataType); HRESULT ComMDEnumMetaDataA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [in, out] PMETADATA_RECORD pmdrMDData, [in] DWORD dwMDEnumDataIndex, [out] DWORD *pdwMDRequiredDataLen); HRESULT ComMDEnumMetaDataW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [in, out] PMETADATA_RECORD pmdrMDData, [in] DWORD dwMDEnumDataIndex, [out] DWORD *pdwMDRequiredDataLen); HRESULT ComMDGetAllMetaDataA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [in] DWORD dwMDAttributes, [in] DWORD dwMDUserType, [in] DWORD dwMDDataType, [out] DWORD *pdwMDNumDataEntries, [out] DWORD *pdwMDDataSetNumber, [in] DWORD dwMDBufferSize, [out, size_is(dwMDBufferSize)] unsigned char *pbBuffer, [out] DWORD *pdwMDRequiredBufferSize); HRESULT ComMDGetAllMetaDataW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [in] DWORD dwMDAttributes, [in] DWORD dwMDUserType, [in] DWORD dwMDDataType, [out] DWORD *pdwMDNumDataEntries, [out] DWORD *pdwMDDataSetNumber, [in] DWORD dwMDBufferSize, [out, size_is(dwMDBufferSize)] unsigned char *pbBuffer, [out] DWORD *pdwMDRequiredBufferSize); HRESULT ComMDDeleteAllMetaDataA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [in] DWORD dwMDUserType, [in] DWORD dwMDDataType); HRESULT ComMDDeleteAllMetaDataW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [in] DWORD dwMDUserType, [in] DWORD dwMDDataType); HRESULT ComMDCopyMetaDataA([in] METADATA_HANDLE hMDSourceHandle, [unique, in, string] unsigned char *pszMDSourcePath, [in] METADATA_HANDLE hMDDestHandle, [unique, in, string] unsigned char *pszMDDestPath, [in] DWORD dwMDAttributes, [in] DWORD dwMDUserType, [in] DWORD dwMDDataType, [in] BOOL bMDCopyFlag); HRESULT ComMDCopyMetaDataW([in] METADATA_HANDLE hMDSourceHandle, [unique, in, string] LPCWSTR pszMDSourcePath, [in] METADATA_HANDLE hMDDestHandle, [unique, in, string] LPCWSTR pszMDDestPath, [in] DWORD dwMDAttributes, [in] DWORD dwMDUserType, [in] DWORD dwMDDataType, [in] BOOL bMDCopyFlag); HRESULT ComMDOpenMetaObjectA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [in] DWORD dwMDAccessRequested, [in] DWORD dwMDTimeOut, [out] PMETADATA_HANDLE phMDNewHandle); HRESULT ComMDOpenMetaObjectW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [in] DWORD dwMDAccessRequested, [in] DWORD dwMDTimeOut, [out] PMETADATA_HANDLE phMDNewHandle); HRESULT ComMDCloseMetaObject([in] METADATA_HANDLE hMDHandle); HRESULT ComMDChangePermissions([in] METADATA_HANDLE hMDHandle, [in] DWORD dwMDTimeOut, [in] DWORD dwMDAccessRequested); HRESULT ComMDSaveData(); HRESULT ComMDGetHandleInfo([in] METADATA_HANDLE hMDHandle, [out] PMETADATA_HANDLE_INFO pmdhiInfo); HRESULT ComMDGetSystemChangeNumber([out] DWORD *pdwSystemChangeNumber); HRESULT ComMDGetDataSetNumberA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [out] DWORD *pdwMDDataSetNumber); HRESULT ComMDGetDataSetNumberW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [out] DWORD *pdwMDDataSetNumber); HRESULT ComMDAddRefReferenceData([in] DWORD dwMDDataTag); HRESULT ComMDReleaseReferenceData([in] DWORD dwMDDataTag); HRESULT ComMDSetLastChangeTimeA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [in] PFILETIME pftMDLastChangeTime); HRESULT ComMDSetLastChangeTimeW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [in] PFILETIME pftMDLastChangeTime); HRESULT ComMDGetLastChangeTimeA([in] METADATA_HANDLE hMDHandle, [unique, in, string] unsigned char *pszMDPath, [out] PFILETIME pftMDLastChangeTime); HRESULT ComMDGetLastChangeTimeW([in] METADATA_HANDLE hMDHandle, [unique, in, string] LPCWSTR pszMDPath, [out] PFILETIME pftMDLastChangeTime); }; cpp_quote("/* ") cpp_quote("The Callback Interface - Clients that need to receive callbacks need to provide ") cpp_quote(" an implementation of this interface and Advise the metadata server. ") cpp_quote("*/ ") #ifdef UNICODE cpp_quote("#define IMDCOMSINK IMDCOMSINKW") #else cpp_quote("#define IMDCOMSINK IMDCOMSINKA") #endif [object, uuid(5229EA36-1BDF-11d0-9D1C-00AA00A70D51), pointer_default(unique)] interface IMDCOMSINKA:IUnknown { HRESULT ComMDSinkNotify([in] METADATA_HANDLE hMDHandle, [in] DWORD dwMDNumElements, [in, size_is(dwMDNumElements)] MD_CHANGE_OBJECT_A pcoChangeList[]); } [object, uuid(6906EE20-B69F-11d0-B9B9-00A0C922E750), pointer_default(unique)] interface IMDCOMSINKW:IUnknown { HRESULT ComMDSinkNotify([in] METADATA_HANDLE hMDHandle, [in] DWORD dwMDNumElements, [in, size_is(dwMDNumElements)] MD_CHANGE_OBJECT_W pcoChangeList[]); } // UNICODE DEFINITIONS cpp_quote(" ") cpp_quote("#ifdef UNICODE ") cpp_quote(" ") cpp_quote("#define ComMDAddMetaObject ComMDAddMetaObjectW ") cpp_quote("#define ComMDDeleteMetaObject ComMDDeleteMetaObjectW ") cpp_quote("#define ComMDDeleteChildMetaObjects ComMDDeleteChildMetaObjectsW ") cpp_quote("#define ComMDEnumMetaObjects ComMDEnumMetaObjectsW ") cpp_quote("#define ComMDCopyMetaObject ComMDCopyMetaObjectW ") cpp_quote("#define ComMDRenameMetaObject ComMDRenameMetaObjectW ") cpp_quote("#define ComMDSetMetaData ComMDSetMetaDataW ") cpp_quote("#define ComMDGetMetaData ComMDGetMetaDataW ") cpp_quote("#define ComMDDeleteMetaData ComMDDeleteMetaDataW ") cpp_quote("#define ComMDEnumMetaData ComMDEnumMetaDataW ") cpp_quote("#define ComMDGetAllMetaData ComMDGetAllMetaDataW ") cpp_quote("#define ComMDDeleteAllMetaData ComMDDeleteAllMetaDataW ") cpp_quote("#define ComMDCopyMetaData ComMDCopyMetaDataW ") cpp_quote("#define ComMDOpenMetaObject ComMDOpenMetaObjectW ") cpp_quote("#define ComMDGetDataSetNumber ComMDGetDataSetNumberW ") cpp_quote("#define ComMDSetLastChangeTime ComMDSetLastChangeTimeW ") cpp_quote("#define ComMDGetLastChangeTime ComMDGetLastChangeTimeW ") cpp_quote(" ") cpp_quote("#else // Not UNICODE ") cpp_quote(" ") cpp_quote("#define ComMDAddMetaObject ComMDAddMetaObjectA ") cpp_quote("#define ComMDDeleteMetaObject ComMDDeleteMetaObjectA ") cpp_quote("#define ComMDDeleteChildMetaObjects ComMDDeleteChildMetaObjectsA ") cpp_quote("#define ComMDEnumMetaObjects ComMDEnumMetaObjectsA ") cpp_quote("#define ComMDCopyMetaObject ComMDCopyMetaObjectA ") cpp_quote("#define ComMDRenameMetaObject ComMDRenameMetaObjectA ") cpp_quote("#define ComMDSetMetaData ComMDSetMetaDataA ") cpp_quote("#define ComMDGetMetaData ComMDGetMetaDataA ") cpp_quote("#define ComMDDeleteMetaData ComMDDeleteMetaDataA ") cpp_quote("#define ComMDEnumMetaData ComMDEnumMetaDataA ") cpp_quote("#define ComMDGetAllMetaData ComMDGetAllMetaDataA ") cpp_quote("#define ComMDDeleteAllMetaData ComMDDeleteAllMetaDataA ") cpp_quote("#define ComMDCopyMetaData ComMDCopyMetaDataA ") cpp_quote("#define ComMDOpenMetaObject ComMDOpenMetaObjectA ") cpp_quote("#define ComMDGetDataSetNumber ComMDGetDataSetNumberA ") cpp_quote("#define ComMDSetLastChangeTime ComMDSetLastChangeTimeA ") cpp_quote("#define ComMDGetLastChangeTime ComMDGetLastChangeTimeA ") cpp_quote(" ") cpp_quote("#endif //UNICODE ") cpp_quote(" ") cpp_quote("#endif")