Using Win32 functions in Visual FoxPro Image Gallery
Shell Lightweight Utility APIs -- string functions
Code examples:
StrDup returns a pointer to the duplicate of a source VFP string
Using Common Controls: the Header Control
..msdn    Add comment     W32 Constants      Translate this page
Duplicates a string.
Code examples:
Using Common Controls: the Header Control
StrDup returns a pointer to the duplicate of a source VFP string
    LPCTSTR lpsz 
FoxPro declaration:
    STRING lpsz
[in] Pointer to a constant null-terminated character string.
Return value:
Returns the address of the string that was copied, or NULL if the string cannot be copied.
My comment:
MSDN: this function uses LocalAlloc to allocate storage space for the copy of the string. The calling application must free this memory by calling the LocalFree function on the pointer returned by the call to StrDup.

StrDup will allocate storage the size of the original string. If storage allocation is successful, the original string is copied to the duplicate string.
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2001-10-30 19:19:00
Modified: 2001-11-26 16:03:53
Visited in last 7 days: 51
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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
19 sec.Function: 'UuidCreate'
39 sec.Function: 'GetDriveType'
59 sec.Function: 'FindFirstVolume'
1.3 min.Function: 'FileIconInit'
1.65 min.Function: 'CeMoveFile'
2 min.Function: 'ConnectToPrinterDlg'
2.33 min.Function: 'WNetGetProviderName'
Function group: 'Windows Networking'
2.68 min.Function: 'GdipGetPageUnit'
3.03 min.Function: 'DeleteMenu'
3.4 min.Function: 'NetMessageNameDel'
Advertise here!