Desktop Functions: Smart Device Functions:
|
Search Results for "RESOURCE" in [All]winscard1: SCardConnect
/// <param name="hContext">A handle that identifies the resource manager context. The resource manager context is set by a previous call to the SCardEstablishContext function.</param> Interfaces
void OnLowResource([In] uint reserved);
BINDSTATUS_FINDINGRESOURCE = 1
INET_E_RESOURCE_NOT_FOUND = 0x800C0005,
/// Dispose and free used resources
public void OnLowResource( uint reserved )
case HRESULTS.INET_E_RESOURCE_NOT_FOUND:
Description = "Resource Not Found.";break;
/// Gets the set of properties of the manifest resource with the specified metadata signature.
/// <param name="mdmr">[in] An <c>mdManifestResource</c> token that represents the resource for which to get the properties. </param>
/// <param name="ptkImplementation">[out] A pointer to an <c>mdFile</c> token or an mdAssemblyRef token that represents the file or assembly, respectively, that contains the resource. </param>
/// <param name="pdwOffset">[out] A pointer to a value that specifies the offset to the beginning of the resource within the file.</param>
/// <param name="pdwResourceFlags">[out] A pointer to flags that describe the metadata applied to a resource. The flags value is a combination of one or more <c>CorManifestResourceFlags</c> values.</param>
/// STDMETHOD(GetManifestResourceProps)( // S_OK or error.
/// mdManifestResource mdmr, // [IN] The ManifestResource for which to get the properties.
/// mdToken *ptkImplementation, // [OUT] mdFile or mdAssemblyRef that provides the ManifestResource.
/// DWORD *pdwOffset, // [OUT] Offset to the beginning of the resource within the file.
/// DWORD *pdwResourceFlags) PURE;// [OUT] Flags.
void GetManifestResourceProps(
[Out] out CorManifestResourceFlags pdwResourceFlags);
/// Gets a pointer to an enumerator for the resources referenced in the current assembly manifest.
/// <param name="phEnum">[in, out] A pointer to the enumerator. This must be a null value when the <c>EnumManifestResources</c> method is called for the first time.</param>
/// <param name="rManifestResources">[out] The array used to store the <c>mdManifestResource</c> metadata tokens.</param>
/// <param name="cMax">[in] The maximum number of <c>mdManifestResource</c> tokens that can be placed in <c>rManifestResources</c>.</param>
/// <param name="pcTokens">[out] The number of <c>mdManifestResource</c> tokens actually placed in <c>rManifestResources</c>.</param>
/// STDMETHOD(EnumManifestResources)( // S_OK or error
/// mdManifestResource rManifestResources[], // [OUT] Put ManifestResources here.
/// ULONG cMax, // [IN] Max Resources to put.
void EnumManifestResources(
[Out, MarshalAs(UnmanagedType.LPArray)] uint[] rManifestResources,
/// Gets a pointer to the manifest resource with the specified name.
/// <param name="szName">[in] The name of the resource.</param>
/// <param name="ptkManifestResource">[out] The array used to store the <c>mdManifestResource</c> metadata tokens, each of which represents a manifest resource.</param>
/// STDMETHOD(FindManifestResourceByName)( // S_OK or error
/// LPCWSTR szName, // [IN] Name of the ManifestResource.
/// mdManifestResource *ptkManifestResource) PURE; // [OUT] Put the ManifestResource token here.
void FindManifestResourceByName(
[Out] out uint ptkManifestResource);
ffContainsMetaData = 0x0000, // This is not a resource file
ffContainsNoMetaData = 0x0001, // This is a resource file or other non-metadata-containing file
public enum CorManifestResourceFlags : uint {
mrPublic = 0x0001, // The Resource is exported from the Assembly.
mrPrivate = 0x0002, // The Resource is private to the Assembly.
/// <param name="hInstAnimation">An instance handle to the module from which the AVI resource should be loaded.</param>
/// <param name="idAnimation">An AVI resource identifier. To create this value, use the MAKEINTRESOURCE macro. The control loads the AVI resource from the module specified by hInstAnimation.</param> 9: IUIFramework
HRESULT LoadUI(IntPtr instance, [MarshalAs(UnmanagedType.LPWStr)] string resourceName); winfax10: FaxFreeBuffer kernel3211: ActivateActCtx
public UInt16 lpResourceName;
private const uint ACTCTX_FLAG_RESOURCE_NAME_VALID = 0x008;
private const uint CREATEPROCESS_MANIFEST_RESOURCE_ID = 1;
private const uint ISOLATIONAWARE_MANIFEST_RESOURCE_ID = 2;
private const uint ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID = 3;
actCtx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID;
actCtx.lpResourceName = ISOLATIONAWARE_MANIFEST_RESOURCE_ID;
actCtx.lpResourceName = ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID;
actCtx.lpResourceName = CREATEPROCESS_MANIFEST_RESOURCE_ID; 12: AttachConsole, Resources13: AttachConsole Resources
static extern IntPtr BeginUpdateResource(string pFileName,
[MarshalAs(UnmanagedType.Bool)]bool bDeleteExistingResources);
Public Shared Function BeginUpdateResource(ByVal pFileName As String, _
<MarshalAs(UnmanagedType.Bool)> ByVal bDeleteExistingResources As Boolean) As IntPtr
IntPtr hResource = BeginUpdateResource(mFileName, false);
if (hResource.ToInt32() == 0) {
if (UpdateResource(hResource, "FILE", fileName,
if (EndUpdateResource(hResource, false) == false) {
internal static extern IntPtr CreateMemoryResourceNotification(MemoryResourceNotificationType notificationType);
enum MemoryResourceNotificationType : int
LowMemoryResourceNotification = 0,
HighMemoryResourceNotification = 1,
static extern bool EndUpdateResource(IntPtr hUpdate, bool fDiscard);
Public Shared Function EndUpdateResource(ByVal hUpdate As IntPtr, ByVal fDiscard As Boolean) As Boolean hUpdate is returned from BeginUpdateResource.
static extern bool EnumResourceNames(IntPtr hModule, string lpszType, EnumResNameProcDelegate lpEnumFunc, IntPtr lParam);
static extern bool EnumResourceNames(IntPtr hModule, int dwID, EnumResNameProcDelegate lpEnumFunc, IntPtr lParam);
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode, EntryPoint:="EnumResourceNamesW", SetLastError:=True)> _
Private Shared Function EnumResourceNames(ByVal hModule As IntPtr, ByVal lpszType As String, ByVal lpEnumFunc As EnumResNameProcDelegate, ByVal lParam As IntPtr) As Boolean
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode, EntryPoint:="EnumResourceNamesW", SetLastError:=True)> _
Private Shared Function EnumResourceNames(ByVal hModule As IntPtr, ByVal dwID As Integer, ByVal lpEnumFunc As EnumResNameProcDelegate, ByVal lParam As IntPtr) As Boolean
Public Enum ResourceType
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode, EntryPoint:="EnumResourceNamesW", SetLastError:=True)> _
Private Shared Function EnumResourceNames(ByVal hModule As IntPtr, ByVal lpszType As String, ByVal lpEnumFunc As EnumResNameProcDelegate, ByVal lParam As IntPtr) As Boolean
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode, EntryPoint:="EnumResourceNamesW", SetLastError:=True)> _
Private Shared Function EnumResourceNames(ByVal hModule As IntPtr, ByVal lpszType As Integer, ByVal lpEnumFunc As EnumResNameProcDelegate, ByVal lParam As IntPtr) As Integer
Private Sub ShowResources()
EnumResourceNames(dll_hInst, "AVI", AddressOf EnumResNameProc, IntPtr.Zero)
[DllImport("kernel32.dll", EntryPoint = "EnumResourceNamesW", CharSet = CharSet.Unicode, SetLastError = true)]
static extern bool EnumResourceNamesWithName(
[DllImport("kernel32.dll", EntryPoint = "EnumResourceNamesW", CharSet = CharSet.Unicode, SetLastError = true)]
static extern bool EnumResourceNamesWithID(
private static bool IS_INTRESOURCE(IntPtr value)
private static uint GET_RESOURCE_ID(IntPtr value)
if (IS_INTRESOURCE(value) == true)
private static string GET_RESOURCE_NAME(IntPtr value)
if (IS_INTRESOURCE(value) == true)
IntPtr hMod = LoadLibraryEx(@"D:\Test\StringResource\Debug\StringResource.exe", IntPtr.Zero, LOAD_LIBRARY_AS_DATAFILE);
if (EnumResourceNamesWithID(hMod, RT_ICON, new EnumResNameDelegate(EnumRes), IntPtr.Zero) == false)
Console.WriteLine("Type: {0}", GET_RESOURCE_NAME(lpszType));
Console.WriteLine("Name: {0}", GET_RESOURCE_NAME(lpszName));
static extern bool EnumResourceTypes(IntPtr hModule, EnumResTypeProc lpEnumFunc, IntPtr lParam);
Private Shared Function EnumResourceTypes(ByVal hModule As IntPtr, ByVal lpEnumFunc As EnumResTypeProc, ByVal lParam As IntPtr) As Boolean
''' Enumerates a module for predefined resource types.
''' <param name="resources">If NULL, all resource types will be enumerated.</param>
Public Shared Function GetResourceTypes(fullPath As String, _
resources() As ResourceType) As Dictionary(Of ResourceType, _
If IsNothing(resources) OrElse resources.Length = 0 Then resources = _
CType([Enum].GetValues(GetType(ResourceType)), ResourceType())
Dim LS As New Dictionary(Of ResourceType, List(Of String))
Dim rt = CType(CInt(lpType), ResourceType)
Dim ResID = MAKEINTRESOURCE(lpzName)
Dim rt = CType(CInt(rType), ResourceType)
If Array.IndexOf(resources, rt) > -1 Then
EnumResourceNames(hm, rType, typeCallBack, IntPtr.Zero)
EnumResourceTypesW(hMod, callBack, IntPtr.Zero)
LOCALE_SPARENT =0x0000006d, // Fallback name for resources
LOCALE_SPARENT =0x0000006d, // Fallback name for resources 22: FindResource
static extern IntPtr FindResourceEx(IntPtr hModule, IntPtr lpType, IntPtr lpName, ushort wLanguage);
Private Shared Function FindResourceEx(ByVal hModule As IntPtr, ByVal lpType As IntPtr, ByVal lpName As IntPtr, ByVal wLanguage As UShort) As IntPtr 23: FindResourceEx 24: FreeLibrary
if (EnumResourceNames(hExe, "FILE", cb, (IntPtr)gch) == false) { 25: GetLocaleInfo
LOCALE_SPARENT =0x0000006d, // Fallback name for resources 26: GetLocaleInfoEx
LOCALE_SPARENT =0x0000006d, // Fallback name for resources 27: GetLongPathName
Resources.Strings.ProjectNotFound, 28: LoadLibrary If you only want to load resources from the library, specify LoadLibraryFlags.LoadLibraryAsDatafile as dwFlags. In this case, nothing is done to execute or prepare to execute the mapped file. 29: LoadLibraryEx If you only want to load resources from the library, specify LoadLibraryFlags.LoadLibraryAsDatafile as dwFlags. In this case, nothing is done to execute or prepare to execute the mapped file. 30: LoadResource
static extern IntPtr LoadResource(IntPtr hModule, IntPtr hResInfo);
Private Shared Function LoadResource(hModule As IntPtr, hResInfo As IntPtr) As IntPtr hModule is the handle to the module in the executable, returned by FindResource hResInfo is the return value from FindResource. 31: LockResource
static extern IntPtr LockResource(IntPtr hResData);
Private Shared Function LockResource(hResData As IntPtr) As IntPtr this function returnes a pointer to the resource. you can use Marshal.Copy() to copy the data from the pointer to a managed array.
pResource = LockResource(hResource);
if (hResource.ToInt32() == 0) {
Marshal.Copy(pResource, fileBuffComp, 0, fileSizeComp + mOffset);
[DllImport("Kernel32.dll", EntryPoint = "FindResourceW", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern IntPtr FindResource(IntPtr hModule, string pName, string pType);
[DllImport("Kernel32.dll", EntryPoint = "SizeofResource", SetLastError = true)]
private static extern uint SizeofResource(IntPtr hModule, IntPtr hResource);
[DllImport("Kernel32.dll", EntryPoint = "LoadResource", SetLastError = true)]
private static extern IntPtr LoadResource(IntPtr hModule, IntPtr hResource);
[DllImport("Kernel32.dll", EntryPoint = "LockResource")]
private static extern IntPtr LockResource(IntPtr hGlobal);
internal static int TestFindResource()
IntPtr resH1 = FindResource(IntPtr.Zero, "RES_CUSTOMIZE", "CUSTOM");
IntPtr resH2 = LoadResource(IntPtr.Zero, resH1);
IntPtr resH3 = LockResource(resH2);
uint resSize = SizeofResource(IntPtr.Zero, resH1); 32: PACKAGE_ID
public string resourceId;
internal static extern bool QueryMemoryResourceNotification(IntPtr resourceNotificationHandle, out int resourceState); 34: SizeofResource
static extern uint SizeofResource(IntPtr hModule, IntPtr hResInfo);
Private Shared Function SizeofResource(hModule As IntPtr, hResInfo As IntPtr) As UInteger
//free up resources 36: UpdateResource
static extern bool UpdateResource(IntPtr hUpdate, IntPtr lpType, IntPtr lpName, ushort wLanguage, IntPtr lpData, uint cbData);
<DllImport("kernel32.dll", EntryPoint:="UpdateResource", SetLastError:=True)> _
Friend Shared Function UpdateResource(hUpdate As IntPtr, lpType As IntPtr, lpName As IntPtr, wLanguage As UShort, <MarshalAs(UnmanagedType.LPArray, SizeParamIndex:=5)> lpData As Byte(), cbData As UInteger) As <MarshalAs(UnmanagedType.Bool)> Boolean See BeginUpdateResource to get a handle for hUpdate, and EndUpdateResource to apply the update changes. Most if not all windows resource names are actually numbers, not strings (but some utilities such as Resource Hacker do not show the data type of the resource name). I'm not actually sure if the data type is unsigned 16 bit, but that's the most conservative choice and it does work. cards37: cdtTerm rapi38: CeCreateFile advapi32
const uint STATUS_INSUFFICIENT_RESOURCES = 0xc000009a;
if ((ret == STATUS_INSUFFICIENT_RESOURCES) || (ret == STATUS_NO_MEMORY))
if ((ret == STATUS_INSUFFICIENT_RESOURCES) || (ret == STATUS_NO_MEMORY)) 40: LsaLookupSids
const uint STATUS_INSUFFICIENT_RESOURCES = 0xc000009a;
if ((ret == STATUS_INSUFFICIENT_RESOURCES) || (ret == STATUS_NO_MEMORY))
if (ret == STATUS_INSUFFICIENT_RESOURCES || ret == STATUS_NO_MEMORY)
if (ret == STATUS_INSUFFICIENT_RESOURCES || ret == STATUS_NO_MEMORY)
if ((ret == STATUS_INSUFFICIENT_RESOURCES) || (ret == STATUS_NO_MEMORY))
if ((ret == STATUS_INSUFFICIENT_RESOURCES) || (ret == STATUS_NO_MEMORY)) 41: OpenThreadToken
//Implement IDisposable. (from Implementing Finalize and Dispose to Clean Up Unmanaged Resources ) 42: RegCloseKey (Special Note: The .NET Framework (3.0 and earlier at least) cannot read registry values of special types (for example: REG_RESOURCE_LIST and REG_FULL_RESOURCE_DESCRIPTOR). I am not sure if they will ever be available under .NET, to see examples of these types of values at work, visit your registry under (HKLM\HARDWARE\DESCRIPTION\System) and (HKLM\HARDWARE\RESOURCEMAP\Hardware Abstraction Layer\ACPI x86 platform). 43: RegGetValue
RegResourceList = 8,
RegFullResourceDescriptor = 9,
RegResourceRequirementsList = 10,
static extern unsafe uint RegisterTraceGuids([In] EtwProc cbFunc, [In] void* context, [In] ref Guid controlGuid, [In] uint guidCount, ref TraceGuidRegistration guidReg, [In] string mofImagePath, [In] string mofResourceName, out ulong regHandle);
static extern unsafe uint RegisterTraceGuids([In] EtwProc cbFunc, [In] void* context, [In] ref Guid controlGuid, [In] uint guidCount, ref TraceGuidRegistration guidReg, [In] string mofImagePath, [In] string mofResourceName, out ulong regHandle); ntdll47: PROCESSINFOCLASS
ProcessResourceManagement, winmm48: PlaySound
/// <summary>name is resource name or atom</summary>
SND_RESOURCE = 0x00040004
''' the resource needed to generate that sound is busy playing
''' SND_FILENAME or SND_RESOURCE.
''' The pszSound parameter is a resource identifier; hmod must
''' identify the instance that contains the resource.
SND_RESOURCE = &H40004 the resources previously set up: coredll50: CreateEvent
''' Releases all resources held by the current WaitEvent. So the device ID is a very useful thing for software that wants to target just your device, e.g. copy protection, or to provide immutable identity to web service calls. Equally so it’s a resource that should be protected to mitigate the risk of identity theft. 52: LoadIcon 53: NOTIFYICONDATA
// Obtains the app icon (the resource number is fixed for all apps) for the current 54: PlaySound
SND_RESOURCE = &H40004 ' name is resource name or atom
SND_RESOURCE = 0x40004, // name is resource name or atom
SND_RESOURCE = 0x40004, // name is resource name or atom
SND_RESOURCE = &H40004 ' name is resource name or atom 55: RegCreateKeyEx The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. 56: RegDeleteKey The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. 57: RegDeleteValue The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. 58: RegFlushKey The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. 59: RegOpenKeyEx The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. 60: RegQueryInfoKey The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. Cut off search results after 60. Please refine your search. |