Given the UNC path, for example \\server\share, is it possible to determine in some way using the Win32 API whether local and remote computers are connected using SMB or SMB2?
\\server\share
After recording paid support, the official Microsoft response is that this information is not displayed by the driver in Windows 7. In Windows 8, it is available using WMI and MSFT_SmbConnection or the PowerShell cmdlet Get-SmbConnection.
Get-SmbConnection
You may find the answer in the SMB2 specification.
SMB 2 3
... , SMB, ?
One of the easiest ways to search is to use network tracing using wirehark (on windows) or tcptrace / tcpdump on unix (where SMB works). The trace output should provide you with a version