Serial port and GPS

Clip.idlistfn Method 

Translates Shell IDList Array into a filename.

[Visual Basic]
Private Shared Function idlistfn( _
   ByVal aData As MemoryStream _
) As String
[C#]
private static string idlistfn(
   MemoryStream aData
);

Parameters

aData
The data as coming for the clipboard data of type Shell IDList Array. The first 32 bit integer is assumed to be the number of items in the list, the second 32 bit integer is assumed to be a pointer to an identifier of the basis path, the 3rd and next 32 bit integers are pointers to intentifiers of next list elements, ignored in this implementation.

Return Value

The contents of the clipboard as string. Null if the clipboard is empty or on any kind of errors.

Remarks

Simplified idea borrowed from http://www.eggheadcafe.com/software/aspnet/31276866/getting-path-from-a-shell.aspx reads identifier of the first item in the given list and translates it to a path name using the API function SHGetPathFromIDList(). Unlike in the example above, this function doesn't use ILCombine and ILFree but assumes, that the list items already contain a a full path.

See Also

Clip Class | serial Namespace