| 发表于:2007-03-27 21:37:216楼 得分:15 |
long regqueryvalue( hkey hkey,// handle of key to query lpctstr lpsubkey,// address of name of subkey to query lptstr lpvalue,// address of buffer for returned string plong lpcbvalue // address of buffer for size of returned string ); 最后一个参数也是指针,指向一个long(dword)类型的缓冲区。 你改为这样试试 var str:string; dwstr: dword; begin regqueryvalue(hkey_local_machine, 'software\microsoft\windows nt\currentversion\winlogon ',pchar(str),&dwstr); 推荐使用regqueryvalueex这个api。 | | |
|