Но хочу заметить, что regsvr42 не всегда корректно срабатывает. Он перехватывает вызовы winapi функций работы с реестром (Reg*). И если компонент регистрируется каким-то "нестандартным" способом, результирующий файл приходится поправлять вручную на основе IDL http://msdn.microsoft.com/en-us/library … 85%29.aspx, содержащегося с файле компонента (*.dll, *.ocx). Выглядит это обычно так, пример
// Generated .IDL/C++ pseudo source equivalent of Win32 type library ..\<Unknown>
[
uuid({10770BEB-5AFA-4851-B68E-EE891F3DEE7F}),
version(1.0)
]
library LITEXLib
{
// Forward references and typedefs
dispinterface ILiteConnection;
interface ILiteConnectionPrivate;
dispinterface ILiteBusy;
dispinterface ILiteProgress;
dispinterface ILiteStatement;
dispinterface ILiteRows;
dispinterface ILiteColumns;
dispinterface ILiteColumn;
dispinterface ILiteRow;
dispinterface ILiteParameters;
dispinterface ILiteParameter;
dispinterface ILargeInteger;
[
uuid({3E22694D-7B92-42A1-89A7-668E2F7AA107})
]
coclass LiteConnection
{
[default] dispinterface ILiteConnection;
interface ILiteConnectionPrivate;
[source] dispinterface ILiteBusy;
[default, source] dispinterface ILiteProgress;
};
[
uuid({7ADFDFCF-8B4E-42A2-B458-3CA6F2DB7FE4})
]
dispinterface ILiteConnection
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7), propget] VARIANT Version([in] boolean bString);
[id(8), propget] BSTR Path();
[id(9), propput] void Path([in] BSTR rhs);
[id(10)] void Open([in] BSTR bsPath);
[id(11)] void Close();
[id(12)] IDispatch* Prepare([in] BSTR bsCommand);
[id(13), vararg] VARIANT Execute(
[in] BSTR bsCommand,
[in, optional] SAFEARRAY(VARIANT)* params);
[id(14), propget] long Changes();
[id(15), propget] VARIANT LastInsertRowid();
[id(16)] void OpenInMemory();
[id(17)] void BatchExecute([in] BSTR bsSql);
[id(18), propget] long ProgressPeriod();
[id(19), propput] void ProgressPeriod([in] long rhs);
[id(20)] void Interrupt();
};
[
odl,
uuid({7ADFDFCF-8B4E-42A2-B458-3CA6F2DB7FE3})
]
interface ILiteConnectionPrivate : IUnknown
{
HRESULT _stdcall GetDB([out, retval] void** pDB);
};
[
uuid({E3481F74-CB68-4D47-9F69-99D256089569}),
helpstring("Return VARIANT_TRUE to continue or VARIANT_FALSE to abort.")
]
dispinterface ILiteBusy
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7)] boolean Busy([in] long nTimes);
};
[
uuid({E3481F74-CB68-4D47-9F69-99D256089570}),
helpstring("Return VARIANT_TRUE to continue or VARIANT_FALSE to abort.")
]
dispinterface ILiteProgress
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7)] boolean Progress();
};
[
uuid({453A51CC-F944-4643-9540-A78253B8019C})
]
coclass LiteStatement
{
[default] dispinterface ILiteStatement;
};
[
uuid({AD13FFC0-BA5D-4B6C-ACBF-D1C44D0DA9B5})
]
dispinterface ILiteStatement
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7), propget] IDispatch* ActiveConnection();
[id(8), propput] void ActiveConnection([in] IDispatch* rhs);
[id(9), propget] BSTR CommandText();
[id(10), propput] void CommandText([in] BSTR rhs);
[id(11)] void Prepare([in] BSTR bsCommand);
[id(12)] void BindParameter(
[in] VARIANT idx,
[in] VARIANT vValue,
[in] _LxTypeEnum eType);
[id(13), propget] long ColumnCount();
[id(14), propget] BSTR ColumnName([in] long nColumn);
[id(15), propget] _LxTypeEnum ColumnType([in] VARIANT idx);
[id(16), propget] VARIANT ColumnValue(
[in] VARIANT idx,
[in] _LxTypeEnum eType);
[id(17)] boolean Step([in] long nSteps);
[id(18)] void Close();
[id(19)] void Reset();
[id(20), propget] _LxStateEnum State();
[id(21), propget] boolean Done();
[id(22), propget] long ParameterCount();
[id(23), propget] BSTR ParameterName([in] long nIndex);
[id(24), propget] VARIANT Row([in] _LxRowEnum eMode);
[id(25), propget] VARIANT RowCount();
[id(26), vararg] void BindParameters([in, optional] SAFEARRAY(VARIANT)* params);
[id(27)] void Execute();
[id(28), propget] IDispatch* Rows(
[in] boolean bStatic,
[in] long nMaxRecords);
[id(29), propget] IDispatch* Columns();
[id(30), propget] IDispatch* Parameters();
};
typedef enum
{
lxUnknown = -1,
lxNull = 0,
lxInteger = 1,
lxLongInteger = 2,
lxFloat = 3,
lxString = 4,
lxBinary = 5,
lxDate = 6
} _LxTypeEnum;
typedef enum
{
lxCreated = 0,
lxPrepared = 1,
lxExecuted = 2
} _LxStateEnum;
typedef enum
{
lxDefault = 0,
lxArray = 1,
lxCollection = 2
} _LxRowEnum;
[
uuid({5AD25519-5946-420F-B068-BCCC3856363D})
]
coclass LiteRows
{
[default] dispinterface ILiteRows;
};
[
uuid({6A33FE52-8122-4494-A74A-9C7A04D637A4})
]
dispinterface ILiteRows
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7), propget, restricted] IUnknown* _NewEnum();
[id(8), propget] VARIANT Count();
[id(9), propget] IDispatch* Item([in] long nIndex);
};
[
uuid({048DC1D9-E121-481C-8DFF-BC797993F2EC})
]
coclass LiteColumns
{
[default] dispinterface ILiteColumns;
};
[
uuid({4D4E89EB-4BCC-4647-8D0B-A6D7F627CA3D})
]
dispinterface ILiteColumns
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7), propget, restricted] IUnknown* _NewEnum();
[id(8), propget] IDispatch* Item([in] VARIANT vIndex);
[id(9), propget] long Count();
};
[
uuid({10338227-2DC2-4A37-AF40-E5BF89FF4F10})
]
coclass LiteColumn
{
[default] dispinterface ILiteColumn;
};
[
uuid({56B3DD01-7CE3-4590-BFD4-856DEC9E3E85})
]
dispinterface ILiteColumn
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7), propget] long Index();
[id(8), propget] BSTR Value();
};
[
uuid({98FADC8F-1348-4EBD-B104-6D7CA93C8DEC})
]
coclass LiteRow
{
[default] dispinterface ILiteRow;
};
[
uuid({7A107497-5F9C-45D6-994B-FB2F8E802E84})
]
dispinterface ILiteRow
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7), propget] VARIANT Value();
[id(8), propget, restricted] IUnknown* _NewEnum();
[id(9), propget] VARIANT Item(
[in] long nIndex,
[in] _LxTypeEnum eType);
[id(10), propget] long Count();
};
[
uuid({7BAB4761-C1FA-458A-8993-F9667DF51F32})
]
coclass LiteParameters
{
[default] dispinterface ILiteParameters;
};
[
uuid({08B1A162-3DE5-47D4-9992-964281640F2F})
]
dispinterface ILiteParameters
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7), propget, restricted] IUnknown* _NewEnum();
[id(8), propget] IDispatch* Item(VARIANT vIndex);
[id(9), propget] long Count();
[id(10)] void Bind([in] SAFEARRAY(VARIANT)* params);
};
[
uuid({0100C8E3-E467-4944-825D-7089A6EEC1B2})
]
coclass LiteParameter
{
[default] dispinterface ILiteParameter;
};
[
uuid({820D6CD0-98E2-496B-B01A-D3C4EB3F92C9})
]
dispinterface ILiteParameter
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7), propget] long Index();
[id(8), propget] BSTR Name();
[id(9)] void Bind(
[in] VARIANT vValue,
[in] _LxTypeEnum eType);
};
[
uuid({25EE8E01-5237-41F1-B29F-6AF441CF0924}),
helpstring("LargeInteger Class")
]
coclass LargeInteger
{
[default] dispinterface ILargeInteger;
};
[
uuid({5E575221-737A-443A-9D64-13B79512D287})
]
dispinterface ILargeInteger
{
properties:
methods:
[id(0), restricted] void QueryInterface(
[in] GUID* riid,
[out] void** ppvObj);
[id(1), restricted] unsigned long AddRef();
[id(2), restricted] unsigned long Release();
[id(3), restricted] void GetTypeInfoCount([out] unsigned int* pctinfo);
[id(4), restricted] void GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[id(5), restricted] void GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[id(6), restricted] void Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
[id(7), propget] long LowPart();
[id(8), propput] void LowPart([in] long rhs);
[id(9), propget] long HighPart();
[id(10), propput] void HighPart([in] long rhs);
[id(11), propget] wchar_t QuadPart();
[id(12), propput] void QuadPart([in] wchar_t rhs);
[id(13), propget] CURRENCY QuadPartCy();
[id(14), propput] void QuadPartCy([in] CURRENCY rhs);
[id(15), propget] wchar_t MAX_VALUE();
[id(16), propget] wchar_t MIN_VALUE();
[id(17), propget] CURRENCY MIN_VALUE_CY();
[id(18), propget] CURRENCY MAX_VALUE_CY();
};
};