| 217 | } |
| 218 | |
| 219 | static LONG createRegStringValue (HKEY mainkey,char *szregpath,char *valname,char *szvalstr) |
| 220 | { |
| 221 | LONG cr,rc = -1; |
| 222 | HKEY hkey; |
| 223 | |
| 224 | if (szregpath) { |
| 225 | if ((cr = RegOpenKey(mainkey,szregpath,&hkey)) == ERROR_SUCCESS) { |
| 226 | cr = RegSetValueEx(hkey,(LPCTSTR)valname,0,REG_SZ,(const BYTE *)szvalstr,(DWORD)strlen(szvalstr)); |
| 227 | RegCloseKey(hkey); |
| 228 | if (cr == ERROR_SUCCESS) rc = 0; |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | return rc; |
| 233 | } |
| 234 | |
| 235 | |
| 236 | static LONG getRegString (HKEY mainkey,char *szregpath,char *valname,LPVOID pval,DWORD vsize) |
no outgoing calls
no test coverage detected