0

In another question, someone explained how to get the method signatures for the DShellFolderViewEvents methods that are enumerated in the type library. I was wondering how to find out the signatures for other events that aren't included, namely DISPID_VIEWMODECHANGED and DISPID_CONTENTSCHANGED. Does anyone know how to figure out what they could be? Thanks for any help!

  • you can simply handle it (if you know how handle) direct inside *Invoke*. as example - https://stackoverflow.com/a/62095281/6401656 – RbMm Mar 13 '21 at 15:54
  • `DISPIP` generally refers to an [IDispatch](https://learn.microsoft.com/en-us/windows/win32/api/oaidl/nn-oaidl-idispatch) interface. – IInspectable Mar 13 '21 at 15:54
  • Thanks for the responses. But let's say you wanted to figure out what the actual signature is (perhaps because it might provide helpful information in the parameters). Is there a way to find out what the signature is? –  Mar 13 '21 at 15:56
  • `IDispatch::Invoke` will be called in all case at begin. then you can by self write code for *Invoke* or say write idl, create typelib from it and use standard *ITypeInfo* implementation // you by self already create signature. say declare function with no parameters for [id(DISPID_VIEWMODECHANGED )] in idl – RbMm Mar 13 '21 at 16:00
  • if you implement `DShellFolderViewEvents` - you need implement `IDispatch` interface on some self class. and you pass pointer to this `IDispatch`. and will be called your `IDispatch::Invoke` method. with `DISPID_VIEWMODECHANGED` for example. signature of `Invoke` is well known. how next - already your task. you can manually write all `Invoke` by self, of create typelib from idl, use `LoadTypeLibEx` and `GetTypeInfoOfGuid` for get `ITypeInfo* _pTI` and inside `IDispatch::Invoke` use `_pTI->Invoke(static_cast(this), dispIdMember, ...)`. in this case you by self can create signature – RbMm Mar 13 '21 at 16:18
  • 1
    how minimum always ok will be declare `[id(DISPID_VIEWMODECHANGED ), local] void OnViewModeChanged();` if exist parameters for `DISPID_VIEWMODECHANGED ` it simply will be ignored. however can first look inside invoke - what is in `DISPPARAMS` for create more exactly signature – RbMm Mar 13 '21 at 16:21
  • 1
    If you implement IDispatch you don't really care about "signature". It's late binding, so parameters if any are pushed to Invoke. You don't *need* to use them. Assume there are none, my experience shows they don't carry parameters. – Simon Mourier Mar 13 '21 at 17:03

0 Answers0