函数SHDeleteKey怎么用?(50分)

  • 主题发起人 windyson
  • 开始时间
W

windyson

Unregistered / Unconfirmed
GUEST, unregistred user!
各位兄台,我在BCB 5.0中使用函数SHDeleteKey,已经包含了shlwapi.h,仍然报告link错误 Unresolved external 'SHDeleteKeyA' referenced from MAIN.OBJ。我还要做些什么?
三天不写手生。唉,放了几个月不写代码,全忘光了...
 
from MSDN
SHDeleteKey

Deletes a subkey and all its descendants. The function will remove the key and all of the key's values from the registry.
DWORD SHDeleteKey(
HKEY hkey,
LPCTSTR pszSubKey
);
Parameters
hkey
Handle to the currently open key, or any of the following predefined values: HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_DYN_DATA (Windows 95 only)
HKEY_LOCAL_MACHINE
HKEY_PERFORMANCE_DATA (Windows NT only)
HKEY_USERS
pszSubKey
Address of a null-terminated string specifying the name of the key to delete.
Return Values
Returns ERROR_SUCCESS if successful, or a nonzero error code defined in Winerror.h otherwise. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.
Requirements
Version 4.71 and later of Shlwapi.dll
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later).
Windows 95/98: Requires Windows 98 (or Windows 95 with Internet Explorer 4.0 or later).
Header: Declared in shlwapi.h.
Import Library: shlwapi.lib.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
1K
import
I
顶部