Convert TSharedPtr to another TSharedPtr which subclasses the main one

IOnlineSubsystem* Subsystem = Online::GetSubsystem(GetWorld(), HVS_SUBSYSTEM);
IOnlineSessionPtr OnlineSession = Subsystem->GetSessionInterface();
FOnlineSessionHVSPtr OnlineSessionHVS = StaticCastSharedPtr(OnlineSession);

How do I do this?

It keeps saying:
error C2440: ‘initializing’: cannot convert from ‘TSharedPtr’ to ‘FOnlineSessionHVS’

FOnlineSessionHVSPtr is a typedef:
typedef TSharedPtr FOnlineSessionHVSPtr;