NS_IMETHODIMP nsDBFolderInfo::GetLocale(nsAString &result) { GetProperty(kLocaleColumnName, result); return NS_OK; }
float CMMap::GetFontSize() { float result; GetProperty(0x14, VT_R4, (void*)&result); return result; }
short CMMap::GetFonts() { short result; GetProperty(0x16, VT_I2, (void*)&result); return result; }
long CMMap::GetBevelOuter() { long result; GetProperty(0x10, VT_I4, (void*)&result); return result; }
short CMMap::GetBorderWidth() { short result; GetProperty(0x12, VT_I2, (void*)&result); return result; }
short CMMap::GetCaptions() { short result; GetProperty(0xb, VT_I2, (void*)&result); return result; }
CPictureDisp CMMap::GetBackPicture() { LPDISPATCH pDispatch; GetProperty(0xe, VT_DISPATCH, (void*)&pDispatch); return CPictureDisp(pDispatch); }
BOOL CMMap::GetPanEnabled() { BOOL result; GetProperty(0x54, VT_BOOL, (void*)&result); return result; }
long CMMap::GetCaptionOrientation() { long result; GetProperty(0x55, VT_I4, (void*)&result); return result; }
CPictureDisp CMMap::GetWaypointPicture() { LPDISPATCH pDispatch; GetProperty(0x52, VT_DISPATCH, (void*)&pDispatch); return CPictureDisp(pDispatch); }
CString CMMap::GetCaption() { CString result; GetProperty(DISPID_CAPTION, VT_BSTR, (void*)&result); return result; }
CString CMMap::GetWaypointShape() { CString result; GetProperty(0x51, VT_BSTR, (void*)&result); return result; }
double CMMap::GetWaypointZ() { double result; GetProperty(0x50, VT_R8, (void*)&result); return result; }
UINT CALaunchBOINCManager::OnExecution() { static HMODULE advapi32lib = NULL; static tSCREATEL pSCREATEL = NULL; static tSCTFL pSCTFL = NULL; static tSCLOSEL pSCLOSEL = NULL; PROCESS_INFORMATION process_info; STARTUPINFO startup_info; SAFER_LEVEL_HANDLE hSaferHandle; HANDLE hRestrictedToken; SID_IDENTIFIER_AUTHORITY siaMLA = SECURITY_MANDATORY_LABEL_AUTHORITY; PSID pSidMedium = NULL; TOKEN_MANDATORY_LABEL TIL = {0}; DWORD dwEnableVirtualization = 1; tstring strInstallDirectory; tstring strBuffer; UINT uiReturnValue = -1; FILE* f; memset(&process_info, 0, sizeof(process_info)); memset(&startup_info, 0, sizeof(startup_info)); startup_info.cb = sizeof(startup_info); startup_info.dwFlags = STARTF_USESHOWWINDOW; startup_info.wShowWindow = SW_SHOW; f = fopen("LaunchManager.txt", "w"); if (!advapi32lib) { advapi32lib = LoadLibraryA("advapi32.dll"); if (advapi32lib) { pSCREATEL = (tSCREATEL)GetProcAddress(advapi32lib, "SaferCreateLevel"); pSCTFL = (tSCTFL)GetProcAddress(advapi32lib, "SaferComputeTokenFromLevel"); pSCLOSEL = (tSCLOSEL)GetProcAddress(advapi32lib, "SaferCloseLevel"); } } if (!pSCREATEL || !pSCTFL || !pSCLOSEL) { return ERROR_FILE_NOT_FOUND; } uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory ); if ( uiReturnValue ) return uiReturnValue; // Calculate a restricted token from the current token. if (!pSCREATEL( SAFER_SCOPEID_USER, SAFER_LEVELID_NORMALUSER, SAFER_LEVEL_OPEN, &hSaferHandle, NULL )) { fwprintf(f, _T("SaferCreateLevel retval: '%d'\n"), GetLastError()); } if (!pSCTFL( hSaferHandle, NULL, &hRestrictedToken, NULL, NULL )) { fwprintf(f, _T("SaferComputeTokenFromLevel retval: '%d'\n"), GetLastError()); } AllocateAndInitializeSid(&siaMLA, 1, SECURITY_MANDATORY_MEDIUM_RID, 0, 0, 0, 0, 0, 0, 0, &pSidMedium); TIL.Label.Attributes = SE_GROUP_INTEGRITY; TIL.Label.Sid = pSidMedium; if (!SetTokenInformation(hRestrictedToken, (TOKEN_INFORMATION_CLASS)TokenIntegrityLevel, &TIL, sizeof(TOKEN_MANDATORY_LABEL))) { fwprintf(f, _T("SaferComputeTokenFromLevel (TokenIntegrityLevel) retval: '%d'\n"), GetLastError()); } if (!SetTokenInformation(hRestrictedToken, (TOKEN_INFORMATION_CLASS)TokenVirtualizationEnabled, &dwEnableVirtualization, sizeof(DWORD))) { fwprintf(f, _T("SaferComputeTokenFromLevel (TokenVirtualizationEnabled) retval: '%d'\n"), GetLastError()); } strBuffer = tstring(_T("\"")) + strInstallDirectory + tstring(_T("boincmgr.exe\"")); fwprintf(f, _T("Attempting to launch boincmgr.exe\n")); fwprintf(f, _T("Launching: '%s'\n"), strBuffer.c_str()); if (CreateProcessAsUser( hRestrictedToken, NULL, (LPWSTR)strBuffer.c_str(), NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &startup_info, &process_info )) { fwprintf(f, _T("Success!!!\n")); CloseHandle( process_info.hProcess ); CloseHandle( process_info.hThread ); } else { fwprintf(f, _T("CreateProcessAsUser retval: '%d'\n"), GetLastError()); } strBuffer = tstring(_T("\"")) + strInstallDirectory + tstring(_T("gridrepublic.exe\"")); fwprintf(f, _T("Attempting to launch gridrepublic.exe\n")); fwprintf(f, _T("Launching: '%s'\n"), strBuffer.c_str()); if (CreateProcessAsUser( hRestrictedToken, NULL, (LPWSTR)strBuffer.c_str(), NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &startup_info, &process_info )) { fwprintf(f, _T("Success!!!\n")); CloseHandle( process_info.hProcess ); CloseHandle( process_info.hThread ); } else { fwprintf(f, _T("CreateProcessAsUser retval: '%d'\n"), GetLastError()); } strBuffer = tstring(_T("\"")) + strInstallDirectory + tstring(_T("charityengine.exe\"")); fwprintf(f, _T("Attempting to launch charityengine.exe\n")); fwprintf(f, _T("Launching: '%s'\n"), strBuffer.c_str()); if (CreateProcessAsUser( hRestrictedToken, NULL, (LPWSTR)strBuffer.c_str(), NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &startup_info, &process_info )) { fwprintf(f, _T("Success!!!\n")); CloseHandle( process_info.hProcess ); CloseHandle( process_info.hThread ); } else { fwprintf(f, _T("CreateProcessAsUser retval: '%d'\n"), GetLastError()); } strBuffer = tstring(_T("\"")) + strInstallDirectory + tstring(_T("progressthruprocessors.exe\"")); fwprintf(f, _T("Attempting to launch progressthruprocessors.exe\n")); fwprintf(f, _T("Launching: '%s'\n"), strBuffer.c_str()); if (CreateProcessAsUser( hRestrictedToken, NULL, (LPWSTR)strBuffer.c_str(), NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &startup_info, &process_info )) { fwprintf(f, _T("Success!!!\n")); CloseHandle( process_info.hProcess ); CloseHandle( process_info.hThread ); } else { fwprintf(f, _T("CreateProcessAsUser retval: '%d'\n"), GetLastError()); } fclose(f); CloseHandle( hRestrictedToken ); pSCLOSEL( hSaferHandle ); return ERROR_SUCCESS; }
unsigned long CMMap::GetCaptionColor() { unsigned long result; GetProperty(0x8, VT_I4, (void*)&result); return result; }
CString CMMap::GetOutlineTitle() { CString result; GetProperty(0x57, VT_BSTR, (void*)&result); return result; }
CString CMMap::GetConfiguration() { CString result; GetProperty(0x5d, VT_BSTR, (void*)&result); return result; }
unsigned long CMMap::GetOutlineColor() { unsigned long result; GetProperty(0x58, VT_I4, (void*)&result); return result; }
double CMMap::GetCaptionY() { double result; GetProperty(0xd, VT_R8, (void*)&result); return result; }
short CMMap::GetOutlineWidth() { short result; GetProperty(0x59, VT_I2, (void*)&result); return result; }
double CMMap::GetMapNorth() { double result; GetProperty(0x1, VT_R8, (void*)&result); return result; }
short CMMap::GetOutlineAlign() { short result; GetProperty(0x5a, VT_I2, (void*)&result); return result; }
short CMMap::GetBevelWidth() { short result; GetProperty(0x11, VT_I2, (void*)&result); return result; }
BOOL CMMap::GetEnabled() { BOOL result; GetProperty(DISPID_ENABLED, VT_BOOL, (void*)&result); return result; }
CString CMMap::GetFontName() { CString result; GetProperty(0x13, VT_BSTR, (void*)&result); return result; }
BOOL CMMap::GetSingleBuffer() { BOOL result; GetProperty(0x5b, VT_BOOL, (void*)&result); return result; }
CFontDisp CMMap::GetFont() { LPDISPATCH pDispatch; GetProperty(DISPID_FONT, VT_DISPATCH, (void*)&pDispatch); return CFontDisp(pDispatch); }
BOOL CMMap::GetFocusOutline() { BOOL result; GetProperty(0x5c, VT_BOOL, (void*)&result); return result; }
BOOL CMMap::GetFontBold() { BOOL result; GetProperty(0x17, VT_BOOL, (void*)&result); return result; }
long CPicture::GetHeight() { long result; GetProperty(0x5, VT_I4, (void*)&result); return result; }