DatastoreManager.GetPlatform Method

Gets a platform object that corresponds to the specified platform ID.

Namespace:  Microsoft.SmartDevice.Connectivity
Assembly:  Microsoft.SmartDevice.Connectivity (in Microsoft.SmartDevice.Connectivity.dll)

Syntax

'Declaration
Public Function GetPlatform ( _
    platformId As ObjectId _
) As Platform
'Usage
Dim instance As DatastoreManager 
Dim platformId As ObjectId 
Dim returnValue As Platform 

returnValue = instance.GetPlatform(platformId)
public Platform GetPlatform(
    ObjectId platformId
)
public:
Platform^ GetPlatform(
    ObjectId^ platformId
)
public function GetPlatform(
    platformId : ObjectId
) : Platform

Parameters

Return Value

Type: Microsoft.SmartDevice.Connectivity.Platform
The platform with the specified platform ID.

Exceptions

Exception Condition
ArgumentNullException

The input string is nulla null reference (Nothing in Visual Basic).

PlatformNotFoundException

The given platform is not found in the list of platforms registered with the Datastore.

Examples

' Get the Windows Mobile 5.0 Smartphone platform 
Dim wm5sp As New ObjectId(New Guid("BD0CC567-F6FD-4ca3-99D2-063EFDFC0A39"))
Dim p As Platform = dsmgr.GetPlatform(wm5sp)

' Output information
Console.WriteLine(vbCr + vbLf + vbCr + vbLf + _
                  "Get the WM5 Smartphone platform using the GetPlatform method: " + _
                  vbCr + vbLf)
Console.WriteLine("Platform Name: " + p.Name + "    ID: " + p.Id.ToString())
// Get the Windows Mobile 5.0 Smartphone platform
ObjectId wm5sp = new ObjectId(new Guid("BD0CC567-F6FD-4ca3-99D2-063EFDFC0A39"));
Platform p = dsmgr.GetPlatform(wm5sp);

// Output information
Console.WriteLine("\r\n\r\nGet the WM5 Smartphone platform using the GetPlatform method: \r\n");
Console.WriteLine("Platform Name: " + p.Name + "    ID: " + p.Id);

.NET Framework Security

See Also

Reference

DatastoreManager Class

DatastoreManager Members

Microsoft.SmartDevice.Connectivity Namespace