コード例 #1
0
ファイル: llappviewerwin32.cpp プロジェクト: Boy/netbook
void LLAppViewerWin32::disableWinErrorReporting()
{
    const char win_xp_string[] = "Microsoft Windows XP";
    BOOL is_win_xp = ( getOSInfo().getOSString().substr(0, strlen(win_xp_string) ) == win_xp_string );		/* Flawfinder: ignore*/
    if( is_win_xp )
    {
        // Note: we need to use run-time dynamic linking, because load-time dynamic linking will fail
        // on systems that don't have the library installed (all non-Windows XP systems)
        HINSTANCE fault_rep_dll_handle = LoadLibrary(L"faultrep.dll");		/* Flawfinder: ignore */
        if( fault_rep_dll_handle )
        {
            pfn_ADDEREXCLUDEDAPPLICATIONA pAddERExcludedApplicationA  = (pfn_ADDEREXCLUDEDAPPLICATIONA) GetProcAddress(fault_rep_dll_handle, "AddERExcludedApplicationA");
            if( pAddERExcludedApplicationA )
            {

                // Strip the path off the name
                const char* executable_name = gDirUtilp->getExecutableFilename().c_str();

                if( 0 == pAddERExcludedApplicationA( executable_name ) )
                {
                    U32 error_code = GetLastError();
                    llinfos << "AddERExcludedApplication() failed with error code " << error_code << llendl;
                }
                else
                {
                    llinfos << "AddERExcludedApplication() success for " << executable_name << llendl;
                }
            }
            FreeLibrary( fault_rep_dll_handle );
        }
    }
}
コード例 #2
0
ファイル: winrt.cpp プロジェクト: ahrnbom/physfs-uwp
int __PHYSFS_platformInit(void)
{
	BAIL_IF_MACRO(!getOSInfo(), NULL, 0);
	BAIL_IF_MACRO(!findApiSymbols(), NULL, 0);
	BAIL_IF_MACRO(!determineUserDir(), NULL, 0);
	return(1);  /* It's all good */
} /* __PHYSFS_platformInit */
コード例 #3
0
ファイル: HWID.cpp プロジェクト: minlexx/l2-unlegits
int calcHWID( char *out )
{
	char globalIDString[4096] = {0};
	char based[4096] = {0};
	char volumeSN[256] = {0}, hwSN[256] = {0}, fsName[256] = {0};
	char biosInfo[1024] = {0};
	char os_info[1024] = {0};
	char cpu_info[1024] = {0};

	getHDDInfo( volumeSN, hwSN, fsName );
	getBIOSInfo( biosInfo );
	getOSInfo( os_info );
	getCPUInfo( cpu_info );

	sprintf( globalIDString, "%s|%s|%s|%s|%s|%s", volumeSN, hwSN, fsName, biosInfo, os_info, cpu_info );
	base64_encode_string( globalIDString, strlen(globalIDString), based );

	strcpy( out, based );

	return 1;
}