I am new to COM and C#. What I am trying to do is rewriting the following source in C#:
typedef interface IARPUninstallStringLauncher IARPUninstallStringLauncher;
typedef struct IARPUninstallStringLauncherVtbl {
BEGIN_INTERFACE
HRESULT(STDMETHODCALLTYPE *QueryInterface)(
__RPC__in IARPUninstallStringLauncher * This,
__RPC__in REFIID riid,
_COM_Outptr_ void **ppvObject);
ULONG(STDMETHODCALLTYPE *AddRef)(
__RPC__in IARPUninstallStringLauncher * This);
ULONG(STDMETHODCALLTYPE *Release)(
__RPC__in IARPUninstallStringLauncher * This);
HRESULT(STDMETHODCALLTYPE *LaunchUninstallStringAndWait)(
__RPC__in IARPUninstallStringLauncher * This,
_In_ HKEY hKey,
_In_ LPCOLESTR Item,
_In_ BOOL bModify,
_In_ HWND hWnd);
HRESULT(STDMETHODCALLTYPE *RemoveBrokenItemFromInstalledProgramsList)(
__RPC__in IARPUninstallStringLauncher * This,
_In_ HKEY hKey,
_In_ LPCOLESTR Item);
END_INTERFACE
} *PIARPUninstallStringLauncherVtbl;
interface IARPUninstallStringLauncher
{
CONST_VTBL struct IARPUninstallStringLauncherVtbl *lpVtbl;
};
From what I understood he reversed functions in this interface and created a structure so that he can reach to address of this virtual function.
Functions in this COM is not viewable in OLEVIEW and also I can't import it in VisualStudio.
My question is that it is possible to write it in C#?