这篇教程C++ DeleteKey函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DeleteKey函数的典型用法代码示例。如果您正苦于以下问题:C++ DeleteKey函数的具体用法?C++ DeleteKey怎么用?C++ DeleteKey使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DeleteKey函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: sprintf/* static public */HRESULT REGUTIL::UnregisterCOMClass( REFCLSID rclsid, const char *szProgIDPrefix, int iVersion, const char *szClassProgID ){ char szID[64]; // the class ID to unregister. char rcCLSID[64]; // CLSID//szID. OLECHAR szWID[64]; // helper for the class ID to unregister. char rcProgID[128]; // szProgIDPrefix.szClassProgID char rcIndProgID[128]; // rcProgID.iVersion // format the prog ID values. sprintf( rcProgID, "%s.%s", szProgIDPrefix, szClassProgID ); sprintf( rcIndProgID, "%s.%d", rcProgID, iVersion ); REGUTIL::_UnregisterClassBase( rclsid, rcProgID, rcIndProgID, rcCLSID ); DeleteKey( rcCLSID, "InprocServer32" ); StringFromGUID2(rclsid, szWID, NumItems( szWID ) ); WideCharToMultiByte( CP_ACP, 0, szWID, -1, szID, sizeof( szID ), NULL, NULL ); DeleteKey( "CLSID", rcCLSID ); return S_OK;} // REGUTIL::UnregisterCOMClass
开发者ID:Bathla,项目名称:ProfileSharp,代码行数:36,
示例2: DeleteKeyBOOL CRegKey::DeleteKey(HKEY hKey,LPCWSTR szKey){ if (!IsUnicodeSystem()) return DeleteKey(hKey,W2A(szKey)); HKEY hSubKey; FILETIME ft; DWORD cb; WCHAR szSubKey[200]; if (RegOpenKeyExW(hKey,szKey,0, KEY_ENUMERATE_SUB_KEYS|KEY_SET_VALUE,&hSubKey)!=ERROR_SUCCESS) return TRUE; DebugOpenHandle(dhtRegKey,hSubKey,szKey); for(;;) { cb=400; if (RegEnumKeyExW(hSubKey,0,szSubKey,&cb,NULL, NULL,NULL,&ft)==ERROR_NO_MORE_ITEMS) break; DeleteKey(hSubKey,szSubKey); } RegCloseKey(hSubKey); DebugCloseHandle(dhtRegKey,hSubKey,szKey); RegDeleteKeyW(hKey,szKey); return TRUE;}
开发者ID:quachdnguyen,项目名称:locate-src,代码行数:27,
示例3: UnregisterServer//// Remove the component from the registry.//HRESULT UnregisterServer(const CLSID& clsid, // Class ID const char* szProgID, // IDs const char* szVerIndProgID) // Programmatic{ // Convert the CLSID into a char. char szCLSID[CLSID_STRING_SIZE] ; CLSIDtoString(clsid, szCLSID, sizeof(szCLSID)) ; // Build the key CLSID//{...} char szKey[64] ; strcpy(szKey, "CLSID//") ; strcat(szKey, szCLSID) ; // Delete the CLSID Key - CLSID/{...} LONG lResult = DeleteKey(HKEY_CLASSES_ROOT, szKey) ; // Delete the version-independent ProgID Key. if (szVerIndProgID != NULL) lResult = DeleteKey(HKEY_CLASSES_ROOT, szVerIndProgID) ; // Delete the ProgID key. if (szProgID != NULL) lResult = DeleteKey(HKEY_CLASSES_ROOT, szProgID) ; return S_OK ;}
开发者ID:Omgan,项目名称:code4me,代码行数:29,
示例4: swprintfvoid IniFile::DeleteSection ( wchar_t *section){ // deletes a whole INI section in the dictionary int length; int i; wchar_t key[256]; if (section == NULL) section = INIFile_default_section; // if no section was provided, use empty section name swprintf (key, 256, L"%s%c", section, INI_SECTION_SEPARATOR); // compose the key length = (int) wcslen (key); // get the key string length // for each entry in the dictionary... for (i = 0; i < Dictionary->entry_count; i++) { if (Dictionary->entries[i].key[0] == 0) continue; // skip empty slots // does this entry belong to the section we want ? if (wcsncmp (Dictionary->entries[i].key, key, length) == 0) DeleteKey ( Dictionary->entries[i].key); // yes, delete it } DeleteKey ( section); // and finally delete the section name itself return;}
开发者ID:NyouB,项目名称:4t4c,代码行数:28,
示例5: DelProp/*===============DelProp===============*/void DelProp(void){ char sz[4096]; if (edit_entity == NULL) return; // Get current selection text SendMessage(hwndEnt[EntKeyField], WM_GETTEXT, sizeof(sz)-1, (LPARAM)sz); if (multiple_entities) { brush_t *b; for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next) DeleteKey(b->owner, sz); } else DeleteKey(edit_entity, sz); // refresh the prop listbox SetKeyValuePairs(); }
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:31,
|