Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Storing registration key in the resources of an executable file
    Add comment     W32 Constants      Translate this page
The UpdateResource function adds, deletes, or replaces a resource in an executable file.
Code examples:
Storing registration key in the resources of an executable file
BOOL UpdateResource(
    HANDLE hUpdate,
    LPCTSTR lpType,
    LPCTSTR lpName,
    WORD wLanguage,
    LPVOID lpData,
    DWORD cbData
FoxPro declaration:
DECLARE INTEGER UpdateResource IN kernel32;
    INTEGER hUpdate,;
    INTEGER lpType,;
    INTEGER lpName,;
    INTEGER wLanguage,;
    STRING  lpData,;
    INTEGER cbData

[in] Specifies an update-file handle. This handle is returned by the BeginUpdateResource function.

[in] Pointer to a null-terminated string specifying the resource type to be updated.

[in] Pointer to a null-terminated string specifying the name of the resource to be updated.

[in] Specifies the language identifier of the resource to be updated.

Pointer to the resource data to be inserted into the executable file.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
An application can use UpdateResource repeatedly to make changes to the resource data. Each call to UpdateResource contributes to an internal list of additions, deletions, and replacements but does not actually write the data to the executable file.

The application must use the EndUpdateResource function to write the accumulated changes to the executable file.
Word Index links for the UpdateResource :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2003-05-16 10:36:09
Modified: 2003-05-16 10:39:00
Visited in last 7 days: 16
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2017 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.36), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
8 sec.
Function group: 'Keyboard Input'
16 sec.Example: 'How to assemble an array of strings and pass it to external function'
25 sec.Function: 'PageSetupDlg'
34 sec.Function: 'RtlCompressBuffer'
40 sec.Function: 'mmioDescend'
Function group: 'Windows Multimedia'
49 sec.Example: 'How to ping a remote site using ICMP API calls'
56 sec.Example: 'GDI+: how to make VFP controls visually shake and shudder'
1.07 min.Example: 'Winsock: connecting to a news server (NNTP, port 119)'
1.2 min.Function: 'mixerGetDevCaps'
Function group: 'Windows Multimedia'
1.33 min.Example: 'How to make application automatically close all documents it opened'
Advertise here!