Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Exporting DLL icon resources as .ICO files
Storing registration key in the resources of an executable file
    Add comment     W32 Constants      Translate this page
The LockResource function locks the specified resource in memory.
Code examples:
Storing registration key in the resources of an executable file
Exporting DLL icon resources as .ICO files
LPVOID LockResource(
    HGLOBAL hResData
FoxPro declaration:
DECLARE INTEGER LockResource IN kernel32;
    INTEGER hResData
[in] Handle to the resource to be locked. The LoadResource function returns this handle.
Return value:
If the loaded resource is locked, the return value is a pointer to the first byte of the resource; otherwise, it is NULL.
My comment:
Note that hResData parameter is listed as an HGLOBAL variable only for backwards compatibility. Do not pass any value as a parameter other than a successful return value from the LoadResource function.

The pointer returned by LockResource is valid until the module containing the resource is unloaded. It is not necessary to unlock resources because the system automatically deletes them when the process that created them terminates.

Do not try to lock a resource by using the handle returned by the FindResource or FindResourceEx function. Such a handle points to random data.
Word Index links for the LockResource :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2003-05-16 10:14:13
Modified: 2003-05-16 10:17:24
Visited in last 7 days: 34
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
11 sec.All Functions
21 sec.Function: 'AVIStreamGetFrameClose'
Function group: 'Windows Multimedia'
33 sec.Function: 'getprotobynumber'
Function group: 'Windows Sockets 2 (Winsock)'
42 sec.Function: 'PlayEnhMetaFile'
Function group: 'Metafile'
52 sec.Function: 'CryptUnprotectData'
Function group: 'Cryptography Reference'
1 min.Function: 'CreateURLMonikerEx'
Function group: 'URL Monikers'
1.13 min.Function: 'DefWindowProc'
Function group: 'Window Procedure'
1.3 min.Function: 'accept'
Function group: 'Windows Sockets 2 (Winsock)'
1.45 min.
Function group: 'Atom'
1.58 min.Function: 'GetSystemInfo'
Function group: 'System Information'
Advertise here!