C# Class Vestris.ResourceLib.Resource

A version resource.
Show file Open project: dblock/resourcelib Class Usage Examples

Protected Properties

Property Type Description
_hModule System.IntPtr
_hResource System.IntPtr
_language System.UInt16
_name ResourceId
_size int
_type ResourceId

Public Methods

Method Description
DeleteFrom ( string filename ) : void

Delete a resource from an executable (.exe or .dll) file.

LoadFrom ( string filename ) : void

Load a resource from an executable (.exe or .dll) file.

Save ( string filename, IEnumerable resources ) : void

Save a batch of resources to a given file.

SaveTo ( string filename ) : void

Save a resource.

WriteAndGetBytes ( ) : byte[]

Return resource data.

Private Methods

Method Description
Delete ( string filename, ResourceId type, ResourceId name, UInt16 lang ) : void

Delete a resource from an executable (.exe or .dll) file.

LoadFrom ( IntPtr hModule, ResourceId type, ResourceId name, UInt16 lang ) : void

Load a resource from an executable (.exe or .dll) module.

LoadFrom ( string filename, ResourceId type, ResourceId name, UInt16 lang ) : void

Load a resource from an executable (.exe or .dll) file.

LockAndReadResource ( IntPtr hModule, IntPtr hResource ) : void

Lock and read the resource.

Read ( IntPtr hModule, IntPtr lpRes ) : IntPtr

Read a resource from a previously loaded module.

Resource ( ) : System

A new resource.

Resource ( IntPtr hModule, IntPtr hResource, ResourceId type, ResourceId name, UInt16 language, int size ) : System

A structured resource embedded in an executable module.

SaveTo ( string filename, ResourceId type, ResourceId name, UInt16 langid ) : void

Save a resource to an executable (.exe or .dll) file.

SaveTo ( string filename, ResourceId type, ResourceId name, UInt16 lang, byte data ) : void

Save a resource to an executable (.exe or .dll) file.

Write ( BinaryWriter w ) : void

Write the resource to a memory stream.

Method Details

DeleteFrom() public method

Delete a resource from an executable (.exe or .dll) file.
public DeleteFrom ( string filename ) : void
filename string Path to an executable file.
return void

LoadFrom() public method

Load a resource from an executable (.exe or .dll) file.
public LoadFrom ( string filename ) : void
filename string An executable (.exe or .dll) file.
return void

Save() public static method

Save a batch of resources to a given file.
public static Save ( string filename, IEnumerable resources ) : void
filename string Path to an executable file.
resources IEnumerable The resources to write.
return void

SaveTo() public method

Save a resource.
public SaveTo ( string filename ) : void
filename string Name of an executable file (.exe or .dll).
return void

WriteAndGetBytes() public method

Return resource data.
public WriteAndGetBytes ( ) : byte[]
return byte[]

Property Details

_hModule protected property

Loaded binary nodule.
protected IntPtr,System _hModule
return System.IntPtr

_hResource protected property

Pointer to the resource.
protected IntPtr,System _hResource
return System.IntPtr

_language protected property

Resource language.
protected UInt16,System _language
return System.UInt16

_name protected property

Resource name.
protected ResourceId,Vestris.ResourceLib _name
return ResourceId

_size protected property

Resource size.
protected int _size
return int

_type protected property

Resource type.
protected ResourceId,Vestris.ResourceLib _type
return ResourceId