IUnknow base vptr meory is getting lost

Mrutyunjaya Mahapatra 1 Reputation point
2021-05-23T15:10:02.743+00:00

I have one project where I am creating one COM component. I am trying to get pointer to interface which is derived from IUnknown and After 10/15 mins of getting pointer to interface, Base interface (Iunknown ) Vptr memory locations are getting lost/

class ATL_NO_VTABLE CIndustrial_IT_HistoryHandler :
public CClientHelper,
public CComCoClass<CIndustrial_IT_HistoryHandler, &CLSID_Industrial_IT_HistoryHandler>,
public IIndustrial_IT_HistoryHandler,
public IConnectionPointContainerImpl<CIndustrial_IT_HistoryHandler>,
public CProxy_IIndustrial_IT_HistoryHandlerEvents<CIndustrial_IT_HistoryHandler>
{
.....

}

I am trying to get pointer to IIndustrial_IT_HistoryHandler which is derived from IUnknown . After 10/15 mins Iunknown vptr memory locations, means vptr[0], vptr[1], vptr[2] memory locations are getting lost

Can anybody please suggest How can I track in runtime how is it getting lost ?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,501 questions
Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
697 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Mrutyunjaya Mahapatra 1 Reputation point
    2021-05-24T11:08:25.89+00:00

    This is during initialization...

    99116-untitled.png

    After 10/15 mins / Crash..
    99057-untitled1.png

    0 comments No comments

  2. RLWA32 42,551 Reputation points
    2021-05-24T11:20:53.397+00:00

    The posted images indicate that hsHistSvcInterfaces.dll has been unloaded. That would be the source of your "missing" vptr entries. You need to debug some more to find out why this problem has occurred.

    Update:
    It also seems wrong that before the dll is unloaded the IUnknown vtable entries point to hsHistSvcInterfaces!DllUnregisterServer instead of to QueryInterface, AddRef and Release.

    99110-vptr.png