You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(42) |
Sep
(42) |
Oct
(57) |
Nov
(12) |
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(14) |
Feb
(4) |
Mar
(52) |
Apr
(13) |
May
(89) |
Jun
(38) |
Jul
(5) |
Aug
(32) |
Sep
(68) |
Oct
(27) |
Nov
(2) |
Dec
(13) |
2004 |
Jan
(3) |
Feb
(6) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ha...@us...> - 2003-03-28 02:57:45
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv31630 Modified Files: Decal.rc ACHooks.h ACHooks.cpp Log Message: RequestID (since GetFellowStats no longer is the function) function + 2.5.0.2 resource updates. I'm not tagging a release yet though, as we should get the timestamp options in the decal options dialog. Index: Decal.rc =================================================================== RCS file: /cvsroot/decaldev/source/Decal/Decal.rc,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Decal.rc 30 Dec 2002 20:38:40 -0000 1.35 --- Decal.rc 28 Mar 2003 02:57:36 -0000 1.36 *************** *** 1,3 **** ! //Microsoft Developer Studio generated resource script. // #include "resource.h" --- 1,3 ---- ! // Microsoft Visual C++ generated resource script. // #include "resource.h" *************** *** 28,37 **** // ! 1 TEXTINCLUDE MOVEABLE PURE BEGIN "resource.h\0" END ! 2 TEXTINCLUDE MOVEABLE PURE BEGIN "#include ""winres.h""\r\n" --- 28,37 ---- // ! 1 TEXTINCLUDE BEGIN "resource.h\0" END ! 2 TEXTINCLUDE BEGIN "#include ""winres.h""\r\n" *************** *** 39,43 **** END ! 3 TEXTINCLUDE MOVEABLE PURE BEGIN "1 TYPELIB ""Decal.tlb""\r\n" --- 39,43 ---- END ! 3 TEXTINCLUDE BEGIN "1 TYPELIB ""Decal.tlb""\r\n" *************** *** 48,52 **** - #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // --- 48,51 ---- *************** *** 55,60 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,5,0,1 ! PRODUCTVERSION 2,5,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,5,0,2 ! PRODUCTVERSION 2,5,0,2 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 71,86 **** BLOCK "040904b0" BEGIN ! VALUE "Comments", "\0" ! VALUE "CompanyName", "\0" ! VALUE "FileDescription", "Decal Module\0" ! VALUE "FileVersion", "2, 5, 0, 1\0" ! VALUE "InternalName", "Decal\0" ! VALUE "LegalCopyright", "Copyright 2001-2002\0" ! VALUE "LegalTrademarks", "\0" ! VALUE "OriginalFilename", "Decal.DLL\0" ! VALUE "PrivateBuild", "\0" ! VALUE "ProductName", "Decal Module\0" ! VALUE "ProductVersion", "2, 5, 0, 1\0" ! VALUE "SpecialBuild", "\0" END END --- 70,80 ---- BLOCK "040904b0" BEGIN ! VALUE "FileDescription", "Decal Module" ! VALUE "FileVersion", "2, 5, 0, 2" ! VALUE "InternalName", "Decal" ! VALUE "LegalCopyright", "Copyright 2001-2002" ! VALUE "OriginalFilename", "Decal.DLL" ! VALUE "ProductName", "Decal Module" ! VALUE "ProductVersion", "2, 5, 0, 2" END END *************** *** 91,96 **** END - #endif // !_MAC - ///////////////////////////////////////////////////////////////////////////// --- 85,88 ---- *************** *** 99,103 **** // ! IDR_ACHooks REGISTRY MOVEABLE PURE "ACHooks.rgs" ///////////////////////////////////////////////////////////////////////////// --- 91,95 ---- // ! IDR_ACHooks REGISTRY "ACHooks.rgs" ///////////////////////////////////////////////////////////////////////////// *************** *** 106,110 **** // ! STRINGTABLE DISCARDABLE BEGIN IDS_PROJNAME "Decal" --- 98,102 ---- // ! STRINGTABLE BEGIN IDS_PROJNAME "Decal" *************** *** 112,116 **** END ! STRINGTABLE DISCARDABLE BEGIN IDE_INDEXOUTOFRANGE "The provided index is below 0 or greater than the number of items in the list." --- 104,108 ---- END ! STRINGTABLE BEGIN IDE_INDEXOUTOFRANGE "The provided index is below 0 or greater than the number of items in the list." *************** *** 144,151 **** // ! IDR_DECAL REGISTRY MOVEABLE PURE "Decal.rgs" ! IDR_SURROGATEREMOVE REGISTRY MOVEABLE PURE "SurrogateRemove.rgs" ! IDR_ACTIVEXSURROGATE REGISTRY MOVEABLE PURE "ActiveXSurrogate.rgs" ! IDR_DECALRES REGISTRY MOVEABLE PURE "DecalRes.rgs" #endif // English (Canada) resources ///////////////////////////////////////////////////////////////////////////// --- 136,143 ---- // ! IDR_DECAL REGISTRY "Decal.rgs" ! IDR_SURROGATEREMOVE REGISTRY "SurrogateRemove.rgs" ! IDR_ACTIVEXSURROGATE REGISTRY "ActiveXSurrogate.rgs" ! IDR_DECALRES REGISTRY "DecalRes.rgs" #endif // English (Canada) resources ///////////////////////////////////////////////////////////////////////////// Index: ACHooks.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** ACHooks.h 18 Mar 2003 17:38:53 -0000 1.37 --- ACHooks.h 28 Mar 2003 02:57:36 -0000 1.38 *************** *** 132,137 **** long m_lChatState; ! bool m_bGetFellowStats; ! long m_lGetFellowStats; bool m_bStackCount; --- 132,137 ---- long m_lChatState; ! bool m_bRequestID; ! long m_lRequestID; bool m_bStackCount; *************** *** 300,302 **** --- 300,303 ---- HRESULT GetAttributeInfo(eAttribute AttributeID, struct qAttribute *Attribute); HRESULT GetVitalInfo(eVital VitalID, struct qVital *Vital); + STDMETHOD(RequestID)(long lObjectID); }; Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** ACHooks.cpp 24 Mar 2003 11:03:47 -0000 1.47 --- ACHooks.cpp 28 Mar 2003 02:57:37 -0000 1.48 *************** *** 66,70 **** m_bSetCombatState = false; m_bChatState = false; ! m_bGetFellowStats = false; m_bStackCount = false; m_bTestFormula = false; --- 66,70 ---- m_bSetCombatState = false; m_bChatState = false; ! m_bRequestID = false; m_bStackCount = false; m_bTestFormula = false; *************** *** 318,324 **** if( QueryMemLoc( BSTRT( "GetFellowStats" ), &Val ) == S_OK ) { ! m_bGetFellowStats = true; ! m_Hooks |= eGetFellowStats ; ! m_lGetFellowStats = Val; } --- 318,333 ---- if( QueryMemLoc( BSTRT( "GetFellowStats" ), &Val ) == S_OK ) { ! m_bRequestID = true; ! m_lRequestID = Val; ! m_Hooks |= eGetFellowStats; ! SetHookEx( eRequestID ); ! } ! ! if( QueryMemLoc( BSTRT( "RequestID" ), &Val ) == S_OK ) ! { ! m_bRequestID = true; ! m_lRequestID = Val; ! m_Hooks |= eGetFellowStats; ! SetHookEx( eRequestID ); } *************** *** 1088,1099 **** STDMETHODIMP cACHooks::GetFellowStats(long lCharID) { ! if( !m_bGetFellowStats ) ! return S_FALSE; ! ! typedef void(*FellowPtr)( long ); ! FellowPtr pFellow = reinterpret_cast< FellowPtr >( m_lGetFellowStats ); ! pFellow( lCharID ); ! ! return S_OK; } --- 1097,1101 ---- STDMETHODIMP cACHooks::GetFellowStats(long lCharID) { ! return RequestID( lCharID ); } *************** *** 2072,2074 **** --- 2074,2088 ---- ret } + } + + STDMETHODIMP cACHooks::RequestID(long lObjectID) + { + if( !m_bRequestID ) + return S_FALSE; + + typedef void(*RequestPtr)( long ); + RequestPtr pRequest = reinterpret_cast< RequestPtr >( m_lRequestID ); + pRequest( lObjectID ); + + return S_OK; } |
From: <ha...@us...> - 2003-03-24 11:03:50
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv5302 Modified Files: ACHooks.cpp Log Message: buglet for timestamp Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** ACHooks.cpp 24 Mar 2003 09:27:36 -0000 1.46 --- ACHooks.cpp 24 Mar 2003 11:03:47 -0000 1.47 *************** *** 896,903 **** int iOffset = 0; ! char* szTemp = new char[iStrLen+2]; memset( szTemp, 0, iStrLen+2 ); ! strncpy( szTemp, strText, sizeof( szTemp ) ); ! strncat( szTemp, "\n", sizeof( szTemp ) ); InternalRawWriteToChat( szTemp, lColor, *Addy, 0 ); --- 896,903 ---- int iOffset = 0; ! char* szTemp = new char[iStrLen + 2]; memset( szTemp, 0, iStrLen+2 ); ! strncpy( szTemp, strText, iStrLen + 2 ); ! strncat( szTemp, "\n", iStrLen + 2 ); InternalRawWriteToChat( szTemp, lColor, *Addy, 0 ); |
From: <ha...@us...> - 2003-03-24 09:27:39
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv3835 Modified Files: ACHooks.cpp Log Message: some fixes + changes/whatever Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ACHooks.cpp 24 Mar 2003 08:41:16 -0000 1.45 --- ACHooks.cpp 24 Mar 2003 09:27:36 -0000 1.46 *************** *** 39,45 **** bool g_bTimestamp; ! char g_szTimestampFormat[MAX_PATH]; DWORD g_lTimestampColor; ! char charBufferPreviousCall; extern void __fastcall OnChatMessage( int _ecx, int _edx, char* pText, long dwColor ); --- 39,45 ---- bool g_bTimestamp; ! char *g_szTimestampFormat; DWORD g_lTimestampColor; ! char g_charBufferPreviousCall; extern void __fastcall OnChatMessage( int _ecx, int _edx, char* pText, long dwColor ); *************** *** 95,119 **** m_HookCount = 0; USES_CONVERSION; _bstr_t _Unnamed; - charBufferPreviousCall = '\n'; - char szPath[ MAX_PATH ]; DWORD dwCount = MAX_PATH; DWORD dwTimestamp = 0; ! char* szTimestampFormat = new char[MAX_PATH]; DWORD lTimestampFormatLength = MAX_PATH; CRegKey key; ! key.Open( HKEY_LOCAL_MACHINE, "SOFTWARE\\Decal", KEY_READ ); ! key.QueryValue( dwTimestamp, "Timestamp" ); ! key.QueryStringValue( _T( "TimestampFormat" ), szTimestampFormat, &lTimestampFormatLength ); /* Heyus 21 March 2003 */ ! key.QueryDWORDValue( _T( "TimestampColor" ), g_lTimestampColor ); ! key.Close(); ! memset( g_szTimestampFormat, 0, MAX_PATH ); ! _snprintf( g_szTimestampFormat, MAX_PATH, "%s ", szTimestampFormat ); // 0xFFFFFFFF = same color as chat text, for those that want time stamps but don't // want to infringe upon their 300 max chat window items if( g_lTimestampColor < 0 || g_lTimestampColor > 22 && g_lTimestampColor != 0xFFFFFFFF ) g_lTimestampColor = 12; // Grey --- 95,135 ---- m_HookCount = 0; + USES_CONVERSION; _bstr_t _Unnamed; + char szPath[ MAX_PATH ]; DWORD dwCount = MAX_PATH; + + g_charBufferPreviousCall = '\n'; DWORD dwTimestamp = 0; ! char szTimestampFormat[ MAX_PATH ]; DWORD lTimestampFormatLength = MAX_PATH; + CRegKey key; ! if( key.Open( HKEY_LOCAL_MACHINE, "SOFTWARE\\Decal", KEY_READ ) == ERROR_SUCCESS ) ! { ! if( key.QueryValue( dwTimestamp, "Timestamp" ) != ERROR_SUCCESS ) ! dwTimestamp = 0; ! ! if( key.QueryValue( szTimestampFormat, "TimestampFormat", &lTimestampFormatLength ) != ERROR_SUCCESS ) /* Heyus 21 March 2003 */ ! memset( szTimestampFormat, 0, sizeof(szTimestampFormat) ), strncpy( szTimestampFormat, "[%H:%M]", sizeof( szTimestampFormat ) ); ! ! if( key.QueryValue( g_lTimestampColor, "TimestampColor" ) != ERROR_SUCCESS ) ! g_lTimestampColor = 12; // Grey ! ! key.Close(); ! } ! ! int iStrLen = strlen( szTimestampFormat ) + 2; ! g_szTimestampFormat = new char[ iStrLen ]; ! memset( g_szTimestampFormat, 0, iStrLen ); ! _snprintf( g_szTimestampFormat, iStrLen, "%s ", szTimestampFormat ); ! // 0xFFFFFFFF = same color as chat text, for those that want time stamps but don't // want to infringe upon their 300 max chat window items + if( g_lTimestampColor < 0 || g_lTimestampColor > 22 && g_lTimestampColor != 0xFFFFFFFF ) g_lTimestampColor = 12; // Grey *************** *** 121,124 **** --- 137,143 ---- g_bTimestamp = static_cast< bool >( dwTimestamp ); + + + TCHAR szFilename[ MAX_PATH ]; ::GetModuleFileName( NULL, szFilename, MAX_PATH ); *************** *** 130,133 **** --- 149,155 ---- return; + + + key.Open( HKEY_LOCAL_MACHINE, "SOFTWARE\\Decal\\Agent", KEY_READ ); key.QueryValue( szPath, "AgentPath", &dwCount ); *************** *** 667,670 **** --- 689,694 ---- _bstr_t _Unnamed; + delete [] g_szTimestampFormat; + long Val, lCall1 = 0, lCall2 = 0; if( QueryMemLoc( BSTRT( "ObjectDestroyed_Call1"), &Val ) == S_OK ) *************** *** 691,695 **** } ! STDMETHODIMP cACHooks::SetDecal(IUnknown *pDecal) { if( m_bDecalRef ) --- 715,719 ---- } ! STDMETHODIMP cACHooks::SetDecal( IUnknown *pDecal ) { if( m_bDecalRef ) *************** *** 699,703 **** } ! if( pDecal->QueryInterface( __uuidof(IDecal), reinterpret_cast< void ** >(&m_pDecal) ) == S_OK ) m_bDecalRef = true; --- 723,727 ---- } ! if( pDecal->QueryInterface( __uuidof( IDecal ), reinterpret_cast< void ** >( &m_pDecal ) ) == S_OK ) m_bDecalRef = true; *************** *** 727,731 **** } ! STDMETHODIMP cACHooks::get_CurrentSelection(long *pVal) { if( !m_bCurrentSelect ) --- 751,755 ---- } ! STDMETHODIMP cACHooks::get_CurrentSelection( long *pVal ) { if( !m_bCurrentSelect ) *************** *** 779,783 **** if( g_bTimestamp ) { ! bool bDoTimeStamp = (charBufferPreviousCall == '\n') ? true : false; int iStrLen = strlen( pText ); --- 803,807 ---- if( g_bTimestamp ) { ! bool bDoTimeStamp = (g_charBufferPreviousCall == '\n') ? true : false; int iStrLen = strlen( pText ); *************** *** 787,791 **** // Copy into a larger buffer to accomodate a possible \n // If i were more awake, I'd see if this could just be replaced with ! // charBufferPreviousCall = pText[strlen(pText)] int iOffset = 0; char *szTemp = pText; --- 811,815 ---- // Copy into a larger buffer to accomodate a possible \n // If i were more awake, I'd see if this could just be replaced with ! // g_charBufferPreviousCall = pText[strlen(pText)] int iOffset = 0; char *szTemp = pText; *************** *** 793,821 **** { szTimeStamp[ iOffset++ ] = *szTemp; ! charBufferPreviousCall = *szTemp; szTemp++; } // Format a time stamp ! char szFormattedTimestamp[MAX_PATH]; memset( szFormattedTimestamp, 0, MAX_PATH ); time_t stTmpTime; time( &stTmpTime ); ! struct tm *tmTime = localtime( &stTmpTime ); ! DWORD lFormattedStampLength = (DWORD)strftime( szFormattedTimestamp, MAX_PATH, g_szTimestampFormat, tmTime ); while( *szTimeStamp != NULL && *szTimeStamp == '\n' ) { pfnOldChatMessage( chatMessageArg1, chatMessageArg2, "\n", lColor ); ! charBufferPreviousCall = '\n'; *szTimeStamp++; } char* szToken = strtok( szTimeStamp, _T( "\n" ) ); char* toWrite; while( szToken != NULL ) { ! int len = strlen( szToken ) + ( g_lTimestampColor == 0xFFFFFFFF ? lFormattedStampLength : 0 ) + 3; ! toWrite = new char[len]; memset( toWrite, 0, len ); --- 817,852 ---- { szTimeStamp[ iOffset++ ] = *szTemp; ! g_charBufferPreviousCall = *szTemp; szTemp++; } // Format a time stamp ! char szFormattedTimestamp[ MAX_PATH ]; memset( szFormattedTimestamp, 0, MAX_PATH ); + time_t stTmpTime; time( &stTmpTime ); ! ! tm *tmTime = localtime( &stTmpTime ); ! long lFormattedStampLength = (long) strftime( szFormattedTimestamp, MAX_PATH, g_szTimestampFormat, tmTime ); while( *szTimeStamp != NULL && *szTimeStamp == '\n' ) { pfnOldChatMessage( chatMessageArg1, chatMessageArg2, "\n", lColor ); ! g_charBufferPreviousCall = '\n'; *szTimeStamp++; } + char* szToken = strtok( szTimeStamp, _T( "\n" ) ); char* toWrite; + + if( g_lTimestampColor != 0xFFFFFFFF ) + lFormattedStampLength = 0; + while( szToken != NULL ) { ! int len = strlen( szToken ) + lFormattedStampLength + 3; ! toWrite = new char[ len ]; memset( toWrite, 0, len ); *************** *** 827,830 **** --- 858,862 ---- pfnOldChatMessage( chatMessageArg1, chatMessageArg2, szFormattedTimestamp, g_lTimestampColor ); } + toWrite = strcat( toWrite, szToken ); *************** *** 832,835 **** --- 864,868 ---- if( nextToken != NULL || pText[strlen(pText)-1] == '\n' ) toWrite = strcat( toWrite, "\n" ); + pfnOldChatMessage( chatMessageArg1, chatMessageArg2, toWrite, lColor ); szToken = nextToken; *************** *** 840,843 **** --- 873,877 ---- delete[] szTimeStamp; } + else pfnOldChatMessage( chatMessageArg1, chatMessageArg2, pText, lColor ); *************** *** 864,869 **** char* szTemp = new char[iStrLen+2]; memset( szTemp, 0, iStrLen+2 ); ! strcpy( szTemp, strText ); ! strcat( szTemp, "\n" ); InternalRawWriteToChat( szTemp, lColor, *Addy, 0 ); --- 898,903 ---- char* szTemp = new char[iStrLen+2]; memset( szTemp, 0, iStrLen+2 ); ! strncpy( szTemp, strText, sizeof( szTemp ) ); ! strncat( szTemp, "\n", sizeof( szTemp ) ); InternalRawWriteToChat( szTemp, lColor, *Addy, 0 ); *************** *** 2002,2009 **** { if( !DispatchChatMessage( pText, lColor ) ) - { InternalRawWriteToChat( pText, lColor, _ecx, _edx ); ! return; ! } return; } --- 2036,2041 ---- { if( !DispatchChatMessage( pText, lColor ) ) InternalRawWriteToChat( pText, lColor, _ecx, _edx ); ! return; } |
From: <ha...@us...> - 2003-03-24 08:41:20
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv20918 Modified Files: ACHooks.cpp Log Message: heyus's timestamping crap :) Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** ACHooks.cpp 22 Mar 2003 01:37:05 -0000 1.44 --- ACHooks.cpp 24 Mar 2003 08:41:16 -0000 1.45 *************** *** 4,7 **** --- 4,8 ---- #include "ACHooks.h" #include <math.h> + #include <time.h> /* Heyus 23 March 2003 */ /* *************** *** 38,41 **** --- 39,44 ---- bool g_bTimestamp; + char g_szTimestampFormat[MAX_PATH]; + DWORD g_lTimestampColor; char charBufferPreviousCall; *************** *** 101,108 **** DWORD dwTimestamp = 0; CRegKey key; key.Open( HKEY_LOCAL_MACHINE, "SOFTWARE\\Decal", KEY_READ ); key.QueryValue( dwTimestamp, "Timestamp" ); ! key.Close(); g_bTimestamp = static_cast< bool >( dwTimestamp ); --- 104,121 ---- DWORD dwTimestamp = 0; + char* szTimestampFormat = new char[MAX_PATH]; + DWORD lTimestampFormatLength = MAX_PATH; CRegKey key; key.Open( HKEY_LOCAL_MACHINE, "SOFTWARE\\Decal", KEY_READ ); key.QueryValue( dwTimestamp, "Timestamp" ); ! key.QueryStringValue( _T( "TimestampFormat" ), szTimestampFormat, &lTimestampFormatLength ); /* Heyus 21 March 2003 */ ! key.QueryDWORDValue( _T( "TimestampColor" ), g_lTimestampColor ); ! key.Close(); ! memset( g_szTimestampFormat, 0, MAX_PATH ); ! _snprintf( g_szTimestampFormat, MAX_PATH, "%s ", szTimestampFormat ); ! // 0xFFFFFFFF = same color as chat text, for those that want time stamps but don't ! // want to infringe upon their 300 max chat window items ! if( g_lTimestampColor < 0 || g_lTimestampColor > 22 && g_lTimestampColor != 0xFFFFFFFF ) ! g_lTimestampColor = 12; // Grey g_bTimestamp = static_cast< bool >( dwTimestamp ); *************** *** 756,782 **** } ! STDMETHODIMP cACHooks::ChatOut(BSTR szText, long lColor) { - if( pfnOldChatMessage == NULL ) - return S_FALSE; - - DWORD *Addy = reinterpret_cast< DWORD * > ( m_lChatMessageAddy ); - if( *Addy == NULL ) - return S_FALSE; - - USES_CONVERSION; - - char *strText = OLE2A( szText ); - int iStrLen = strlen( strText ); - if( g_bTimestamp ) { bool bDoTimeStamp = (charBufferPreviousCall == '\n') ? true : false; ! char *szTimeStamp = new char[ iStrLen + 25 ]; ! memset( szTimeStamp, 0, iStrLen + 25 ); int iOffset = 0; ! char *szTemp = strText; while( *szTemp != 0 ) { --- 769,793 ---- } ! /* Heyus - 23 March 2003 */ ! // Should be the method by which all functions write text to the chat window ! // Writes raw text (does not append \n). chatMessageArg1 and 2 are the first two ! // arguments you normally pass to pfnOldChatMessage. THIS SHOULD NOT BE CALLED BY ! // PLUGINS/FILTERS UNLESS ABSOLUTELY NECESSARY. ! // Will implement IKitchenSink later ! void InternalRawWriteToChat( char* pText, long lColor, int chatMessageArg1, int chatMessageArg2 ) { if( g_bTimestamp ) { bool bDoTimeStamp = (charBufferPreviousCall == '\n') ? true : false; + int iStrLen = strlen( pText ); ! char *szTimeStamp = new char[ iStrLen + 2 ]; ! memset( szTimeStamp, 0, iStrLen + 2 ); + // Copy into a larger buffer to accomodate a possible \n + // If i were more awake, I'd see if this could just be replaced with + // charBufferPreviousCall = pText[strlen(pText)] int iOffset = 0; ! char *szTemp = pText; while( *szTemp != 0 ) { *************** *** 786,874 **** } ! charBufferPreviousCall = '\n'; ! ! SYSTEMTIME stTime; ! GetLocalTime( &stTime ); ! char *szLB = strstr( szTimeStamp, "\n" ); ! if( szLB != NULL ) { ! char *szToken = strtok( szTimeStamp, "\n" ); ! ! if( !bDoTimeStamp ) ! { ! if( szToken != NULL ) ! { ! int iStrLenA = strlen( szToken ) + 11; ! char *szTimeStampA = new char[ iStrLenA ]; ! memset( szTimeStampA, 0, iStrLenA ); ! ! _snprintf( szTimeStampA, iStrLenA, "%s\n", szToken ); ! pfnOldChatMessage( *Addy, 0, szTimeStampA, lColor ); ! ! szToken = strtok( NULL, "\n" ); ! delete [] szTimeStampA; ! } ! ! else ! { ! char *szNewLine = "\n"; ! pfnOldChatMessage( *Addy, 0, szNewLine, lColor ); ! } ! } ! ! while( szToken != NULL ) ! { ! int iStrLenA = strlen( szToken ) + 11; ! char *szTimeStampA = new char[ iStrLenA ]; ! memset( szTimeStampA, 0, iStrLenA ); ! ! _snprintf( szTimeStampA, iStrLenA, "[%d:%02d] %s\n", stTime.wHour, stTime.wMinute, szToken ); ! pfnOldChatMessage( *Addy, 0, szTimeStampA, lColor ); ! ! szToken = strtok( NULL, "\n" ); ! delete [] szTimeStampA; ! } } ! else { if( bDoTimeStamp ) { ! if( strText != NULL ) ! { ! _snprintf( szTimeStamp, iStrLen + 25, "[%d:%02d] %s", stTime.wHour, stTime.wMinute, strText ); ! pfnOldChatMessage( *Addy, 0, szTimeStamp, lColor ); ! } ! else ! pfnOldChatMessage( *Addy, 0, strText, lColor ); } ! else ! { ! //_snprintf( szTimeStamp, iStrLen + 25, "%s\n", stTime.wHour, stTime.wMinute, strText ); ! pfnOldChatMessage( *Addy, 0, strText, lColor ); ! } ! } ! char *szNewLine = "\n"; ! pfnOldChatMessage( *Addy, 0, szNewLine, lColor ); ! delete [] szTimeStamp; } - else ! { ! char *pText = new char[ iStrLen + 3 ]; ! _snprintf( pText, iStrLen + 2, "%s\n", strText ); ! pfnOldChatMessage( *Addy, 0, pText, lColor ); ! delete [] pText; ! } ! return S_OK; } ! STDMETHODIMP cACHooks::RawChatOut(BSTR szText, long lColor) { if( pfnOldChatMessage == NULL ) --- 797,851 ---- } ! // Format a time stamp ! char szFormattedTimestamp[MAX_PATH]; ! memset( szFormattedTimestamp, 0, MAX_PATH ); ! time_t stTmpTime; ! time( &stTmpTime ); ! struct tm *tmTime = localtime( &stTmpTime ); ! DWORD lFormattedStampLength = (DWORD)strftime( szFormattedTimestamp, MAX_PATH, g_szTimestampFormat, tmTime ); ! while( *szTimeStamp != NULL && *szTimeStamp == '\n' ) { ! pfnOldChatMessage( chatMessageArg1, chatMessageArg2, "\n", lColor ); ! charBufferPreviousCall = '\n'; ! *szTimeStamp++; } + char* szToken = strtok( szTimeStamp, _T( "\n" ) ); ! char* toWrite; ! while( szToken != NULL ) { + int len = strlen( szToken ) + ( g_lTimestampColor == 0xFFFFFFFF ? lFormattedStampLength : 0 ) + 3; + toWrite = new char[len]; + memset( toWrite, 0, len ); + if( bDoTimeStamp ) { ! if( g_lTimestampColor == 0xFFFFFFFF ) ! toWrite = strcat( toWrite, szFormattedTimestamp ); else ! pfnOldChatMessage( chatMessageArg1, chatMessageArg2, szFormattedTimestamp, g_lTimestampColor ); } + toWrite = strcat( toWrite, szToken ); ! char* nextToken = strtok( NULL, "\n" ); ! if( nextToken != NULL || pText[strlen(pText)-1] == '\n' ) ! toWrite = strcat( toWrite, "\n" ); ! pfnOldChatMessage( chatMessageArg1, chatMessageArg2, toWrite, lColor ); ! szToken = nextToken; ! delete[] toWrite; ! } ! delete[] szTimeStamp; } else ! pfnOldChatMessage( chatMessageArg1, chatMessageArg2, pText, lColor ); ! return; } ! /* Heyus - 23 Mar 2003 - Fixed to point to the new universal function */ ! STDMETHODIMP cACHooks::ChatOut(BSTR szText, long lColor) { if( pfnOldChatMessage == NULL ) *************** *** 882,974 **** char *strText = OLE2A( szText ); ! if( g_bTimestamp ) ! { ! bool bDoTimeStamp = (charBufferPreviousCall == '\n') ? true : false; ! int iStrLen = strlen( strText ); ! ! char *szTimeStamp = new char[ iStrLen + 25 ]; ! memset( szTimeStamp, 0, iStrLen + 25 ); ! ! int iOffset = 0; ! char *szTemp = strText; ! while( *szTemp != 0 ) ! { ! szTimeStamp[ iOffset++ ] = *szTemp; ! charBufferPreviousCall = *szTemp; ! szTemp++; ! } ! ! SYSTEMTIME stTime; ! GetLocalTime( &stTime ); ! ! char *szLB = strstr( szTimeStamp, "\n" ); ! if( szLB != NULL ) ! { ! char *szToken = strtok( szTimeStamp, "\n" ); ! ! if( !bDoTimeStamp ) ! { ! if( szToken != NULL ) ! { ! int iStrLenA = strlen( szToken ) + 11; ! char *szTimeStampA = new char[ iStrLenA ]; ! memset( szTimeStampA, 0, iStrLenA ); ! ! _snprintf( szTimeStampA, iStrLenA, "%s\n", szToken ); ! pfnOldChatMessage( *Addy, 0, szTimeStampA, lColor ); ! ! szToken = strtok( NULL, "\n" ); ! delete [] szTimeStampA; ! } ! ! else ! { ! char *szNewLine = "\n"; ! pfnOldChatMessage( *Addy, 0, szNewLine, lColor ); ! } ! } ! ! while( szToken != NULL ) ! { ! int iStrLenA = strlen( szToken ) + 11; ! char *szTimeStampA = new char[ iStrLenA ]; ! memset( szTimeStampA, 0, iStrLenA ); ! ! _snprintf( szTimeStampA, iStrLenA, "[%d:%02d] %s\n", stTime.wHour, stTime.wMinute, szToken ); ! pfnOldChatMessage( *Addy, 0, szTimeStampA, lColor ); ! ! szToken = strtok( NULL, "\n" ); ! delete [] szTimeStampA; ! } ! } ! else ! { ! if( bDoTimeStamp ) ! { ! if( strText != NULL ) ! { ! _snprintf( szTimeStamp, iStrLen + 25, "[%d:%02d] %s", stTime.wHour, stTime.wMinute, strText ); ! pfnOldChatMessage( *Addy, 0, szTimeStamp, lColor ); ! } ! else ! pfnOldChatMessage( *Addy, 0, strText, lColor ); ! } ! else ! { ! //_snprintf( szTimeStamp, iStrLen + 25, "%s\n", stTime.wHour, stTime.wMinute, strText ); ! pfnOldChatMessage( *Addy, 0, strText, lColor ); ! } ! } ! delete [] szTimeStamp; ! } ! else ! pfnOldChatMessage( *Addy, 0, strText, lColor ); return S_OK; } --- 859,889 ---- char *strText = OLE2A( szText ); + int iStrLen = strlen( strText ); ! int iOffset = 0; ! char* szTemp = new char[iStrLen+2]; ! memset( szTemp, 0, iStrLen+2 ); ! strcpy( szTemp, strText ); ! strcat( szTemp, "\n" ); ! InternalRawWriteToChat( szTemp, lColor, *Addy, 0 ); ! return S_OK; ! } ! /* Heyus - 23 Mar 2003 - Fixed to point to the new universal function */ ! STDMETHODIMP cACHooks::RawChatOut(BSTR szText, long lColor) ! { ! if( pfnOldChatMessage == NULL ) ! return S_FALSE; ! DWORD *Addy = reinterpret_cast< DWORD * > ( m_lChatMessageAddy ); ! if( *Addy == NULL ) ! return S_FALSE; ! USES_CONVERSION; ! char *strText = OLE2A( szText ); + InternalRawWriteToChat( strText, lColor, *Addy, 0 ); return S_OK; } *************** *** 2083,2172 **** } void __fastcall OnChatMessage( int _ecx, int _edx, char* pText, long lColor ) { if( !DispatchChatMessage( pText, lColor ) ) { ! if( g_bTimestamp ) ! { ! bool bDoTimeStamp = (charBufferPreviousCall == '\n') ? true : false; ! int iStrLen = strlen( pText ); ! ! char *szTimeStamp = new char[ iStrLen + 25 ]; ! memset( szTimeStamp, 0, iStrLen + 25 ); ! ! int iOffset = 0; ! char *szTemp = pText; ! while( *szTemp != 0 ) ! { ! szTimeStamp[ iOffset++ ] = *szTemp; ! charBufferPreviousCall = *szTemp; ! szTemp++; ! } ! ! SYSTEMTIME stTime; ! GetLocalTime( &stTime ); ! ! char *szLB = strstr( szTimeStamp, "\n" ); ! if( szLB != NULL ) ! { ! char *szToken = strtok( szTimeStamp, "\n" ); ! ! if( !bDoTimeStamp ) ! { ! if( szToken != NULL ) ! { ! int iStrLenA = strlen( szToken ) + 11; ! char *szTimeStampA = new char[ iStrLenA ]; ! memset( szTimeStampA, 0, iStrLenA ); ! ! _snprintf( szTimeStampA, iStrLenA, "%s\n", szToken ); ! pfnOldChatMessage( _ecx, _edx, szTimeStampA, lColor ); ! ! szToken = strtok( NULL, "\n" ); ! delete [] szTimeStampA; ! } ! ! else ! { ! char *szNewLine = "\n"; ! pfnOldChatMessage( _ecx, _edx, szNewLine, lColor ); ! } ! } ! ! while( szToken != NULL ) ! { ! int iStrLenA = strlen( szToken ) + 11; ! char *szTimeStampA = new char[ iStrLenA ]; ! memset( szTimeStampA, 0, iStrLenA ); ! ! _snprintf( szTimeStampA, iStrLenA, "[%d:%02d] %s\n", stTime.wHour, stTime.wMinute, szToken ); ! pfnOldChatMessage( _ecx, _edx, szTimeStampA, lColor ); ! ! szToken = strtok( NULL, "\n" ); ! delete [] szTimeStampA; ! } ! } ! ! else ! { ! if( bDoTimeStamp ) ! { ! _snprintf( szTimeStamp, iStrLen + 25, "[%d:%02d] %s\n", stTime.wHour, stTime.wMinute, pText ); ! pfnOldChatMessage( _ecx, _edx, szTimeStamp, lColor ); ! } ! ! else ! { ! _snprintf( szTimeStamp, iStrLen + 25, "%s\n", stTime.wHour, stTime.wMinute, pText ); ! pfnOldChatMessage( _ecx, _edx, szTimeStamp, lColor ); ! } ! } ! ! delete [] szTimeStamp; ! } ! ! else ! pfnOldChatMessage( _ecx, _edx, pText, lColor ); } } --- 1998,2010 ---- } + /* Heyus - 23 Mar 2003 - Fixed to point to the new universal function */ void __fastcall OnChatMessage( int _ecx, int _edx, char* pText, long lColor ) { if( !DispatchChatMessage( pText, lColor ) ) { ! InternalRawWriteToChat( pText, lColor, _ecx, _edx ); ! return; } + return; } |
From: <par...@us...> - 2003-03-22 02:43:16
|
Update of /cvsroot/decaldev/source/DenAgent In directory sc8-pr-cvs1:/tmp/cvs-serv11886 Modified Files: DenAgentDlg.cpp Log Message: seems vc6 doesn't like my querystringvalue Index: DenAgentDlg.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/DenAgentDlg.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** DenAgentDlg.cpp 20 Mar 2003 22:57:23 -0000 1.28 --- DenAgentDlg.cpp 22 Mar 2003 02:43:13 -0000 1.29 *************** *** 765,769 **** DWORD dwSize = 512; ! if (keySub.QueryStringValue(_T("Uninstaller"), sUninstall, &dwSize) == ERROR_SUCCESS) { CRegKey keyUninstall; --- 765,769 ---- DWORD dwSize = 512; ! if (keySub.QueryValue(sUninstall, _T("Uninstaller"), &dwSize) == ERROR_SUCCESS) { CRegKey keyUninstall; *************** *** 776,780 **** dwSize = 512; ! keyUninstall.QueryStringValue(_T("UninstallString"), sUninstallPath, &dwSize); keyUninstall.Close(); --- 776,780 ---- dwSize = 512; ! keyUninstall.QueryValue(sUninstallPath, _T("UninstallString"), &dwSize); keyUninstall.Close(); |
From: <ha...@us...> - 2003-03-22 01:37:22
|
Update of /cvsroot/decaldev/source/Include In directory sc8-pr-cvs1:/tmp/cvs-serv25198 Modified Files: Decal.idl Log Message: Fix because VB is lame Index: Decal.idl =================================================================== RCS file: /cvsroot/decaldev/source/Include/Decal.idl,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Decal.idl 18 Mar 2003 17:38:54 -0000 1.34 --- Decal.idl 22 Mar 2003 01:37:17 -0000 1.35 *************** *** 423,427 **** [id(2), helpstring("method OnChatBoxMessage")] VARIANT_BOOL OnChatBoxMessage([in] BSTR bstrText, [in] LONG lColor, [in,out] VARIANT_BOOL *bEat ); [id(3), helpstring("method OnCommandLineText")] VARIANT_BOOL OnCommandLineText([in] BSTR bstrText, [in,out] VARIANT_BOOL *bEat ); ! [id(4), helpstring("method SelectItem")] HRESULT SelectItem([in] LONG lGuid); }; --- 423,427 ---- [id(2), helpstring("method OnChatBoxMessage")] VARIANT_BOOL OnChatBoxMessage([in] BSTR bstrText, [in] LONG lColor, [in,out] VARIANT_BOOL *bEat ); [id(3), helpstring("method OnCommandLineText")] VARIANT_BOOL OnCommandLineText([in] BSTR bstrText, [in,out] VARIANT_BOOL *bEat ); ! [id(4), helpstring("method OnSelectItem")] HRESULT OnSelectItem([in] LONG lGuid); }; |
From: <ha...@us...> - 2003-03-22 01:37:09
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv25100 Modified Files: ACHooks.cpp DecalCP.h Log Message: Fix because VB is lame Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** ACHooks.cpp 18 Mar 2003 17:38:52 -0000 1.43 --- ACHooks.cpp 22 Mar 2003 01:37:05 -0000 1.44 *************** *** 1970,1974 **** void cACHooks::InternalSelectItem( DWORD dwID ) { ! Fire_SelectItem( dwID ); } --- 1970,1974 ---- void cACHooks::InternalSelectItem( DWORD dwID ) { ! Fire_OnSelectItem( dwID ); } Index: DecalCP.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/DecalCP.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DecalCP.h 7 Mar 2003 19:17:25 -0000 1.6 --- DecalCP.h 22 Mar 2003 01:37:06 -0000 1.7 *************** *** 113,117 **** } ! HRESULT Fire_SelectItem(LONG guid) { CComVariant varResult; --- 113,117 ---- } ! HRESULT Fire_OnSelectItem(LONG guid) { CComVariant varResult; |
From: <che...@us...> - 2003-03-21 17:08:32
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv29812/Inject Modified Files: View.h Log Message: Moved the new properties to the end of the class for sanity Index: View.h =================================================================== RCS file: /cvsroot/decaldev/source/Inject/View.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** View.h 14 Mar 2003 04:22:08 -0000 1.8 --- View.h 21 Mar 2003 17:08:27 -0000 1.9 *************** *** 77,86 **** STDMETHOD(Deactivate)(); STDMETHOD(put_Position)(/*[in]*/ RECT *newVal); ! STDMETHOD(get_Position)(/*[out, retval]*/ RECT *pVal); ! ! STDMETHOD(put_Activated)(/*[in]*/ VARIANT_BOOL newVal); ! STDMETHOD(get_Activated)(/*[out, retval]*/ VARIANT_BOOL *pVal); ! STDMETHOD(put_Alpha)(long Alpha); }; --- 77,84 ---- STDMETHOD(Deactivate)(); STDMETHOD(put_Position)(/*[in]*/ RECT *newVal); ! STDMETHOD(get_Position)(/*[out, retval]*/ RECT *pVal); STDMETHOD(put_Alpha)(long Alpha); + STDMETHOD(get_Activated)(/*[out, retval]*/ VARIANT_BOOL *pVal); + STDMETHOD(put_Activated)(/*[in]*/ VARIANT_BOOL newVal); }; |
From: <ha...@us...> - 2003-03-21 09:03:27
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv17504 Modified Files: Inject.idl Log Message: move Activated to IViewDisp -> IView to fix problems with nerf's controls Index: Inject.idl =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Inject.idl,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Inject.idl 17 Mar 2003 09:23:19 -0000 1.36 --- Inject.idl 21 Mar 2003 09:03:22 -0000 1.37 *************** *** 591,596 **** [propput, helpstring("property Position")] HRESULT Position([in, out] RECT *newVal); [propget, helpstring("property Position")] HRESULT Position([out, retval] RECT *pVal); - [propget, helpstring("property Activated")] HRESULT Activated([out, retval] VARIANT_BOOL* pVal); - [propput, helpstring("property Activated")] HRESULT Activated([in] VARIANT_BOOL newVal); }; --- 591,594 ---- *************** *** 606,609 **** --- 604,609 ---- [helpstring("method LoadSchema")] HRESULT LoadSchema(BSTR strXMLSchema); [propput, helpstring("property Alpha")] HRESULT Alpha(long Alpha); + [propget, helpstring("property Activated")] HRESULT Activated([out, retval] VARIANT_BOOL* pVal); + [propput, helpstring("property Activated")] HRESULT Activated([in] VARIANT_BOOL newVal); }; |
From: <par...@us...> - 2003-03-21 06:12:09
|
Update of /cvsroot/decaldev/source/DenAgent In directory sc8-pr-cvs1:/tmp/cvs-serv24452 Modified Files: OptionsDlg.cpp Log Message: confusion as to the meaning of 1 (error in converting the radar / bar adjustment) Index: OptionsDlg.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/OptionsDlg.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** OptionsDlg.cpp 20 Mar 2003 22:56:32 -0000 1.13 --- OptionsDlg.cpp 21 Mar 2003 06:12:06 -0000 1.14 *************** *** 106,110 **** key.QueryValue( dwRadarDraw, "BarRadarDraw" ); //::SendMessage( GetDlgItem( IDC_RADARNO )->m_hWnd, BM_SETCHECK, !dwRadarDraw, 0 ); ! ::SendMessage( GetDlgItem( IDC_RADARYES )->m_hWnd, BM_SETCHECK, dwRadarDraw, 0 ); DWORD dwTimestamp = 0; --- 106,110 ---- key.QueryValue( dwRadarDraw, "BarRadarDraw" ); //::SendMessage( GetDlgItem( IDC_RADARNO )->m_hWnd, BM_SETCHECK, !dwRadarDraw, 0 ); ! ::SendMessage( GetDlgItem( IDC_RADARYES )->m_hWnd, BM_SETCHECK, !dwRadarDraw, 0 ); DWORD dwTimestamp = 0; *************** *** 231,236 **** if( ::SendMessage( GetDlgItem( IDC_RADARYES )->m_hWnd, BM_GETCHECK, 0, 0 ) ) { ! key.SetValue( (DWORD) 1, "BarRadarDraw" ); ! if( !dwRadarDraw ) key.SetValue( (DWORD) 0, "BarDelta" ); } --- 231,236 ---- if( ::SendMessage( GetDlgItem( IDC_RADARYES )->m_hWnd, BM_GETCHECK, 0, 0 ) ) { ! key.SetValue( (DWORD) 0, "BarRadarDraw" ); ! if( dwRadarDraw ) key.SetValue( (DWORD) 0, "BarDelta" ); } *************** *** 238,243 **** else { ! key.SetValue( (DWORD) 0, "BarRadarDraw" ); ! if( dwRadarDraw ) key.SetValue( (DWORD) 0, "BarDelta" ); } --- 238,243 ---- else { ! key.SetValue( (DWORD) 1, "BarRadarDraw" ); ! if( !dwRadarDraw ) key.SetValue( (DWORD) 0, "BarDelta" ); } |
From: <par...@us...> - 2003-03-20 22:57:34
|
Update of /cvsroot/decaldev/source/DenAgent In directory sc8-pr-cvs1:/tmp/cvs-serv10079 Modified Files: resource.h DenAgentDlg.h DenAgentDlg.cpp DenAgent.rc Log Message: dialog clean up and added plugin removal Index: resource.h =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/resource.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** resource.h 11 Feb 2003 22:20:10 -0000 1.18 --- resource.h 20 Mar 2003 22:57:20 -0000 1.19 *************** *** 73,76 **** --- 73,78 ---- #define IDC_TIMESTAMPON 1044 #define IDC_TIMESTAMPOFF 1045 + #define IDC_DELETE 1050 + #define IDC_BUTTON1 1051 #define ID_SYSTRAY_CONFIGURE 32771 #define ID_SYSTRAY_EXIT 32772 *************** *** 82,86 **** #define _APS_NEXT_RESOURCE_VALUE 149 #define _APS_NEXT_COMMAND_VALUE 32776 ! #define _APS_NEXT_CONTROL_VALUE 1046 #define _APS_NEXT_SYMED_VALUE 105 #endif --- 84,88 ---- #define _APS_NEXT_RESOURCE_VALUE 149 #define _APS_NEXT_COMMAND_VALUE 32776 ! #define _APS_NEXT_CONTROL_VALUE 1052 #define _APS_NEXT_SYMED_VALUE 105 #endif Index: DenAgentDlg.h =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/DenAgentDlg.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** DenAgentDlg.h 20 Apr 2002 20:29:52 -0000 1.13 --- DenAgentDlg.h 20 Mar 2003 22:57:21 -0000 1.14 *************** *** 90,93 **** --- 90,95 ---- //}}AFX_MSG DECLARE_MESSAGE_MAP() + public: + afx_msg void OnBnClickedDelete(); }; Index: DenAgentDlg.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/DenAgentDlg.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** DenAgentDlg.cpp 27 May 2002 22:44:04 -0000 1.27 --- DenAgentDlg.cpp 20 Mar 2003 22:57:23 -0000 1.28 *************** *** 54,57 **** --- 54,58 ---- ON_WM_LBUTTONUP() //}}AFX_MSG_MAP + ON_BN_CLICKED(IDC_DELETE, OnBnClickedDelete) END_MESSAGE_MAP() *************** *** 721,722 **** --- 722,806 ---- CDialog::OnLButtonUp(nFlags, point); } + + void CDenAgentDlg::OnBnClickedDelete() + { + /* + HOW TO USE THIS FEATURE + create a string value under your plugin key called "Uninstaller" + the value of this key should be the name of your uninstaller program, + as listed under HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\ + for MSI installers the name will be a GUID, for others it may be a GUID or plain text + + that's it + -para + */ + + USES_CONVERSION; + + int nSelMark = m_wndPlugins.GetSelectionMark(); + if ( nSelMark == -1 ) + return; + + cPlugin *pPlugin = reinterpret_cast< cPlugin * >(m_wndPlugins.GetItemData( nSelMark )); + if ( pPlugin == NULL ) + return; + + //load up the decal registry and remove this entry + CRegKey keyPlugin; + CString decalPluginKey; + BSTR sClsid; + + StringFromCLSID(pPlugin->m_id, &sClsid); + if ((stricmp(pPlugin->m_group, "plugins") == 0) || (stricmp(pPlugin->m_group, "networkfilters") == 0)) + { + decalPluginKey.Format("SOFTWARE\\Decal\\%s", pPlugin->m_group); + + if (keyPlugin.Open(HKEY_LOCAL_MACHINE, _T(decalPluginKey), KEY_ALL_ACCESS) == ERROR_SUCCESS) + { + CRegKey keySub; + if (keySub.Open(keyPlugin.m_hKey, OLE2T(sClsid), KEY_READ) == ERROR_SUCCESS) + { + //read the uninstaller string and fire it off + TCHAR sUninstall[512]; + DWORD dwSize = 512; + + if (keySub.QueryStringValue(_T("Uninstaller"), sUninstall, &dwSize) == ERROR_SUCCESS) + { + CRegKey keyUninstall; + CString sUninstallKey; + + sUninstallKey.Format("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s", sUninstall); + if (keyUninstall.Open(HKEY_LOCAL_MACHINE, _T(sUninstallKey), KEY_READ) == ERROR_SUCCESS) + { + TCHAR sUninstallPath[512]; + dwSize = 512; + + keyUninstall.QueryStringValue(_T("UninstallString"), sUninstallPath, &dwSize); + keyUninstall.Close(); + + //execute! + STARTUPINFO si; + PROCESS_INFORMATION pi; + + memset(&si, 0, sizeof(si)); + memset(&pi, 0, sizeof(pi)); + si.cb = sizeof(si); + + CreateProcess(NULL, sUninstallPath, NULL, NULL, false, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &si, &pi); + } + } else { + ::MessageBox(NULL, _T("There was no uninstaller key defined for this object\nYou will have to uninstall it manually"), _T("Decal Error"), MB_ICONEXCLAMATION); + } + keySub.Close(); + } + + keyPlugin.DeleteSubKey(OLE2T(sClsid)); + keyPlugin.Close(); + } + else + ::MessageBox(NULL, _T("Unable to open registry"), _T("Decal Error"), MB_ICONEXCLAMATION); + + //refresh + loadPluginList(); + } + } \ No newline at end of file Index: DenAgent.rc =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/DenAgent.rc,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** DenAgent.rc 18 Mar 2003 06:53:33 -0000 1.64 --- DenAgent.rc 20 Mar 2003 22:57:24 -0000 1.65 *************** *** 64,84 **** FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN ! DEFPUSHBUTTON "Close",IDOK,208,38,50,14 ! LTEXT "Choose the Plugins you'd like to run. If a character is logged in, you must log out your character and log back in. Click update to download the latest Messages and MemLocs files from the web which some plugins might require.", ! IDC_STATIC,7,7,251,24 ! PUSHBUTTON "Refresh List",IDC_REFRESH,208,59,50,14 ! PUSHBUTTON "Add/Remove",IDC_ADDREMOVE,208,76,50,14 ! PUSHBUTTON "Update",IDC_UPDATE,208,97,50,14 ! PUSHBUTTON "Options",IDC_OPTIONS,208,114,50,14 ! LTEXT "messages",IDC_MESSAGES_TEXT,74,177,184,8 ! LTEXT "memlocs",IDC_MEMLOCS_TEXT,74,188,184,8 ! LTEXT "decalplugins",IDC_DECALPLUGINS_TEXT,74,200,184,8 ! LTEXT "Messages:",IDC_STATIC,7,177,35,8 ! LTEXT "Memory Locations:",IDC_STATIC,7,188,60,8 LTEXT "Decal Plugins List:",IDC_STATIC,7,200,59,8 CONTROL "List1",IDC_PLUGINS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | ! LVS_NOCOLUMNHEADER | WS_TABSTOP,7,38,194,132, WS_EX_CLIENTEDGE END --- 64,85 ---- FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN ! DEFPUSHBUTTON "Close",IDOK,208,194,50,14 ! LTEXT "Choose the Plugins you'd like to run. Click update to download the latest Messages and MemLocs files from the web.", ! IDC_STATIC,7,7,251,17 ! PUSHBUTTON "Refresh List",IDC_REFRESH,208,176,50,14 ! PUSHBUTTON "Add",IDC_ADDREMOVE,208,65,50,14 ! PUSHBUTTON "Update",IDC_UPDATE,208,30,50,14 ! PUSHBUTTON "Options",IDC_OPTIONS,208,48,50,14 ! LTEXT "messages",IDC_MESSAGES_TEXT,74,175,127,8 ! LTEXT "memlocs",IDC_MEMLOCS_TEXT,74,187,127,8 ! LTEXT "decalplugins",IDC_DECALPLUGINS_TEXT,74,200,127,8 ! LTEXT "Messages:",IDC_STATIC,7,175,35,8 ! LTEXT "Memory Locations:",IDC_STATIC,7,187,60,8 LTEXT "Decal Plugins List:",IDC_STATIC,7,200,59,8 CONTROL "List1",IDC_PLUGINS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | ! LVS_NOCOLUMNHEADER | WS_TABSTOP,7,30,194,140, WS_EX_CLIENTEDGE + PUSHBUTTON "Remove",IDC_DELETE,208,83,50,14 END *************** *** 123,186 **** END ! IDD_OPTIONS DIALOGEX 0, 0, 271, 255 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Decal Options" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN ! DEFPUSHBUTTON "OK",IDOK,214,12,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,214,30,50,14 ! GROUPBOX "Transparency Options",IDC_STATIC,7,50,257,45 ! CTEXT "Bar Alpha",IDC_STATIC,20,64,35,8,SS_CENTERIMAGE ! EDITTEXT IDC_BARALPHA,14,74,50,14,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER CONTROL "Spin1",IDC_BARALPHA_SPIN,"msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | ! UDS_ARROWKEYS,53,59,11,14 ! CTEXT "View Alpha",IDC_STATIC,216,63,35,8,SS_CENTERIMAGE ! EDITTEXT IDC_VIEWALPHA,214,73,50,14,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER CONTROL "Spin2",IDC_VIEWALPHA_SPIN,"msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | ! UDS_ARROWKEYS,253,58,11,14 ! CTEXT "Valid values are from 0 - 255\n\n0 is Transparent - 255 is Opaque", ! IDC_STATIC,70,64,114,26 ! GROUPBOX "Decal Update URL",IDC_STATIC,7,100,257,33 ! LTEXT "http://decaldev.sourceforge.net",IDC_PLUGINDIR,14,115, 169,8,SS_CENTERIMAGE ! PUSHBUTTON "Change",IDC_CHANGE_DIR,214,111,50,14 ! GROUPBOX "Blending Options",IDC_STATIC,7,7,257,38 ! CONTROL "Software Alpha Blending (most compatible)", ! IDC_BLENDINGSOFTWARE,"Button",BS_AUTORADIOBUTTON,14,18, ! 170,10 ! CONTROL "Hardware Alpha Blending (using GDI+)", ! IDC_BLENDINGGDIPLUS,"Button",BS_AUTORADIOBUTTON,14,30, ! 170,10 ! CONTROL "Start Decal on Bootup",IDC_CHECK_AUTOSTART,"Button", ! BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,173,162,91,8, ! WS_EX_RIGHT ! PUSHBUTTON "Reset Decal Bar Position",IDC_BTN_RESET,177,146,87,12 ! GROUPBOX "View Options",IDC_STATIC,7,138,68,37,WS_GROUP ! CONTROL "Many Views",IDC_VIEWMULTI,"Button",BS_AUTORADIOBUTTON, ! 14,160,55,11 ! CONTROL "One View",IDC_VIEWSINGLE,"Button",BS_AUTORADIOBUTTON,14, ! 147,52,11 ! GROUPBOX "Font",IDC_STATIC,7,217,257,31 CONTROL "Default",IDC_DEFAULT_FONT_RADIO,"Button", ! BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,230,39,10 CONTROL "AC Client",IDC_CLIENT_FONT_RADIO,"Button", ! BS_AUTORADIOBUTTON | WS_TABSTOP,56,230,45,10 CONTROL "Custom",IDC_CUSTOM_FONT_RADIO,"Button", ! BS_AUTORADIOBUTTON | WS_TABSTOP,105,230,39,10 ! EDITTEXT IDC_CUSTOM_FONT_EDIT,147,228,117,14,ES_AUTOHSCROLL ! GROUPBOX "Bar Options",IDC_STATIC,79,138,95,37,WS_GROUP ! CONTROL "Draw on Radar",IDC_RADARYES,"Button",BS_AUTORADIOBUTTON, ! 84,145,79,12 ! CONTROL "Don't Draw on Radar",IDC_RADARNO,"Button", ! BS_AUTORADIOBUTTON,84,159,81,11 ! GROUPBOX "Static",IDC_STATIC,7,176,94,40 ! CONTROL "Timestamps Enabled",IDC_TIMESTAMPON,"Button", ! BS_AUTORADIOBUTTON,14,186,86,13 ! CONTROL "Timestamps Disabled",IDC_TIMESTAMPOFF,"Button", ! BS_AUTORADIOBUTTON,14,202,82,12 END --- 124,172 ---- END ! IDD_OPTIONS DIALOGEX 0, 0, 271, 150 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Decal Options" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN ! DEFPUSHBUTTON "OK",IDOK,154,126,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,208,126,50,14 ! CTEXT "Bar Alpha",IDC_STATIC,17,20,35,8,SS_CENTERIMAGE ! EDITTEXT IDC_BARALPHA,59,16,45,14,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER CONTROL "Spin1",IDC_BARALPHA_SPIN,"msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | ! UDS_ARROWKEYS,47,16,11,14 ! CTEXT "View Alpha",IDC_STATIC,19,34,35,8,SS_CENTERIMAGE ! EDITTEXT IDC_VIEWALPHA,59,31,45,14,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER CONTROL "Spin2",IDC_VIEWALPHA_SPIN,"msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | ! UDS_ARROWKEYS,47,31,11,14 ! CTEXT "0 is Transparent - 255 is Opaque",IDC_STATIC,21,47,120, ! 9 ! GROUPBOX "Decal Update URL",IDC_STATIC,7,94,257,27 ! LTEXT "http://decaldev.sourceforge.net",IDC_PLUGINDIR,14,105, 169,8,SS_CENTERIMAGE ! PUSHBUTTON "Change",IDC_CHANGE_DIR,208,102,50,14 ! CONTROL "Start on Bootup",IDC_CHECK_AUTOSTART,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,14,129,63,8 ! PUSHBUTTON "Reset Bar Position",IDC_BTN_RESET,81,126,68,14 ! GROUPBOX "Font",IDC_STATIC,14,57,244,31 CONTROL "Default",IDC_DEFAULT_FONT_RADIO,"Button", ! BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,20,70,39,10 CONTROL "AC Client",IDC_CLIENT_FONT_RADIO,"Button", ! BS_AUTORADIOBUTTON | WS_TABSTOP,64,70,45,10 CONTROL "Custom",IDC_CUSTOM_FONT_RADIO,"Button", ! BS_AUTORADIOBUTTON | WS_TABSTOP,111,70,39,10 ! EDITTEXT IDC_CUSTOM_FONT_EDIT,153,68,98,14,ES_AUTOHSCROLL ! GROUPBOX "View Options",IDC_STATIC,7,7,257,86 ! CONTROL "Use Hardware Mode (GDI+)",IDC_BLENDINGGDIPLUS,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,144,16,114,9 ! CONTROL "Multiple Views",IDC_VIEWMULTI,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,144,26,114,9 ! CONTROL "Adjust Bar for Radar",IDC_RADARYES,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,144,36,114,9 ! CONTROL "Enable Time Stamping",IDC_TIMESTAMPON,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,144,47,114,9 END *************** *** 259,271 **** TOPMARGIN, 7 BOTTOMMARGIN, 208 ! HORZGUIDE, 31 ! HORZGUIDE, 38 ! HORZGUIDE, 52 ! HORZGUIDE, 59 HORZGUIDE, 90 ! HORZGUIDE, 97 ! HORZGUIDE, 128 HORZGUIDE, 170 ! HORZGUIDE, 177 END --- 245,257 ---- TOPMARGIN, 7 BOTTOMMARGIN, 208 ! HORZGUIDE, 24 ! HORZGUIDE, 30 ! HORZGUIDE, 44 ! HORZGUIDE, 48 HORZGUIDE, 90 ! HORZGUIDE, 113 ! HORZGUIDE, 144 HORZGUIDE, 170 ! HORZGUIDE, 175 END *************** *** 309,315 **** RIGHTMARGIN, 264 VERTGUIDE, 14 ! VERTGUIDE, 241 TOPMARGIN, 7 ! BOTTOMMARGIN, 248 END --- 295,301 ---- RIGHTMARGIN, 264 VERTGUIDE, 14 ! VERTGUIDE, 258 TOPMARGIN, 7 ! BOTTOMMARGIN, 143 END |
From: <par...@us...> - 2003-03-20 22:56:46
|
Update of /cvsroot/decaldev/source/DenAgent In directory sc8-pr-cvs1:/tmp/cvs-serv9745 Modified Files: OptionsDlg.cpp Log Message: cleaned up the options Index: OptionsDlg.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/OptionsDlg.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** OptionsDlg.cpp 11 Feb 2003 22:20:09 -0000 1.12 --- OptionsDlg.cpp 20 Mar 2003 22:56:32 -0000 1.13 *************** *** 105,114 **** DWORD dwRadarDraw = 1; key.QueryValue( dwRadarDraw, "BarRadarDraw" ); ! ::SendMessage( GetDlgItem( IDC_RADARNO )->m_hWnd, BM_SETCHECK, !dwRadarDraw, 0 ); ::SendMessage( GetDlgItem( IDC_RADARYES )->m_hWnd, BM_SETCHECK, dwRadarDraw, 0 ); DWORD dwTimestamp = 0; key.QueryValue( dwTimestamp, "Timestamp" ); ! ::SendMessage( GetDlgItem( IDC_TIMESTAMPOFF )->m_hWnd, BM_SETCHECK, !dwTimestamp, 0 ); ::SendMessage( GetDlgItem( IDC_TIMESTAMPON )->m_hWnd, BM_SETCHECK, dwTimestamp, 0 ); --- 105,114 ---- DWORD dwRadarDraw = 1; key.QueryValue( dwRadarDraw, "BarRadarDraw" ); ! //::SendMessage( GetDlgItem( IDC_RADARNO )->m_hWnd, BM_SETCHECK, !dwRadarDraw, 0 ); ::SendMessage( GetDlgItem( IDC_RADARYES )->m_hWnd, BM_SETCHECK, dwRadarDraw, 0 ); DWORD dwTimestamp = 0; key.QueryValue( dwTimestamp, "Timestamp" ); ! //::SendMessage( GetDlgItem( IDC_TIMESTAMPOFF )->m_hWnd, BM_SETCHECK, !dwTimestamp, 0 ); ::SendMessage( GetDlgItem( IDC_TIMESTAMPON )->m_hWnd, BM_SETCHECK, dwTimestamp, 0 ); *************** *** 131,142 **** if(key.QueryValue(dwAlphaBlendMode, "AlphaBlendMode")==ERROR_SUCCESS) ! { if(dwAlphaBlendMode==0x2) ::SendMessage(GetDlgItem(IDC_BLENDINGGDIPLUS)->m_hWnd, BM_SETCHECK, 1, 0); ! else ! ::SendMessage(GetDlgItem(IDC_BLENDINGSOFTWARE)->m_hWnd, BM_SETCHECK, 1, 0); ! } ! else ! ::SendMessage(GetDlgItem(IDC_BLENDINGSOFTWARE)->m_hWnd, BM_SETCHECK, 1, 0); --- 131,143 ---- if(key.QueryValue(dwAlphaBlendMode, "AlphaBlendMode")==ERROR_SUCCESS) ! // para - dialog clean up ! //{ if(dwAlphaBlendMode==0x2) ::SendMessage(GetDlgItem(IDC_BLENDINGGDIPLUS)->m_hWnd, BM_SETCHECK, 1, 0); ! //else ! // ::SendMessage(GetDlgItem(IDC_BLENDINGSOFTWARE)->m_hWnd, BM_SETCHECK, 1, 0); ! //} ! //else ! // ::SendMessage(GetDlgItem(IDC_BLENDINGSOFTWARE)->m_hWnd, BM_SETCHECK, 1, 0); *************** *** 144,155 **** if( key.QueryValue( dwViewMode, "ViewMode" )== ERROR_SUCCESS ) ! { if( dwViewMode == 1 ) ::SendMessage( GetDlgItem( IDC_VIEWMULTI )->m_hWnd, BM_SETCHECK, 1, 0 ); ! else ! ::SendMessage( GetDlgItem( IDC_VIEWSINGLE )->m_hWnd, BM_SETCHECK, 1, 0 ); ! } ! else ! ::SendMessage( GetDlgItem( IDC_VIEWSINGLE )->m_hWnd, BM_SETCHECK, 1, 0 ); key.Close(); --- 145,157 ---- if( key.QueryValue( dwViewMode, "ViewMode" )== ERROR_SUCCESS ) ! // para - dialog clean up ! //{ if( dwViewMode == 1 ) ::SendMessage( GetDlgItem( IDC_VIEWMULTI )->m_hWnd, BM_SETCHECK, 1, 0 ); ! //else ! // ::SendMessage( GetDlgItem( IDC_VIEWSINGLE )->m_hWnd, BM_SETCHECK, 1, 0 ); ! //} ! //else ! // ::SendMessage( GetDlgItem( IDC_VIEWSINGLE )->m_hWnd, BM_SETCHECK, 1, 0 ); key.Close(); *************** *** 255,262 **** ! if( ::SendMessage( GetDlgItem( IDC_VIEWSINGLE )->m_hWnd, BM_GETCHECK, 0, 0 ) ) ! key.SetValue( (DWORD) 0, "ViewMode" ); ! else key.SetValue( (DWORD) 1, "ViewMode" ); // Set the font info --- 257,265 ---- ! // para - dropped viewsingle, switched around ! if( ::SendMessage( GetDlgItem( IDC_VIEWMULTI )->m_hWnd, BM_GETCHECK, 0, 0 ) ) key.SetValue( (DWORD) 1, "ViewMode" ); + else + key.SetValue( (DWORD) 0, "ViewMode" ); // Set the font info |
From: <che...@us...> - 2003-03-18 17:38:58
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv20202/Inject Modified Files: Manager.cpp Log Message: fixed up client vs container checking Index: Manager.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Manager.cpp,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** Manager.cpp 18 Mar 2003 07:03:00 -0000 1.68 --- Manager.cpp 18 Mar 2003 17:38:54 -0000 1.69 *************** *** 62,77 **** if( SUCCEEDED( hRes ) ) - { - TCHAR szFilename[ MAX_PATH ]; - ::GetModuleFileName( NULL, szFilename, MAX_PATH ); - LPTSTR strProcessName = ::_tcsrchr( szFilename, _T( '\\' ) ); - - strProcessName[ 7 ] = _T( '\0' ); - - if( ::_tcsicmp( strProcessName + 1, _T( "client" ) ) != 0 ) - m_pDecal->put_Container( VARIANT_TRUE ); - hRes = m_pDecal->StartServices( ); - } } --- 62,66 ---- *************** *** 326,338 **** } ! void cManager::draw2D() { ! m_pDecal->Render2D (); if( m_pRootSite != NULL ) { _ASSERTMEM( _CrtCheckMemory( ) ); ! m_pRootSite->format(); ! m_pRootSite->prerender(); _ASSERTMEM( _CrtCheckMemory( ) ); --- 315,327 ---- } ! void cManager::draw2D( ) { ! m_pDecal->Render2D( ); if( m_pRootSite != NULL ) { _ASSERTMEM( _CrtCheckMemory( ) ); ! m_pRootSite->format( ); ! m_pRootSite->prerender( ); _ASSERTMEM( _CrtCheckMemory( ) ); *************** *** 346,350 **** { // Reset the pCanvas alpha ! pCanvas->put_Alpha(255); if( i->m_dwSinkCaps & eManagerSinkCapRender ) --- 335,339 ---- { // Reset the pCanvas alpha ! pCanvas->put_Alpha( 255 ); if( i->m_dwSinkCaps & eManagerSinkCapRender ) |
From: <che...@us...> - 2003-03-18 17:38:57
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv20202/Decal Modified Files: ACHooks.cpp ACHooks.h DecalManager.cpp DecalManager.h Log Message: fixed up client vs container checking Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** ACHooks.cpp 18 Mar 2003 06:53:32 -0000 1.42 --- ACHooks.cpp 18 Mar 2003 17:38:52 -0000 1.43 *************** *** 91,94 **** --- 91,651 ---- memset(m_HooksEx, 0, sizeof(m_HooksEx)); m_HookCount = 0; + + USES_CONVERSION; + _bstr_t _Unnamed; + + charBufferPreviousCall = '\n'; + char szPath[ MAX_PATH ]; + [...1097 lines suppressed...] - - if( QueryMemLoc( BSTRT( "OnChatMessage" ), &Val ) == S_OK ) - { - VirtualProtect( reinterpret_cast< void * >( Val ), 4, PAGE_EXECUTE_READWRITE, &dwOldProtect ); - *reinterpret_cast< long * >( Val ) = ( reinterpret_cast< long >( OnChatMessage ) - ( Val + 0x4 ) ); - } - - m_Hooks |= eHooksAvailEx; - - if( QueryMemLoc( BSTRT( "SelectItemHook" ), &Val ) == S_OK ) - { - m_lSelectItemHook = Val; - m_bSelectItemHook = true; - g_lSelectItemHijackProc = HookCall( m_lSelectItemHook, (DWORD) SelectItemHook ); - SetHookEx( eOnSelectItemEvent ); - } - - return S_OK; } --- 2202,2204 ---- Index: ACHooks.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** ACHooks.h 18 Mar 2003 06:53:33 -0000 1.36 --- ACHooks.h 18 Mar 2003 17:38:53 -0000 1.37 *************** *** 300,303 **** HRESULT GetAttributeInfo(eAttribute AttributeID, struct qAttribute *Attribute); HRESULT GetVitalInfo(eVital VitalID, struct qVital *Vital); - STDMETHOD(Start)(void); }; --- 300,302 ---- Index: DecalManager.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/DecalManager.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** DecalManager.cpp 18 Mar 2003 06:53:33 -0000 1.13 --- DecalManager.cpp 18 Mar 2003 17:38:53 -0000 1.14 *************** *** 453,457 **** m_pHooks.CoCreateInstance( _bstr_t( "Decal.ACHooks" ), NULL, CLSCTX_INPROC_SERVER ); m_pHooks->SetDecal( reinterpret_cast< IUnknown * >( this ) ); - m_pHooks->Start( ); CComPtr< IDecalEnum > pEnumServices; --- 453,456 ---- *************** *** 635,651 **** m_pHooks->QueryInterface( pVal ); return S_OK; ! } ! ! STDMETHODIMP cDecal::get_Container(VARIANT_BOOL* pVal) ! { ! // TODO: Add your implementation code here ! *pVal = ( m_fContainer ? VARIANT_TRUE : VARIANT_FALSE ); ! return S_OK; ! } ! ! STDMETHODIMP cDecal::put_Container(VARIANT_BOOL newVal) ! { ! // TODO: Add your implementation code here ! m_fContainer = ( ( newVal == VARIANT_TRUE ) ? true : false ); ! return S_OK; ! } --- 634,636 ---- m_pHooks->QueryInterface( pVal ); return S_OK; ! } \ No newline at end of file Index: DecalManager.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/DecalManager.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DecalManager.h 18 Mar 2003 06:53:33 -0000 1.4 --- DecalManager.h 18 Mar 2003 17:38:54 -0000 1.5 *************** *** 22,27 **** m_bFocus( VARIANT_FALSE ), m_bServicesStarted( false ), ! m_bPluginsStarted( false ), ! m_fContainer( false ) { } --- 22,26 ---- m_bFocus( VARIANT_FALSE ), m_bServicesStarted( false ), ! m_bPluginsStarted( false ) { } *************** *** 68,73 **** CComPtr< IACHooks > m_pHooks; - bool m_fContainer; - HRESULT convertToken( std::string &strToken, std::string &strOut ); --- 67,70 ---- *************** *** 98,103 **** STDMETHOD(get_Plugin)(REFCLSID clsid, REFIID iid, /*[out, retval]*/ LPVOID *pVal); STDMETHOD(get_Hooks)(IACHooks** pVal); - STDMETHOD(get_Container)(VARIANT_BOOL* pVal); - STDMETHOD(put_Container)(VARIANT_BOOL newVal); }; --- 95,98 ---- |
From: <che...@us...> - 2003-03-18 17:38:57
|
Update of /cvsroot/decaldev/source/Include In directory sc8-pr-cvs1:/tmp/cvs-serv20202/Include Modified Files: Decal.idl Log Message: fixed up client vs container checking Index: Decal.idl =================================================================== RCS file: /cvsroot/decaldev/source/Include/Decal.idl,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Decal.idl 18 Mar 2003 06:53:33 -0000 1.33 --- Decal.idl 18 Mar 2003 17:38:54 -0000 1.34 *************** *** 281,285 **** [propget, id(53), helpstring("property VitalTotalXP")] HRESULT VitalTotalXP([in] enum eVital VitalD, [out, retval] int *pVal); [propget, id(54), helpstring("property VitalClicks")] HRESULT VitalClicks([in] enum eVital VitalID, [out, retval] int *pVal); - [id(55), helpstring("method Start")] HRESULT Start(void); }; --- 281,284 ---- *************** *** 311,316 **** [helpstring("method Render3D")] HRESULT Render3D(); [propget, helpstring("property Hooks")] HRESULT Hooks([out, retval] IACHooks** pVal); - [propget, helpstring("property Container")] HRESULT Container([out, retval] VARIANT_BOOL* pVal); - [propput, helpstring("property Container")] HRESULT Container([in] VARIANT_BOOL newVal); }; --- 310,313 ---- |
From: <che...@us...> - 2003-03-18 07:03:02
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv10884/Inject Modified Files: Manager.cpp Log Message: Yet another Decal Container change Index: Manager.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Manager.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** Manager.cpp 18 Mar 2003 06:53:33 -0000 1.67 --- Manager.cpp 18 Mar 2003 07:03:00 -0000 1.68 *************** *** 67,73 **** LPTSTR strProcessName = ::_tcsrchr( szFilename, _T( '\\' ) ); ! strProcessName[ 15 ] = _T( '\0' ); ! if( ::_tcsicmp( strProcessName + 1, _T( "DecalContainer" ) ) == 0 ) m_pDecal->put_Container( VARIANT_TRUE ); --- 67,73 ---- LPTSTR strProcessName = ::_tcsrchr( szFilename, _T( '\\' ) ); ! strProcessName[ 7 ] = _T( '\0' ); ! if( ::_tcsicmp( strProcessName + 1, _T( "client" ) ) != 0 ) m_pDecal->put_Container( VARIANT_TRUE ); |
From: <che...@us...> - 2003-03-18 06:53:36
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv7634/Inject Modified Files: Inject.cpp Manager.cpp Manager.h View.cpp Log Message: More changes regarding Decal Container to remove out of memory error as well as a minor bug in the View code Index: Inject.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Inject.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Inject.cpp 17 Mar 2003 22:34:30 -0000 1.18 --- Inject.cpp 18 Mar 2003 06:53:33 -0000 1.19 *************** *** 97,110 **** // ::MessageBox( NULL, _T( "DllMain" ), _T( "Inject.dll" ), MB_OK ); hookFunctions( _hooks, 2 ); - - hAlphaBlendDLL = LoadLibrary("Msimg32.dll"); - - if (hAlphaBlendDLL != NULL) - { - AlphaBlendF = (LPFNDLLFUNCALPHABLEND)GetProcAddress(hAlphaBlendDLL,"AlphaBlend"); - if (!AlphaBlendF) - AlphaBlendF=NULL; - } - bRegisteredInAC = true; //MessageBox(0,"asd","asd",0); --- 97,100 ---- *************** *** 113,121 **** _hUpdateEnabled = ::CreateMutex( NULL, FALSE, _T( "InjectEnablePlugins" ) ); } else if (dwReason == DLL_PROCESS_DETACH) { ::CloseHandle( _hUpdateEnabled ); ! FreeLibrary(hAlphaBlendDLL); _Module.Term(); } --- 103,123 ---- _hUpdateEnabled = ::CreateMutex( NULL, FALSE, _T( "InjectEnablePlugins" ) ); + + hAlphaBlendDLL = LoadLibrary("Msimg32.dll"); + + if (hAlphaBlendDLL != NULL) + { + AlphaBlendF = (LPFNDLLFUNCALPHABLEND)GetProcAddress(hAlphaBlendDLL,"AlphaBlend"); + if (!AlphaBlendF) + AlphaBlendF=NULL; + } } else if (dwReason == DLL_PROCESS_DETACH) { ::CloseHandle( _hUpdateEnabled ); ! ! if( hAlphaBlendDLL ) ! FreeLibrary( hAlphaBlendDLL ); ! _Module.Term(); } *************** *** 411,418 **** return; - TCHAR szModule[ MAX_PATH ]; - ::GetModuleFileName( _Module.GetModuleInstance( ), szModule, MAX_PATH ); - ::LoadLibrary( szModule ); - HRESULT hRes = CComObject< cManager >::CreateInstance( &cManager::_p ); if( FAILED( hRes ) ) --- 413,416 ---- *************** *** 484,491 **** if( cManager::_p ) return; - - TCHAR szModule[ MAX_PATH ]; - ::GetModuleFileName( _Module.GetModuleInstance( ), szModule, MAX_PATH ); - ::LoadLibrary( szModule ); HRESULT hRes = CComObject< cManager >::CreateInstance( &cManager::_p ); --- 482,485 ---- Index: Manager.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Manager.cpp,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** Manager.cpp 17 Mar 2003 09:23:22 -0000 1.66 --- Manager.cpp 18 Mar 2003 06:53:33 -0000 1.67 *************** *** 50,53 **** --- 50,54 ---- m_bContainer( false ), m_bXMLViewViewer( false ), + m_hDecalDLL( NULL ), m_eAlphaBlendMode( eAlphaBlendSoftware ) { *************** *** 58,65 **** // Load the Decal.dll lib to keep CoFreeAllLibraries from destroying it ! ::LoadLibrary ( _T( "Decal.dll" ) ); if( SUCCEEDED( hRes ) ) ! hRes = m_pDecal->StartServices(); } --- 59,77 ---- // Load the Decal.dll lib to keep CoFreeAllLibraries from destroying it ! m_hDecalDLL = ::LoadLibrary ( _T( "Decal.dll" ) ); if( SUCCEEDED( hRes ) ) ! { ! TCHAR szFilename[ MAX_PATH ]; ! ::GetModuleFileName( NULL, szFilename, MAX_PATH ); ! LPTSTR strProcessName = ::_tcsrchr( szFilename, _T( '\\' ) ); ! ! strProcessName[ 15 ] = _T( '\0' ); ! ! if( ::_tcsicmp( strProcessName + 1, _T( "DecalContainer" ) ) == 0 ) ! m_pDecal->put_Container( VARIANT_TRUE ); ! ! hRes = m_pDecal->StartServices( ); ! } } *************** *** 75,78 **** --- 87,92 ---- ::SetWindowLong( m_hMain, GWL_WNDPROC, reinterpret_cast< LONG >( m_pfnOld ) ); m_pfnOld = NULL; + + FreeLibrary( m_hDecalDLL ); if( m_bContainer ) Index: Manager.h =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Manager.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Manager.h 17 Mar 2003 09:23:23 -0000 1.29 --- Manager.h 18 Mar 2003 06:53:33 -0000 1.30 *************** *** 149,152 **** --- 149,154 ---- LPVOID m_lpSurface; + + HMODULE m_hDecalDLL; public: Index: View.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/View.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** View.cpp 17 Mar 2003 22:33:55 -0000 1.16 --- View.cpp 18 Mar 2003 06:53:33 -0000 1.17 *************** *** 413,417 **** STDMETHODIMP cView::get_Activated(VARIANT_BOOL *pVal) { ! *pVal == ( m_bActivated ? VARIANT_TRUE : VARIANT_FALSE ); return S_OK; } --- 413,417 ---- STDMETHODIMP cView::get_Activated(VARIANT_BOOL *pVal) { ! *pVal = ( m_bActivated ? VARIANT_TRUE : VARIANT_FALSE ); return S_OK; } |
From: <che...@us...> - 2003-03-18 06:53:36
|
Update of /cvsroot/decaldev/source/Include In directory sc8-pr-cvs1:/tmp/cvs-serv7634/Include Modified Files: Decal.idl Log Message: More changes regarding Decal Container to remove out of memory error as well as a minor bug in the View code Index: Decal.idl =================================================================== RCS file: /cvsroot/decaldev/source/Include/Decal.idl,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Decal.idl 7 Mar 2003 23:37:40 -0000 1.32 --- Decal.idl 18 Mar 2003 06:53:33 -0000 1.33 *************** *** 281,284 **** --- 281,285 ---- [propget, id(53), helpstring("property VitalTotalXP")] HRESULT VitalTotalXP([in] enum eVital VitalD, [out, retval] int *pVal); [propget, id(54), helpstring("property VitalClicks")] HRESULT VitalClicks([in] enum eVital VitalID, [out, retval] int *pVal); + [id(55), helpstring("method Start")] HRESULT Start(void); }; *************** *** 310,313 **** --- 311,316 ---- [helpstring("method Render3D")] HRESULT Render3D(); [propget, helpstring("property Hooks")] HRESULT Hooks([out, retval] IACHooks** pVal); + [propget, helpstring("property Container")] HRESULT Container([out, retval] VARIANT_BOOL* pVal); + [propput, helpstring("property Container")] HRESULT Container([in] VARIANT_BOOL newVal); }; |
From: <che...@us...> - 2003-03-18 06:53:36
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv7634/Decal Modified Files: ACHooks.cpp ACHooks.h DecalManager.cpp DecalManager.h Log Message: More changes regarding Decal Container to remove out of memory error as well as a minor bug in the View code Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** ACHooks.cpp 7 Mar 2003 23:37:55 -0000 1.41 --- ACHooks.cpp 18 Mar 2003 06:53:32 -0000 1.42 *************** *** 47,57 **** extern DWORD HookCall (DWORD dwCallAddress, DWORD dwReplacement); ! cACHooks::cACHooks() { g_bTimestamp = false; - _bstr_t _Unnamed; s_pACHooks = this; - USES_CONVERSION; - m_bDecalRef = false; [...1115 lines suppressed...] + } + + if( QueryMemLoc( BSTRT( "OnChatMessage" ), &Val ) == S_OK ) + { + VirtualProtect( reinterpret_cast< void * >( Val ), 4, PAGE_EXECUTE_READWRITE, &dwOldProtect ); + *reinterpret_cast< long * >( Val ) = ( reinterpret_cast< long >( OnChatMessage ) - ( Val + 0x4 ) ); + } + + m_Hooks |= eHooksAvailEx; + + if( QueryMemLoc( BSTRT( "SelectItemHook" ), &Val ) == S_OK ) + { + m_lSelectItemHook = Val; + m_bSelectItemHook = true; + g_lSelectItemHijackProc = HookCall( m_lSelectItemHook, (DWORD) SelectItemHook ); + SetHookEx( eOnSelectItemEvent ); + } + + return S_OK; } Index: ACHooks.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** ACHooks.h 7 Mar 2003 23:37:55 -0000 1.35 --- ACHooks.h 18 Mar 2003 06:53:33 -0000 1.36 *************** *** 300,302 **** --- 300,303 ---- HRESULT GetAttributeInfo(eAttribute AttributeID, struct qAttribute *Attribute); HRESULT GetVitalInfo(eVital VitalID, struct qVital *Vital); + STDMETHOD(Start)(void); }; Index: DecalManager.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/DecalManager.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** DecalManager.cpp 12 Dec 2002 02:31:23 -0000 1.12 --- DecalManager.cpp 18 Mar 2003 06:53:33 -0000 1.13 *************** *** 451,456 **** return S_FALSE; ! m_pHooks.CoCreateInstance( _bstr_t( "Decal.ACHooks" ), NULL, CLSCTX_INPROC_SERVER ); ! m_pHooks->SetDecal( reinterpret_cast< IUnknown * >( this ) ); CComPtr< IDecalEnum > pEnumServices; --- 451,457 ---- return S_FALSE; ! m_pHooks.CoCreateInstance( _bstr_t( "Decal.ACHooks" ), NULL, CLSCTX_INPROC_SERVER ); ! m_pHooks->SetDecal( reinterpret_cast< IUnknown * >( this ) ); ! m_pHooks->Start( ); CComPtr< IDecalEnum > pEnumServices; *************** *** 544,548 **** { if( m_bPluginsStarted ) ! StopPlugins(); if( !m_bServicesStarted ) --- 545,549 ---- { if( m_bPluginsStarted ) ! StopPlugins( ); if( !m_bServicesStarted ) *************** *** 565,569 **** } ! m_pHooks.Release(); return S_OK; --- 566,571 ---- } ! if( m_pHooks.p ) ! m_pHooks.Release( ); return S_OK; *************** *** 632,635 **** --- 634,651 ---- m_pHooks->QueryInterface( pVal ); + return S_OK; + } + + STDMETHODIMP cDecal::get_Container(VARIANT_BOOL* pVal) + { + // TODO: Add your implementation code here + *pVal = ( m_fContainer ? VARIANT_TRUE : VARIANT_FALSE ); + return S_OK; + } + + STDMETHODIMP cDecal::put_Container(VARIANT_BOOL newVal) + { + // TODO: Add your implementation code here + m_fContainer = ( ( newVal == VARIANT_TRUE ) ? true : false ); return S_OK; } Index: DecalManager.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/DecalManager.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DecalManager.h 22 Sep 2002 08:15:27 -0000 1.3 --- DecalManager.h 18 Mar 2003 06:53:33 -0000 1.4 *************** *** 22,26 **** m_bFocus( VARIANT_FALSE ), m_bServicesStarted( false ), ! m_bPluginsStarted( false ) { } --- 22,27 ---- m_bFocus( VARIANT_FALSE ), m_bServicesStarted( false ), ! m_bPluginsStarted( false ), ! m_fContainer( false ) { } *************** *** 67,70 **** --- 68,73 ---- CComPtr< IACHooks > m_pHooks; + bool m_fContainer; + HRESULT convertToken( std::string &strToken, std::string &strOut ); *************** *** 95,98 **** --- 98,103 ---- STDMETHOD(get_Plugin)(REFCLSID clsid, REFIID iid, /*[out, retval]*/ LPVOID *pVal); STDMETHOD(get_Hooks)(IACHooks** pVal); + STDMETHOD(get_Container)(VARIANT_BOOL* pVal); + STDMETHOD(put_Container)(VARIANT_BOOL newVal); }; |
From: <che...@us...> - 2003-03-18 06:53:36
|
Update of /cvsroot/decaldev/source/DenAgent In directory sc8-pr-cvs1:/tmp/cvs-serv7634/DenAgent Modified Files: DenAgent.rc Log Message: More changes regarding Decal Container to remove out of memory error as well as a minor bug in the View code Index: DenAgent.rc =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/DenAgent.rc,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** DenAgent.rc 11 Feb 2003 22:20:07 -0000 1.63 --- DenAgent.rc 18 Mar 2003 06:53:33 -0000 1.64 *************** *** 178,182 **** CONTROL "Don't Draw on Radar",IDC_RADARNO,"Button", BS_AUTORADIOBUTTON,84,159,81,11 - GROUPBOX "Static",IDC_STATIC,0,0,48,40 GROUPBOX "Static",IDC_STATIC,7,176,94,40 CONTROL "Timestamps Enabled",IDC_TIMESTAMPON,"Button", --- 178,181 ---- |
From: <che...@us...> - 2003-03-17 22:34:33
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv16701/Inject Modified Files: Inject.cpp Log Message: touched up decal container code Index: Inject.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Inject.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Inject.cpp 17 Mar 2003 09:23:17 -0000 1.17 --- Inject.cpp 17 Mar 2003 22:34:30 -0000 1.18 *************** *** 390,393 **** --- 390,408 ---- } + void DisplayErrorMessage( DWORD dwError, char* szFrom ) + { + LRESULT lrLength; + char szBuffer[1024]; + char *lpMsgBuf; + + FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwError, + MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), reinterpret_cast< LPTSTR > ( &lpMsgBuf ), 0, NULL ); + + wsprintf( szBuffer, "%s %ld: %s", szFrom, dwError, lpMsgBuf ); + + MessageBox( 0, szBuffer, "Error", MB_OK | MB_ICONERROR ); + LocalFree( lpMsgBuf ); + } + // Checksum - Added for my test container void Container_Initialize( HWND hWnd, IDirectDraw4* pDD4, IDirectDrawSurface4 *pDDS4 ) *************** *** 396,405 **** return; HRESULT hRes = CComObject< cManager >::CreateInstance( &cManager::_p ); if( FAILED( hRes ) ) { ! MessageBox( 0, _bstr_t( ( long )hRes ), "Out of Memmory?", 0 ); return; } cManager::_p->AddRef( ); --- 411,425 ---- return; + TCHAR szModule[ MAX_PATH ]; + ::GetModuleFileName( _Module.GetModuleInstance( ), szModule, MAX_PATH ); + ::LoadLibrary( szModule ); + HRESULT hRes = CComObject< cManager >::CreateInstance( &cManager::_p ); if( FAILED( hRes ) ) { ! DisplayErrorMessage( hRes, "Creating cManager Object" ); return; } + cManager::_p->AddRef( ); *************** *** 465,472 **** return; HRESULT hRes = CComObject< cManager >::CreateInstance( &cManager::_p ); if( FAILED( hRes ) ) { ! MessageBox( 0, _bstr_t( ( long )hRes ), "Out of Memmory?", 0 ); return; } --- 485,496 ---- return; + TCHAR szModule[ MAX_PATH ]; + ::GetModuleFileName( _Module.GetModuleInstance( ), szModule, MAX_PATH ); + ::LoadLibrary( szModule ); + HRESULT hRes = CComObject< cManager >::CreateInstance( &cManager::_p ); if( FAILED( hRes ) ) { ! DisplayErrorMessage( hRes, "Creating cManager Object" ); return; } |
From: <che...@us...> - 2003-03-17 22:33:59
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv16338/Inject Modified Files: View.cpp Log Message: removed a few warnings with vs.net Index: View.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/View.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** View.cpp 17 Mar 2003 09:23:24 -0000 1.15 --- View.cpp 17 Mar 2003 22:33:55 -0000 1.16 *************** *** 13,17 **** // cView ! cView::~cView() { m_bActivated = false; --- 13,17 ---- // cView ! cView::~cView( ) { m_bActivated = false; *************** *** 413,417 **** STDMETHODIMP cView::get_Activated(VARIANT_BOOL *pVal) { ! *pVal == m_bActivated ? VARIANT_TRUE : VARIANT_FALSE; return S_OK; } --- 413,417 ---- STDMETHODIMP cView::get_Activated(VARIANT_BOOL *pVal) { ! *pVal == ( m_bActivated ? VARIANT_TRUE : VARIANT_FALSE ); return S_OK; } |
From: <che...@us...> - 2003-03-17 09:23:39
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv27536/Inject Modified Files: BarLayer.cpp Inject.cpp Inject.def Inject.idl Inject.rc InjectApi.h Manager.cpp Manager.h Panel.cpp StdAfx.h View.cpp resource.h Log Message: Remove some unused software mode code from manager and Performed a general cleanup of the code regarding my Decal Container Index: BarLayer.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/BarLayer.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** BarLayer.cpp 3 Jan 2003 16:32:53 -0000 1.12 --- BarLayer.cpp 17 Mar 2003 09:23:15 -0000 1.13 *************** *** 193,215 **** // Make sure the Decal bar is always at least 112 pixels wide, ! if( !cManager::_p->m_bXMLViewViewer ) ! { ! if( m_TotalDelta > 420 ) ! m_TotalDelta = 420; ! ! // Also make sure it's never past left edge of the screen. ! if( m_TotalDelta < -230 ) ! m_TotalDelta = -230; ! } ! else ! { ! if( m_TotalDelta > 190 ) ! m_TotalDelta = 190; - // Also make sure it's never past left edge of the screen. - if( m_TotalDelta < -230 ) - m_TotalDelta = -230; - } // Now that we have the resolution, calculate the area we intend to cover --- 193,205 ---- // Make sure the Decal bar is always at least 112 pixels wide, ! if( ( cManager::_p->m_bContainer ) && ( m_TotalDelta > 190 ) ) ! m_TotalDelta = 190; ! else if( m_TotalDelta > 420 ) ! m_TotalDelta = 420; ! // Also make sure it's never past left edge of the screen. ! if( m_TotalDelta < -230 ) ! m_TotalDelta = -230; // Now that we have the resolution, calculate the area we intend to cover *************** *** 217,220 **** --- 207,211 ---- int nVariableWidth = 418; + if( m_bRadarDraw ) nVariableWidth = 308; *************** *** 437,441 **** POINTS pt; pt = MAKEPOINTS(lParam); ! if( !cManager::_p->m_bXMLViewViewer ) pt.y -= 28; --- 428,433 ---- POINTS pt; pt = MAKEPOINTS(lParam); ! ! if( !cManager::_p->m_bContainer ) pt.y -= 28; *************** *** 465,469 **** POINTS pt; pt = MAKEPOINTS(lParam); ! if( !cManager::_p->m_bXMLViewViewer ) pt.y -= 28; --- 457,462 ---- POINTS pt; pt = MAKEPOINTS(lParam); ! ! if( !cManager::_p->m_bContainer ) pt.y -= 28; Index: Inject.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Inject.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Inject.cpp 13 Jan 2003 04:49:15 -0000 1.16 --- Inject.cpp 17 Mar 2003 09:23:17 -0000 1.17 *************** *** 20,23 **** --- 20,24 ---- #include "InjectService.h" #include "PluginAdapterV1.h" + #include "RootLayer.h" // one instance for all processes *************** *** 262,272 **** pDDHook->QueryInterface( IID_IDirectDraw, reinterpret_cast< void ** >( lplpDD ) ); - - if(!CheckForHardwareMode()) - { - cManager::_p->setSoftwareMode(true); - } - else - cManager::_p->setSoftwareMode(false); return hRes; --- 263,266 ---- *************** *** 397,494 **** // Checksum - Added for my test container ! void ManagerInit() { ! if(!cManager::_p->m_bInitialized) { ! cManager::_p->m_bContainer=true; ! cManager::_p->m_pDecal->StartPlugins(); } } ! void ManagerTerm() { ! if(cManager::_p->m_bInitialized) ! cManager::_p->m_pDecal->StopPlugins(); } ! void ManagerDraw() { ! cManager::_p->draw2D(); ! } ! IView* g_pXMLView = NULL; ! void XMLView_ManagerInit( HWND hWnd, IDirectDraw4* pDD4, IDirectDrawSurface4 *pDDS4 ) { if( !cManager::_p ) ! { ! // Add another instance of the library ! /*TCHAR szModule[ MAX_PATH ]; ! ::GetModuleFileName( _Module.GetModuleInstance(), szModule, MAX_PATH ); ! ::LoadLibrary( szModule );*/ ! ! if( cManager::_p == NULL ) ! { ! HRESULT hRes = CComObject< cManager >::CreateInstance( &cManager::_p ); ! if( FAILED( hRes ) ) ! { ! MessageBox( 0, _bstr_t( ( long )hRes ), "Out of Memmory?", 0 ); ! return; ! } ! cManager::_p->AddRef( ); ! } ! cManager::_p->setWindow( hWnd ); ! cManager::_p->m_pDecal->InitGraphics( pDD4, NULL ); ! cManager::_p->m_pD = pDD4; ! cManager::_p->m_pPrimarySurface = pDDS4; ! cManager::_p->setSoftwareMode( true ); ! cManager::_p->m_bContainer = true; ! cManager::_p->m_bXMLViewViewer = true; ! cManager::_p->init( ); ! } ! else if( !cManager::_p->m_bInitialized ) ! cManager::_p->init( ); } ! void XMLView_ManagerTerm( ) { ! if( cManager::_p ) ! { ! if( cManager::_p->m_bInitialized ) ! cManager::_p->term( ); ! cManager::_p->Release( ); ! cManager::_p = NULL; ! } } ! void XMLView_ManagerDraw( ) { if( !cManager::_p ) return; ! if( !cManager::_p->m_bXMLViewViewer ) ! return; ! cManager::_p->draw2D(); } ! void XMLView_RemoveView( ) { ! try{ ! if( !g_pXMLView ) ! return; ! ! g_pXMLView->Release( ); ! g_pXMLView = NULL; ! } ! catch( ... ) { ! g_pXMLView = NULL; } } ! void XMLView_LoadView( BSTR bstrSchema ) { if( !cManager::_p ) --- 391,486 ---- // Checksum - Added for my test container ! void Container_Initialize( HWND hWnd, IDirectDraw4* pDD4, IDirectDrawSurface4 *pDDS4 ) { ! if( cManager::_p ) ! return; ! ! HRESULT hRes = CComObject< cManager >::CreateInstance( &cManager::_p ); ! if( FAILED( hRes ) ) { ! MessageBox( 0, _bstr_t( ( long )hRes ), "Out of Memmory?", 0 ); ! return; } + cManager::_p->AddRef( ); + + cManager::_p->setWindow( hWnd ); + cManager::_p->m_pD = pDD4; + cManager::_p->m_pPrimarySurface = pDDS4; + cManager::_p->m_pDecal->InitGraphics( pDD4, NULL ); + cManager::_p->m_bContainer = true; + cManager::_p->m_bXMLViewViewer = false; } ! void Container_StartPlugins( ) { ! if( !cManager::_p ) ! return; ! ! cManager::_p->m_pDecal->StartPlugins( ); } ! void Container_StopPlugins( ) { ! if( !cManager::_p ) ! return; ! cManager::_p->m_pDecal->StopPlugins( ); ! } ! void Container_Terminate( ) { if( !cManager::_p ) ! return; ! ! Container_StopPlugins( ); ! cManager::_p->Release( ); ! cManager::_p = NULL; } ! void Container_SetSurface( IDirectDrawSurface4 *pDDS4 ) { ! if( !cManager::_p ) ! return; ! cManager::_p->m_pPrimarySurface = pDDS4; } ! void Container_Draw( ) { if( !cManager::_p ) return; ! if( cManager::_p->m_bInitialized ) ! cManager::_p->m_pRootLayer->m_pBars->Reformat( ); ! cManager::_p->draw2D( ); } ! std::set< IView* > g_pViews; ! ! void XMLViewer_Initialize( HWND hWnd, IDirectDraw4* pDD4, IDirectDrawSurface4 *pDDS4 ) { ! if( cManager::_p ) ! return; ! ! HRESULT hRes = CComObject< cManager >::CreateInstance( &cManager::_p ); ! if( FAILED( hRes ) ) { ! MessageBox( 0, _bstr_t( ( long )hRes ), "Out of Memmory?", 0 ); ! return; } + cManager::_p->AddRef( ); + + cManager::_p->setWindow( hWnd ); + cManager::_p->m_pD = pDD4; + cManager::_p->m_pPrimarySurface = pDDS4; + cManager::_p->m_pDecal->InitGraphics( pDD4, NULL ); + cManager::_p->m_bContainer = true; + cManager::_p->m_bXMLViewViewer = true; + cManager::_p->init( ); } ! void XMLViewer_LoadView( BSTR bstrSchema ) { if( !cManager::_p ) *************** *** 498,507 **** _T( "<?xml version=\"1.0\"?>" ) ! _T( "<view icon=\"4150\" title=\"PKAid\" width=\"550\" height=\"550\">" ) _T( "<control name=\"NoteBookTab\" progid=\"DecalControls.Notebook\" left=\"5\">" ) ! _T( "<page label=\"Player List\">" ) ! _T( "<control left=\"0\" top=\"0\" width=\"180\" height=\"206\" progid=\"DecalControls.List\" name=\"Player_List\">" ) _T( "<column progid=\"DecalControls.IconColumn\"/>" ) _T( "<column progid=\"DecalControls.IconColumn\"/>" ) --- 490,499 ---- _T( "<?xml version=\"1.0\"?>" ) ! _T( "<view icon=\"4150\" title=\"TestView\" width=\"550\" height=\"550\">" ) _T( "<control name=\"NoteBookTab\" progid=\"DecalControls.Notebook\" left=\"5\">" ) ! _T( "<page label=\"Test List\">" ) ! _T( "<control left=\"0\" top=\"0\" width=\"180\" height=\"206\" progid=\"DecalControls.List\" name=\"sux\">" ) _T( "<column progid=\"DecalControls.IconColumn\"/>" ) _T( "<column progid=\"DecalControls.IconColumn\"/>" ) *************** *** 511,515 **** _T( "</page>" ) ! _T("<page label=\"Map View\">") _T( "<control progid=\"DecalControls.FixedLayout\" width=\"550\">" ) _T( "</control>" ) --- 503,507 ---- _T( "</page>" ) ! _T("<page label=\"whee!\">") _T( "<control progid=\"DecalControls.FixedLayout\" width=\"550\">" ) _T( "</control>" ) *************** *** 520,524 **** ); ! XMLView_RemoveView( ); ! cManager::_p->LoadView( strSchema, &g_pXMLView ); } --- 512,558 ---- ); ! IView* pView; ! cManager::_p->LoadView( bstrSchema ? bstrSchema : strSchema, &pView ); ! g_pViews.insert( pView ); ! } ! ! void XMLViewer_RemoveView( IView* pView ) ! { ! try{ ! if( !pView ) ! return; ! ! g_pViews.erase( pView ); ! ! pView->Release( ); ! pView = NULL; ! } ! catch( ... ) ! { ! pView = NULL; ! } ! } ! ! void XMLViewer_Terminate( ) ! { ! if( !cManager::_p ) ! return; ! ! if( cManager::_p->m_bInitialized ) ! { ! for( std::set< IView* >::iterator it = g_pViews.begin( ); it != g_pViews.end( ); ++it ) ! XMLViewer_RemoveView( *it ); ! ! g_pViews.clear( ); ! ! cManager::_p->term( ); ! } ! ! cManager::_p->Release( ); ! cManager::_p = NULL; ! } ! ! void XMLViewer_Draw( ) ! { ! Container_Draw( ); } Index: Inject.def =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Inject.def,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Inject.def 18 Aug 2001 19:34:51 -0000 1.1.1.1 --- Inject.def 17 Mar 2003 09:23:18 -0000 1.2 *************** *** 8,14 **** EXPORTS ! DllCanUnloadNow @1 PRIVATE ! DllGetClassObject @2 PRIVATE ! DllRegisterServer @3 PRIVATE ! DllUnregisterServer @4 PRIVATE ! hookCBTProc @5 \ No newline at end of file --- 8,25 ---- EXPORTS ! DllCanUnloadNow @1 PRIVATE ! DllGetClassObject @2 PRIVATE ! DllRegisterServer @3 PRIVATE ! DllUnregisterServer @4 PRIVATE ! hookCBTProc @5 ! Container_Initialize @6 ! Container_StartPlugins @7 ! Container_StopPlugins @8 ! Container_Terminate @9 ! Container_SetSurface @10 ! Container_Draw @11 ! XMLViewer_Initialize @12 ! XMLViewer_LoadView @13 ! XMLViewer_RemoveView @14 ! XMLViewer_Terminate @15 ! XMLViewer_Draw @16 \ No newline at end of file Index: Inject.idl =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Inject.idl,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Inject.idl 14 Mar 2003 04:22:08 -0000 1.35 --- Inject.idl 17 Mar 2003 09:23:19 -0000 1.36 *************** *** 8,11 **** --- 8,12 ---- import "ocidl.idl"; import "decal.idl"; + import "unknwn.idl"; interface IBarManager; Index: Inject.rc =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Inject.rc,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** Inject.rc 30 Dec 2002 20:36:54 -0000 1.41 --- Inject.rc 17 Mar 2003 09:23:21 -0000 1.42 *************** *** 1,3 **** ! //Microsoft Developer Studio generated resource script. // #include "resource.h" --- 1,3 ---- ! // Microsoft Visual C++ generated resource script. // #include "resource.h" *************** *** 27,31 **** // ! IDR_PLUGINADAPTERV1 REGISTRY MOVEABLE PURE "PluginAdapterV1.rgs" #endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// --- 27,31 ---- // ! IDR_PLUGINADAPTERV1 REGISTRY "PluginAdapterV1.rgs" #endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// *************** *** 41,44 **** --- 41,49 ---- #endif //_WIN32 + ///////////////////////////////////////////////////////////////////////////// + // + // REGISTRY + // + #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// *************** *** 47,56 **** // ! 1 TEXTINCLUDE MOVEABLE PURE BEGIN "resource.h\0" END ! 2 TEXTINCLUDE MOVEABLE PURE BEGIN "#include ""winres.h""\r\n" --- 52,61 ---- // ! 1 TEXTINCLUDE BEGIN "resource.h\0" END ! 2 TEXTINCLUDE BEGIN "#include ""winres.h""\r\n" *************** *** 58,62 **** END ! 3 TEXTINCLUDE MOVEABLE PURE BEGIN "1 TYPELIB ""Inject.tlb""\r\n" --- 63,67 ---- END ! 3 TEXTINCLUDE BEGIN "1 TYPELIB ""Inject.tlb""\r\n" *************** *** 67,71 **** - #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // --- 72,75 ---- *************** *** 90,105 **** BLOCK "040904b0" BEGIN ! VALUE "Comments", "Inject is the heart of Decal, it places itself within the memory space of the AC Client and is responsible for drawing the UI on the screen\0" ! VALUE "CompanyName", "\0" ! VALUE "FileDescription", "Inject Module\0" ! VALUE "FileVersion", "2, 5, 0, 1\0" ! VALUE "InternalName", "Inject\0" ! VALUE "LegalCopyright", "Copyright 2000, 2001\0" ! VALUE "LegalTrademarks", "\0" ! VALUE "OriginalFilename", "Inject.DLL\0" ! VALUE "PrivateBuild", "\0" ! VALUE "ProductName", "Inject Module\0" ! VALUE "ProductVersion", "2, 5, 0, 1\0" ! VALUE "SpecialBuild", "\0" END END --- 94,105 ---- BLOCK "040904b0" BEGIN ! VALUE "Comments", "Inject is the heart of Decal, it places itself within the memory space of the AC Client and is responsible for drawing the UI on the screen" ! VALUE "FileDescription", "Inject Module" ! VALUE "FileVersion", "2, 5, 0, 1" ! VALUE "InternalName", "Inject" ! VALUE "LegalCopyright", "Copyright 2000, 2001" ! VALUE "OriginalFilename", "Inject.DLL" ! VALUE "ProductName", "Inject Module" ! VALUE "ProductVersion", "2, 5, 0, 1" END END *************** *** 110,115 **** END - #endif // !_MAC - ///////////////////////////////////////////////////////////////////////////// --- 110,113 ---- *************** *** 118,122 **** // ! STRINGTABLE DISCARDABLE BEGIN IDS_PROJNAME "Decal" --- 116,120 ---- // ! STRINGTABLE BEGIN IDS_PROJNAME "Decal" *************** *** 141,147 **** // ! IDR_BUTTON REGISTRY MOVEABLE PURE "Button.rgs" ! IDR_PAGER REGISTRY MOVEABLE PURE "Pager.rgs" ! IDR_INJECTSERVICE REGISTRY MOVEABLE PURE "InjectService.rgs" ///////////////////////////////////////////////////////////////////////////// --- 139,145 ---- // ! IDR_BUTTON REGISTRY "Button.rgs" ! IDR_PAGER REGISTRY "Pager.rgs" ! IDR_INJECTSERVICE REGISTRY "InjectService.rgs" ///////////////////////////////////////////////////////////////////////////// *************** *** 152,156 **** // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. ! IDR_MAINFRAME ICON DISCARDABLE "res\\DenAgent.ico" #endif // English (Canada) resources ///////////////////////////////////////////////////////////////////////////// --- 150,154 ---- // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. ! IDR_MAINFRAME ICON "res\\DenAgent.ico" #endif // English (Canada) resources ///////////////////////////////////////////////////////////////////////////// Index: InjectApi.h =================================================================== RCS file: /cvsroot/decaldev/source/Inject/InjectApi.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** InjectApi.h 1 Aug 2002 00:52:24 -0000 1.5 --- InjectApi.h 17 Mar 2003 09:23:21 -0000 1.6 *************** *** 34,46 **** // Checksum - Added for my test container ! void INJECT_API ManagerInit(); ! void INJECT_API ManagerTerm(); ! void INJECT_API InitManager(); ! void INJECT_API TermManager(); ! void INJECT_API ManagerDraw(); ! void INJECT_API XMLView_ManagerInit( HWND hWnd, IDirectDraw4* pDD4, IDirectDrawSurface4 *pDDS4 ); ! void INJECT_API XMLView_ManagerTerm(); ! void INJECT_API XMLView_RemoveView(); ! void INJECT_API XMLView_LoadView( BSTR bstrSchema ); ! void INJECT_API XMLView_ManagerDraw(); #endif --- 34,48 ---- // Checksum - Added for my test container ! void INJECT_API Container_Initialize( HWND hWnd, IDirectDraw4* pDD4, IDirectDrawSurface4 *pDDS4 ); ! void INJECT_API Container_StartPlugins( ); ! void INJECT_API Container_StopPlugins( ); ! void INJECT_API Container_Terminate( ); ! void INJECT_API Container_SetSurface( IDirectDrawSurface4 *pDDS4 ); ! void INJECT_API Container_Draw( ); ! ! void INJECT_API XMLViewer_Initialize( HWND hWnd, IDirectDraw4* pDD4, IDirectDrawSurface4 *pDDS4 ); ! void INJECT_API XMLViewer_LoadView( BSTR bstrSchema ); ! void INJECT_API XMLViewer_RemoveView( IView* pView ); ! void INJECT_API XMLViewer_Terminate( ); ! void INJECT_API XMLViewer_Draw( ); #endif Index: Manager.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Manager.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** Manager.cpp 23 Dec 2002 06:42:41 -0000 1.65 --- Manager.cpp 17 Mar 2003 09:23:22 -0000 1.66 *************** *** 45,50 **** m_p3DDevice( NULL ), m_pPrimarySurface( NULL ), - // m_pCracker( NULL ), - m_bSoftware( false ), m_lpSurface( NULL ), m_bInitialized( false ), --- 45,48 ---- *************** *** 54,59 **** m_eAlphaBlendMode( eAlphaBlendSoftware ) { - //m_hDrawSync = CreateEvent(NULL, TRUE, FALSE, NULL); - // Start the decal object ::CoInitialize( NULL ); --- 52,55 ---- *************** *** 70,74 **** cManager::~cManager() { - //CloseHandle(m_hDrawSync); if( m_pDecal.p ) { --- 66,69 ---- *************** *** 81,120 **** m_pfnOld = NULL; ! if( m_bContainer || m_bXMLViewViewer ) ! ::CoUninitialize(); _p = NULL; } - void cManager::setSoftwareMode( bool bSoftware ) - { - m_bSoftware = bSoftware; - } - - bool cManager::getSoftwareMode( ) - { - return m_bSoftware; - } - void cManager::setDirectDraw( IDirectDraw4 *pDD, IDirect3D3 *pD3D, IDirectDrawSurface4 *pDDS) { ! if(pDD!=NULL) ! m_pD = pDD; ! m_p3D = pD3D; ! ! m_p3DDevice = NULL; ! m_pPrimarySurface = pDDS; ! ! if(!m_bSoftware) ! setWindow( NULL ); ! /* ! if((pD3D==NULL) && (m_bSoftware) && (pDDS!=NULL)) ! { ! if( m_pRootSite != NULL ) ! m_pRootSite->reformat(); ! }*/ } --- 76,97 ---- m_pfnOld = NULL; ! if( m_bContainer ) ! ::CoUninitialize( ); _p = NULL; } void cManager::setDirectDraw( IDirectDraw4 *pDD, IDirect3D3 *pD3D, IDirectDrawSurface4 *pDDS) { ! if( pDD != NULL ) ! m_pD = pDD; ! m_p3D = pD3D; ! m_p3DDevice = NULL; ! ! m_pPrimarySurface = pDDS; + setWindow( NULL ); } *************** *** 167,170 **** --- 144,148 ---- CComObject< cRootLayer > *pRootLayer; CComObject< cRootLayer >::CreateInstance( &pRootLayer ); + m_pRootLayer = pRootLayer; // To circular reference keeps it all intact *************** *** 197,230 **** long Val=NULL; - if(!m_bContainer) - { - } - - //CComBSTR bstrText(L"PreviousSelection"); - //QueryKeyboardMap(bstrText, &m_lPrevSelKey); - // Ok, enumerate all of the plugins and load them ::ReleaseMutex( _hUpdateEnabled ); - - /* if(m_bContainer) - return; - - m_bContainer = true; - - for( cPluginList::iterator i = _p->m_plugins.begin(); i != _p->m_plugins.end(); ++ i ) - { - if( i->m_dwSinkCaps & eManagerSinkCapPlugin ) - { - m_bContainer=false; - break; - } - } - - if(m_bContainer) - { - m_bContainer = false; - return; - } - */ } --- 175,180 ---- *************** *** 241,245 **** { m_pRootSite->Destroy( ); ! clearDestroyList(); m_pRootSite = NULL; } --- 191,195 ---- { m_pRootSite->Destroy( ); ! clearDestroyList( ); m_pRootSite = NULL; } *************** *** 247,263 **** // Terminate the input buffer cInputBuffer::term( ); - - //m_filters.clear(); m_bInitialized = false; - /* if( m_pCracker ) - { - m_pCracker->Release(); - m_pCracker = NULL; - }*/ - // Release the ACHooks interface and event connection points ! if(!m_bContainer) { IACHooksEventsImpl<ChatMessageHook, cManager>::unadvise( m_pHooks ); --- 197,205 ---- // Terminate the input buffer cInputBuffer::term( ); m_bInitialized = false; // Release the ACHooks interface and event connection points ! if( !m_bContainer ) { IACHooksEventsImpl<ChatMessageHook, cManager>::unadvise( m_pHooks ); *************** *** 400,410 **** } } - //else - //SetEvent(m_hDrawSync); _ASSERTMEM( _CrtCheckMemory( ) ); } - //else - // SetEvent(m_hDrawSync); } --- 342,348 ---- *************** *** 453,457 **** } ! if(( m_pRootSite == NULL) || ((m_p3DDevice == NULL) && (!m_bSoftware))) // Quick return when we aren't initialized return ::CallWindowProc( m_pfnOld, m_hMain, uMsg, wParam, lParam ); --- 391,395 ---- } ! if(( m_pRootSite == NULL) || ((m_p3DDevice == NULL) && ( !m_bContainer ) )) // Quick return when we aren't initialized return ::CallWindowProc( m_pfnOld, m_hMain, uMsg, wParam, lParam ); *************** *** 478,503 **** POINTS ptm = MAKEPOINTS( lParam ); ! if(m_bSoftware) ! { ! if( !m_bXMLViewViewer ) ! ptm.y-= (28-0); ! } ! else { ! D3DCLIPSTATUS cs; ! m_p3DDevice->GetClipStatus( &cs ); ! ptm.y -= ( 28 - static_cast< long >( cs.miny ) ); ! ! /*if(ptm.x >= (cs.maxx-200)) ! { ! clearDestroyList(); ! ! return ::CallWindowProc( m_pfnOld, m_hMain, uMsg, wParam, lParam ); ! } ! //std::ofstream ofs("c:\\acsd.txt", std::ios::app); ! //ofs << "x: " << ptm.x << " y: " << ptm.y << "\r\n"; ! //ofs << "maxx: " << cs.maxx << " maxy: " << cs.maxy << " maxz: " << cs.maxz << " minx: " << cs.minx << " miny: " << cs.miny << " minz: " << cs.minz << "\r\n"; ! //ofs.close();*/ } --- 416,425 ---- POINTS ptm = MAKEPOINTS( lParam ); ! if( !m_bContainer ) { ! D3DCLIPSTATUS cs; ! m_p3DDevice->GetClipStatus( &cs ); ! ptm.y -= ( 28 - static_cast< long >( cs.miny ) ); } *************** *** 648,689 **** if( uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST ) { - /*if((uMsg==WM_KEYDOWN) && (wParam==0x59)) - { - MessageBeep(0); - draw2D(); - }*/ - /*static long times=0; - - if(uMsg==WM_KEYDOWN) - { - if(wParam==0x5A) - MessageBox(0, _bstr_t(times), "asd",0); - - if(wParam == 0x59) - { - times++; - MessageBeep(0); - //MessageBox(0, _bstr_t((long)SurfaceList.size()), "asd",0); - if(!SurfaceList.empty()) - { - cManager::_p->setDirectDraw(NULL, NULL, SurfaceList.front()); - cManager::_p->setSurface(NULL); - SurfaceList.pop_front(); - } - } - } - - //if( wParam == 0x41) - */ - - /* if((uMsg==WM_CHAR) && ((char)wParam=='t')) - { - - //::WriteShit(); - - //MessageBeep(0); - // draw2D(); - } - */ // We ahve a keyboard message that might be filtered if(( m_pKeyboard != NULL ) && (uMsg != WM_KEYUP)) --- 570,573 ---- *************** *** 848,858 **** // _ASSERTE( m_p3DDevice != NULL ); ! if (m_bSoftware) { - //CComPtr< IDirectDrawSurface4 > pPrimary; - //HRESULT hRes = m_p3DDevice->GetRenderTarget( &pPrimary ); - - // _ASSERTE( SUCCEEDED( hRes ) ); - // Create a canvas object CComObject< cCanvas > *pPrimCanvas; --- 732,737 ---- // _ASSERTE( m_p3DDevice != NULL ); ! if ( m_bContainer ) { // Create a canvas object CComObject< cCanvas > *pPrimCanvas; *************** *** 862,887 **** pPrimCanvas->m_pSurface = m_pPrimarySurface; - RECT rc; GetWindowRect(m_hMain, &rc); ! if( m_bXMLViewViewer ) ! { ! ClipParams cClip = { { static_cast< long >( 0 ), static_cast< long >( 0 ), static_cast< long >( rc.right-rc.left ), static_cast< long >( rc.bottom-rc.top ) }, ! { 0, 0 }, VARIANT_TRUE }; ! ! pPrimCanvas->m_clipping.push( cClip ); ! } ! else ! { ! // Set up the clipping parameters (depends on the 3d clipping area) 332/362 ! ClipParams cClip = { { static_cast< long >( 0 ), static_cast< long >( 0 ), static_cast< long >( 640 ), static_cast< long >( 362 ) }, ! { 0, 0 }, VARIANT_TRUE }; ! ! pPrimCanvas->m_clipping.push( cClip ); ! } ! pPrimCanvas->AddRef(); *ppCanvas = pPrimCanvas; } --- 741,752 ---- pPrimCanvas->m_pSurface = m_pPrimarySurface; RECT rc; GetWindowRect(m_hMain, &rc); ! ClipParams cClip = { { static_cast< long >( 0 ), static_cast< long >( 0 ), static_cast< long >( rc.right - rc.left ), static_cast< long >( rc.bottom - rc.top ) }, { 0, 0 }, VARIANT_TRUE }; ! pPrimCanvas->m_clipping.push( cClip ); ! pPrimCanvas->AddRef( ); *ppCanvas = pPrimCanvas; } *************** *** 889,907 **** { CComPtr< IDirectDrawSurface4 > pPrimary; HRESULT hRes = m_p3DDevice->GetRenderTarget( &pPrimary ); _ASSERTE( SUCCEEDED( hRes ) ); - /* DDSURFACEDESC2 ddsd; - ::memset( &ddsd, 0, sizeof( DDSURFACEDESC2 ) ); - ddsd.dwSize = sizeof( DDSURFACEDESC2 ); - - ddsd.ddpfPixelFormat.dwSize = sizeof( DDPIXELFORMAT ); - - - pPrimary->GetSurfaceDesc(&ddsd); - - MessageBox(0, _bstr_t("ddesc.dwWidth: ") + _bstr_t(static_cast< long >(ddsd.dwWidth)) + _bstr_t(" ddesc.dwHeight: ") + _bstr_t(static_cast< long >(ddsd.dwHeight)) + _bstr_t(" ddsd.dwSize: ") + _bstr_t(static_cast< long >(ddsd.dwSize)), "Asd", 0); - - */ // Create a canvas object CComObject< cCanvas > *pPrimCanvas; --- 754,761 ---- { CComPtr< IDirectDrawSurface4 > pPrimary; + HRESULT hRes = m_p3DDevice->GetRenderTarget( &pPrimary ); _ASSERTE( SUCCEEDED( hRes ) ); // Create a canvas object CComObject< cCanvas > *pPrimCanvas; *************** *** 913,918 **** D3DCLIPSTATUS cs; m_p3DDevice->GetClipStatus( &cs ); - - //MessageBox(0, _bstr_t("cs.minx: ") + _bstr_t(static_cast< long >( cs.minx )) + _bstr_t(" cs.miny: ") + _bstr_t(static_cast< long >( cs.miny )) + _bstr_t(" cs.maxx: ") + _bstr_t(static_cast< long >( cs.maxx )) + _bstr_t(" cs.maxy ") + _bstr_t(static_cast< long >( cs.maxy ) ), "asd", 0); // Set up the clipping parameters (depends on the 3d clipping area) --- 767,770 ---- Index: Manager.h =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Manager.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Manager.h 23 Dec 2002 06:42:40 -0000 1.28 --- Manager.h 17 Mar 2003 09:23:23 -0000 1.29 *************** *** 44,50 **** void setSurface( IDirect3DDevice3 *pDevice ); - void cManager::setSoftwareMode( bool bSoftware ); - bool cManager::getSoftwareMode( ); - void init(); void term(); --- 44,47 ---- *************** *** 130,138 **** WNDPROC m_pfnOld; DWORD m_dwROT; - bool m_bSoftware; //HANDLE m_hDrawSync; bool m_bInitialized; bool m_bContainer; bool m_bXMLViewViewer; DWORD m_dwChatMessageAddy; --- 127,135 ---- WNDPROC m_pfnOld; DWORD m_dwROT; //HANDLE m_hDrawSync; bool m_bInitialized; bool m_bContainer; bool m_bXMLViewViewer; + cRootLayer* m_pRootLayer; DWORD m_dwChatMessageAddy; Index: Panel.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Panel.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Panel.cpp 1 Aug 2002 00:52:24 -0000 1.10 --- Panel.cpp 17 Mar 2003 09:23:23 -0000 1.11 *************** *** 395,399 **** ptm = MAKEPOINTS(lParam); ! if( !cManager::_p->m_bXMLViewViewer ) ptm.y-=28; --- 395,399 ---- ptm = MAKEPOINTS(lParam); ! if( !cManager::_p->m_bContainer ) ptm.y-=28; *************** *** 451,455 **** POINTS ptm; ptm = MAKEPOINTS(lParam); ! if( !cManager::_p->m_bXMLViewViewer ) ptm.y-=28; --- 451,456 ---- POINTS ptm; ptm = MAKEPOINTS(lParam); ! ! if( !cManager::_p->m_bContainer ) ptm.y-=28; Index: StdAfx.h =================================================================== RCS file: /cvsroot/decaldev/source/Inject/StdAfx.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** StdAfx.h 30 Aug 2002 08:45:09 -0000 1.8 --- StdAfx.h 17 Mar 2003 09:23:24 -0000 1.9 *************** *** 37,40 **** --- 37,41 ---- #include <deque> #include <queue> + #include <set> #include <string> #import <msxml.dll> Index: View.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/View.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** View.cpp 14 Mar 2003 04:22:54 -0000 1.14 --- View.cpp 17 Mar 2003 09:23:24 -0000 1.15 *************** *** 21,25 **** m_pPanel.Release( ); ! if( cManager::_p->m_bXMLViewViewer ) cManager::_p->clearDestroyList( ); } --- 21,25 ---- m_pPanel.Release( ); ! if( cManager::_p->m_bContainer ) cManager::_p->clearDestroyList( ); } Index: resource.h =================================================================== RCS file: /cvsroot/decaldev/source/Inject/resource.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** resource.h 30 Sep 2001 03:07:38 -0000 1.3 --- resource.h 17 Mar 2003 09:23:26 -0000 1.4 *************** *** 1,4 **** //{{NO_DEPENDENCIES}} ! // Microsoft Developer Studio generated include file. // Used by Inject.rc // --- 1,4 ---- //{{NO_DEPENDENCIES}} ! // Microsoft Visual C++ generated include file. // Used by Inject.rc // *************** *** 22,25 **** --- 22,26 ---- #define IDR_INPUTBUFFER 131 #define IDR_INJECTSERVICE 134 + #define IDR_XMLVIEWVIEWER 135 #define IDR_BUTTON 202 #define IDR_PAGER 203 *************** *** 32,36 **** #define _APS_NEXT_COMMAND_VALUE 32768 #define _APS_NEXT_CONTROL_VALUE 201 ! #define _APS_NEXT_SYMED_VALUE 135 #endif #endif --- 33,37 ---- #define _APS_NEXT_COMMAND_VALUE 32768 #define _APS_NEXT_CONTROL_VALUE 201 ! #define _APS_NEXT_SYMED_VALUE 136 #endif #endif |
From: <ha...@us...> - 2003-03-14 04:22:58
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv22736 Modified Files: View.cpp Log Message: view activated property Index: View.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/View.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** View.cpp 14 Mar 2003 04:22:08 -0000 1.13 --- View.cpp 14 Mar 2003 04:22:54 -0000 1.14 *************** *** 15,18 **** --- 15,19 ---- cView::~cView() { + m_bActivated = false; m_pRoot->m_pBars->RemoveBar( m_nViewID ); m_pPanel->RemoveView( m_nViewID ); |
From: <ha...@us...> - 2003-03-14 04:22:15
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv22551 Modified Files: View.h View.cpp RootLayer.cpp Inject.idl Log Message: view activated property Index: View.h =================================================================== RCS file: /cvsroot/decaldev/source/Inject/View.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** View.h 16 Apr 2002 19:56:10 -0000 1.7 --- View.h 14 Mar 2003 04:22:08 -0000 1.8 *************** *** 31,34 **** --- 31,36 ---- long m_nViewID; + bool m_bActivated; + CComPtr< IPanel > m_pPanel; *************** *** 76,79 **** --- 78,84 ---- STDMETHOD(put_Position)(/*[in]*/ RECT *newVal); STDMETHOD(get_Position)(/*[out, retval]*/ RECT *pVal); + + STDMETHOD(put_Activated)(/*[in]*/ VARIANT_BOOL newVal); + STDMETHOD(get_Activated)(/*[out, retval]*/ VARIANT_BOOL *pVal); STDMETHOD(put_Alpha)(long Alpha); Index: View.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/View.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** View.cpp 24 Aug 2002 02:29:44 -0000 1.12 --- View.cpp 14 Mar 2003 04:22:08 -0000 1.13 *************** *** 382,386 **** if( nActiveView == m_nViewID ) ! m_pPanel->ActivateView(m_nViewID, &m_VP, (long*)this); return S_OK; --- 382,386 ---- if( nActiveView == m_nViewID ) ! m_pPanel->ActivateView(m_nViewID, &m_VP, (long*)this); return S_OK; *************** *** 408,410 **** return S_OK; ! } \ No newline at end of file --- 408,425 ---- return S_OK; ! } ! ! STDMETHODIMP cView::get_Activated(VARIANT_BOOL *pVal) ! { ! *pVal == m_bActivated ? VARIANT_TRUE : VARIANT_FALSE; ! return S_OK; ! } ! ! STDMETHODIMP cView::put_Activated(VARIANT_BOOL newVal) ! { ! if( newVal == VARIANT_FALSE ) ! return Deactivate(); ! ! else ! return Activate(); ! } Index: RootLayer.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/RootLayer.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RootLayer.cpp 1 Aug 2002 00:52:24 -0000 1.5 --- RootLayer.cpp 14 Mar 2003 04:22:08 -0000 1.6 *************** *** 124,131 **** --- 124,133 ---- ( *i )->Fire_Activate(); + ( *i )->m_bActivated = true; } else { ( *i )->Deactivate(); + ( *i )->m_bActivated = false; } *************** *** 199,203 **** { if( ( *i )->m_nViewID == nViewID ) ! ( *i )->Fire_Deactivate(); } --- 201,205 ---- { if( ( *i )->m_nViewID == nViewID ) ! ( *i )->Fire_Deactivate(),( *i )->m_bActivated = false; } Index: Inject.idl =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Inject.idl,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Inject.idl 5 Sep 2002 11:19:50 -0000 1.34 --- Inject.idl 14 Mar 2003 04:22:08 -0000 1.35 *************** *** 590,593 **** --- 590,595 ---- [propput, helpstring("property Position")] HRESULT Position([in, out] RECT *newVal); [propget, helpstring("property Position")] HRESULT Position([out, retval] RECT *pVal); + [propget, helpstring("property Activated")] HRESULT Activated([out, retval] VARIANT_BOOL* pVal); + [propput, helpstring("property Activated")] HRESULT Activated([in] VARIANT_BOOL newVal); }; |