Class CommonNetworkRelativeLink
The CommonNetworkRelativeLink structure specifies information about the network location where a link target is stored, including the mapped drive letter and the UNC path prefix.
Inherited Members
Namespace: SharpShellLink.Structures
Assembly: SharpShellLink.dll
Syntax
public class CommonNetworkRelativeLink : Structure
Constructors
| Edit this page View SourceCommonNetworkRelativeLink()
Constructor
Declaration
public CommonNetworkRelativeLink()
Properties
| Edit this page View SourceCommonNetworkRelativeLinkFlags
CommonNetworkRelativeLinkFlags (4 bytes): Flags that specify the contents of the DeviceNameOffset and NetProviderType fields.
Declaration
public CommonNetworkRelativeLinkFlags CommonNetworkRelativeLinkFlags { get; }
Property Value
| Type | Description |
|---|---|
| CommonNetworkRelativeLinkFlags |
CommonNetworkRelativeLinkSize
CommonNetworkRelativeLinkSize (4 bytes): A 32-bit, unsigned integer that specifies the size, in bytes, of the CommonNetworkRelativeLink structure. This value MUST be greater than or equal to 0x00000014. All offsets specified in this structure MUST be less than this value, and all strings contained in this structure MUST fit within the extent defined by this size.
Declaration
public uint CommonNetworkRelativeLinkSize { get; }
Property Value
| Type | Description |
|---|---|
| uint |
DeviceName
DeviceName (variable): A NULL–terminated string, as defined by the system default code page, which specifies a device; for example, the drive letter "D:".
Declaration
public string DeviceName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DeviceNameOffset
DeviceNameOffset (4 bytes): A 32-bit, unsigned integer that specifies the location of the DeviceName field. If the ValidDevice flag is set, this value is an offset, in bytes, from the start of the CommonNetworkRelativeLink structure; otherwise, this value MUST be zero.
Declaration
public uint DeviceNameOffset { get; }
Property Value
| Type | Description |
|---|---|
| uint |
DeviceNameOffsetUnicode
DeviceNameOffsetUnicode (4 bytes): An optional, 32-bit, unsigned integer that specifies the location of the DeviceNameUnicode field. This value is an offset, in bytes, from the start of the CommonNetworkRelativeLink structure. This field MUST be present if the value of the NetNameOffset field is greater than 0x00000014; otherwise, this field MUST NOT be present.
Declaration
public uint DeviceNameOffsetUnicode { get; }
Property Value
| Type | Description |
|---|---|
| uint |
DeviceNameUnicode
DeviceNameUnicode (variable): An optional, NULL–terminated, Unicode string that is the Unicode version of the DeviceName string. This field MUST be present if the value of the NetNameOffset field is greater than 0x00000014; otherwise, this field MUST NOT be present.
Declaration
public string DeviceNameUnicode { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IsUnicode
When set to true, wide chars will be used
Declaration
public bool IsUnicode { get; }
Property Value
| Type | Description |
|---|---|
| bool |
MinimumBlockSize
headerBlockSize (4 bytes): A 32-bit, unsigned integer that specifies the size of the ExtraDataBlock structure.
Declaration
public override uint MinimumBlockSize { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Overrides
| Edit this page View SourceNetName
NetName (variable): A NULL–terminated string, as defined by the system default code page, which specifies a server share path; for example, "\server\share".
Declaration
public string NetName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
NetNameOffset
NetNameOffset (4 bytes): A 32-bit, unsigned integer that specifies the location of the NetName field. This value is an offset, in bytes, from the start of the CommonNetworkRelativeLink structure.
Declaration
public uint NetNameOffset { get; }
Property Value
| Type | Description |
|---|---|
| uint |
NetNameOffsetUnicode
NetNameOffsetUnicode (4 bytes): An optional, 32-bit, unsigned integer that specifies the location of the NetNameUnicode field. This value is an offset, in bytes, from the start of the CommonNetworkRelativeLink structure. This field MUST be present if the value of the NetNameOffset field is greater than 0x00000014; otherwise, this field MUST NOT be present.
Declaration
public uint NetNameOffsetUnicode { get; }
Property Value
| Type | Description |
|---|---|
| uint |
NetNameUnicode
NetNameUnicode (variable): An optional, NULL–terminated, Unicode string that is the Unicode version of the NetName string. This field MUST be present if the value of the NetNameOffset field is greater than 0x00000014; otherwise, this field MUST NOT be present.
Declaration
public string NetNameUnicode { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
NetworkProviderType
NetworkProviderType (4 bytes): A 32-bit, unsigned integer that specifies the type of network provider. If the ValidNetType flag is set, this value MUST be one of the following; otherwise, this value MUST be ignored.
Declaration
public NetworkProviderType NetworkProviderType { get; set; }
Property Value
| Type | Description |
|---|---|
| NetworkProviderType |
Methods
| Edit this page View SourceFromByteArray(byte[])
Create a CommonNetworkRelativeLink from a given byte array
Declaration
public static CommonNetworkRelativeLink FromByteArray(byte[] ba)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | ba | The byte array |
Returns
| Type | Description |
|---|---|
| CommonNetworkRelativeLink | A CommonNetworkRelativeLink object |
GetBytes()
Convert the Structure to a byte array
Declaration
public override byte[] GetBytes()
Returns
| Type | Description |
|---|---|
| byte[] | Byte array representation of the Structure |
Overrides
| Edit this page View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |