|
[求助]vc调用ntdll.dll的问题
忽略libcmtd.lib后更多错误 nafxcwd.lib(oledata.obj) : error LNK2001: unresolved external symbol _atexit nafxcwd.lib(wingdix.obj) : error LNK2001: unresolved external symbol _atexit nafxcwd.lib(dlgclr.obj) : error LNK2001: unresolved external symbol _atexit nafxcwd.lib(ccdata.obj) : error LNK2001: unresolved external symbol _atexit nafxcwd.lib(winmini.obj) : error LNK2001: unresolved external symbol _atexit |
|
[求助]win7 在高UAC等级的情况下,用RegCreateKey会被拒绝
const wchar_t MONIKER_NAME[] = L"Elevation:Administrator!new:%s"; HRESULT CoCreateInstanceAsAdmin(HWND hwnd, REFCLSID rclsid, REFIID riid, void **ppv) { BIND_OPTS3 bo; wchar_t wszCLSID[50]; wchar_t wszMonikerName[300]; StringFromGUID2(rclsid, wszCLSID, sizeof(wszCLSID)); HRESULT hr = wsprintfW(wszMonikerName, MONIKER_NAME, wszCLSID); if (FAILED(hr)) return hr; memset(&bo, 0, sizeof(bo)); bo.cbStruct = sizeof(bo); bo.hwnd = hwnd; bo.dwClassContext = CLSCTX_LOCAL_SERVER; if (IsRunningInWin64()) bo.dwClassContext |= CLSCTX_ACTIVATE_32_BIT_SERVER; return CoGetObject(wszMonikerName, &bo, riid, ppv); } 找到WScript.Shell.1 能操作注册表,但是不能提权,不知道为什么 |
|
[求助]win7 在高UAC等级的情况下,用RegCreateKey会被拒绝
LPVOID pRet; char lpOut[50]; GUID Guid; CLSID rclsid; CLSID rclsid1; IID riid; HRESULT hResult; CoInitialize(0); HRESULT hr1=CLSIDFromProgID(L"WScript.Shell.1",&rclsid); HINSTANCE hdllInst =LoadLibrary("wshom.ocx"); typedef HRESULT (__stdcall * pfnGCO) (REFCLSID, REFIID, void**); pfnGCO fnGCO = NULL; fnGCO = (pfnGCO)GetProcAddress(hdllInst, "DllGetClassObject"); IClassFactory* pcf = NULL; HRESULT hr=(fnGCO)(rclsid, IID_IClassFactory, (void**)&pcf); //创建工厂 LPVOID pvObject; IIDFromString(L"{F935DC21-1CF0-11D0-ADB9-00C04FD58A0B}",&riid); memset(&rclsid1,0,sizeof(CLSID)); // memset(pszName+lstrlen(pszName)-1,0,1); //memset(pszName,0,1); //pszName++; WCHAR wstrStr[260]; MultiByteToWideChar(0,0,pszName,lstrlen(pszName)+1,wstrStr,260*2); CLSIDFromString(wstrStr,&rclsid1); //LPCTSR2GUID(pszName,rclsid1); //LPCTSR2GUID(str,rclsid); hResult=CoCreateInstanceAsAdmin(NULL,rclsid1,riid,&pvObject); |
|
[求助]关于COM对象来读写注册表的问题
GUID Guid; CLSID rclsid; IID riid; CoInitialize(0); HRESULT hr1=CLSIDFromProgID(L"WScript.Shell.1",&rclsid); HINSTANCE hdllInst =LoadLibrary("wshom.ocx"); typedef HRESULT (__stdcall * pfnGCO) (REFCLSID, REFIID, void**); pfnGCO fnGCO = NULL; fnGCO = (pfnGCO)GetProcAddress(hdllInst, "DllGetClassObject"); IClassFactory* pcf = NULL; HRESULT hr=(fnGCO)(rclsid, IID_IClassFactory, (void**)&pcf); //创建工厂 LPVOID pvObject; IIDFromString(L"{F935DC21-1CF0-11D0-ADB9-00C04FD58A0B}",&riid); // LPCTSR2GUID("F935DC21-1CF0-11D0-ADB9-00C04FD58A0B",riid); pcf->CreateInstance(0,riid,&pvObject); CoCreateInstanceAsAdmin(NULL,rclsid,riid,&pvObject); const wchar_t MONIKER_NAME[] = L"Elevation:Administrator!new:%s"; HRESULT CoCreateInstanceAsAdmin(HWND hwnd, REFCLSID rclsid, REFIID riid, void **ppv) { BIND_OPTS3 bo; wchar_t wszCLSID[50]; wchar_t wszMonikerName[300]; StringFromGUID2(rclsid, wszCLSID, sizeof(wszCLSID)); HRESULT hr = wsprintfW(wszMonikerName, MONIKER_NAME, wszCLSID); if (FAILED(hr)) return hr; memset(&bo, 0, sizeof(bo)); bo.cbStruct = sizeof(bo); bo.hwnd = hwnd; bo.dwClassContext = CLSCTX_LOCAL_SERVER; if (IsRunningInWin64()) bo.dwClassContext |= CLSCTX_ACTIVATE_32_BIT_SERVER; return CoGetObject(wszMonikerName, &bo, riid, ppv); } 还是不能提权,CoGetObject 返回80080017 |
|
[求助]有没有读写本地注册表的COM对象或者DCOM
找到了,IWshShell2,IWshShell3,IWshShell ,WshShell 但是不知道怎么使用。 |
|
[求助]win7 在高UAC等级的情况下,用RegCreateKey会被拒绝
我的意思是有没有类似IFileOperation的com对象可以临时操作系统目录的读写注册表com对象 |
|
[求助]win7 在高UAC等级的情况下,用RegCreateKey会被拒绝
没人知道怎么动态提权,让用户确认,修改注册表吗? |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值