Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/SimpleCOMRPC/Client/SimpleCOMRPCClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ int main(int argc, char* argv[])
printf("We do not have a clock interface, so we can not get the time\n");
}
else {
printf("The Ticker is at: %llu\n", clock->Now());
printf("The Ticker is at: %lu\n", clock->Now());
}
break;
case 'T':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ namespace Plugin {
return (_parent == nullptr ? 0 : result.Ticks());
}

void SimpleCOMRPCPluginServer::OnRevoke(const Exchange::IWallClock::ICallback* remote) {
void SimpleCOMRPCPluginServer::OnInterfaceDangling(const Exchange::IWallClock::ICallback* remote)
{
// Looks like we need to stop the callback from being called, it is a dead object now anyway :-)
TRACE(Trace::Information, (_T("Revoking a callback, it will not fire anymore")));
TRACE(Trace::Information, (_T("Callback is dangling, disarming it so it will not fire anymore")));
_notifier.Disarm(remote);
}

Expand Down
11 changes: 3 additions & 8 deletions examples/SimpleCOMRPC/PluginServer/SimpleCOMRPCPluginServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ namespace Plugin {

void Dangling(const Core::IUnknown* remote, const uint32_t interfaceId) override
{
//not interested in this notification
TRACE(Trace::Information, (_T("Cleanup an interface: %d [%X] on object: [%s]"), interfaceId, interfaceId, typeid(*remote).name()));
}
void Revoked(const Core::IUnknown* remote, const uint32_t interfaceId) override
{
TRACE(Trace::Information, (_T("Revoking an interface: %d [%X] on object: [%s]"), interfaceId, interfaceId, typeid(*remote).name()));
TRACE(Trace::Information, (_T("Dangling interface: %d [%X] on object: [%s]"), interfaceId, interfaceId, typeid(*remote).name()));

// Something happened to the other side
ASSERT(interfaceId != Exchange::ID_WALLCLOCK);
Expand All @@ -98,7 +93,7 @@ namespace Plugin {

ASSERT(result != nullptr);

_parent.OnRevoke(result);
_parent.OnInterfaceDangling(result);

// Do not forget to release the QI from a few lines above :-)
result->Release();
Expand Down Expand Up @@ -304,7 +299,7 @@ POP_WARNING()
virtual string Information() const;

private:
void OnRevoke(const Exchange::IWallClock::ICallback* remote);
void OnInterfaceDangling(const Exchange::IWallClock::ICallback* remote);

private:
WallClockNotifier _notifier;
Expand Down
Loading