User32CreateIconFromResource Method
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static IntPtr CreateIconFromResource(
ref byte refResourceBits,
uint resourceSize,
bool isIcon,
uint version
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function CreateIconFromResource (
ByRef refResourceBits As Byte,
resourceSize As UInteger,
isIcon As Boolean,
version As UInteger
) As IntPtr
Dim refResourceBits As Byte
Dim resourceSize As UInteger
Dim isIcon As Boolean
Dim version As UInteger
Dim returnValue As IntPtr
returnValue = User32.CreateIconFromResource(refResourceBits,
resourceSize, isIcon, version)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static IntPtr CreateIconFromResource(
unsigned char% refResourceBits,
unsigned int resourceSize,
bool isIcon,
unsigned int version
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member CreateIconFromResource :
refResourceBits : byte byref *
resourceSize : uint32 *
isIcon : bool *
version : uint32 -> IntPtr
No code example is currently available or this language may not be supported.
- refResourceBits Byte
-
The buffer containing the icon or cursor resource bits.
These bits are typically loaded by calls to the LookupIconIdFromDirectory, LookupIconIdFromDirectoryEx,
and LoadResource(SafeModuleHandle, IntPtr) functions.
- resourceSize UInt32
-
The size, in bytes, of the set of bits pointed to by the refResourceBits parameter.
- isIcon Boolean
-
Indicates whether an icon or a cursor is to be created.
If this parameter is , an icon is to be created.
If it is , a cursor is to be created.
- version UInt32
-
The version number of the icon or cursor format for the resource bits pointed to by the presbits parameter.
The value must be greater than or equal to 0x00020000 (&H20000 in VB.NET)
and less than or equal to 0x00030000 (&H30000 in VB.NET).
This parameter is generally set to 0x00030000 (&H30000 in VB.NET).
IntPtr
If the function succeeds, the return value is a handle to the icon or cursor.
If the function fails, the return value is
Zero.
To get extended error information, call
GetLastWin32Error.