Interfaces : Эльфостроение : Форум |
Страница 1 из 2: [1] 2 » |
MO_oC: |
28.10.10, 14:44 |
Canvas_DB2010: Код: class CCanvas_DB2010: public IUnknown { public: virtual int method10(); virtual int method14(); virtual int method18(); virtual int method1C(); virtual int method20(); virtual int method24(); virtual int method28(); virtual int method2c(); virtual int method30(); virtual int method34(); virtual int method38(); virtual int method3c(); virtual int method40(); virtual int method44(); virtual int method48(); virtual int method4c(); virtual int method50(); virtual int method54(); virtual int method58(); virtual int method5c(); virtual int method60(); virtual int method64(); virtual int method68(); virtual int SetPixel(int x1,int y1,int unk,int color); virtual int method70(); virtual int method74(); virtual int method78(); virtual int method7C(); virtual int method80(); virtual int method84(); virtual int method88(); virtual int method8c(); virtual int method90(); virtual int DrawEllipse(int color,int width,int x1, int y1, int x2, int y2); virtual int FillSolidEllipse(int color ,int x1, int y1, int x2, int y2); virtual int method9C(); virtual int DrawSolidLines(int color,int width,POINT* points,int counts); virtual int methodA4(); virtual int methodA8(); virtual int methodAC(); virtual int methodB0(); virtual int FillSolidRectangle(int color,int x, int y, int w, int h); virtual int methodB8(); virtual int methodBC(); virtual int methodC0(); virtual int methodC4(); virtual int methodC8(); virtual int methodCC(); virtual int methodD0(); virtual int methodD4(); virtual int methodD8(); virtual int methodDC(); }; Canvas_DB2020: Код: class CCanvas_DB2020: public IUnknown { public: virtual int BitBlt(); virtual int TransformBlt(); virtual int method18(); virtual int Ellipse(PCANVAS* pcanvas_pen,PCANVAS* pcanvas_brush,int x, int y, int w, int h); virtual int DrawGlyphs(PCANVAS* pcanvas_text,int color,int x, int y,wchar_t *str, POINT *pp, int npp); virtual int DrawLine(PCANVAS* pcanvas_pen,int x1, int y1, int x2, int y2); virtual int DrawLines(PCANVAS* pcanvas_pen,POINT* points, int count); virtual int Polygon(PCANVAS* pcanvas_pen,PCANVAS* pcanvas_brush,POINT *pp, int count); virtual int DrawPolyLine(PCANVAS* pcanvas_pen,POINT* points, int count); virtual int Rectangle(PCANVAS* pcanvas_pen,PCANVAS* pcanvas_brush,int x, int y, int w, int h); virtual int RoundRect(PCANVAS* pcanvas_pen,PCANVAS* pcanvas_brush,int x, int y, int w, int h, int arcw, int arch); virtual int Glyphs(PCANVAS* pcanvas_text,int color,char unk ,int x, int y,wchar_t *str,int npp); virtual int GetRect(int* x1,int* x2,int* y1,int* y2); virtual int method44(); virtual int method48(); virtual int method4c(); virtual int method50(); virtual int GetPixel(int x1,int y1,int* color); virtual int method58(); virtual int method5c(); virtual int method60(); virtual int method64(); virtual int ValidateRect(int x1,int y1,int w, int h); virtual int method6c(); virtual int SetPixel(int x1,int y1,int unk,int color); virtual int method74(); virtual int WritePixels(); virtual int ReadPixels(); virtual int method80(); virtual int method84(); virtual int method88(); virtual int method8c(); virtual int method90(); virtual int method94(); virtual int DrawEllipse(int color,int width ,int x1, int y1, int x2, int y2); virtual int FillSolidEllipse(int color ,int x1, int y1, int x2, int y2); virtual int DrawSolidLine(int color,int width,int x1, int y1, int x2, int y2); virtual int DrawSolidLines(int color,int width,POINT* points,int counts); virtual int DrawSolidPolyLine(); virtual int FillSolidPolygon(); virtual int DrawSolidPolyLine2(); virtual int DrawSolidRectangle(); virtual int FillSolidRectangle(int color,int x, int y, int w, int h); virtual int DrawRoundRect(); virtual int FillSolidRoundRect(); virtual int methodC4(); virtual int methodC8(); virtual int methodCC(); virtual int methodD0(); virtual int methodD4(); virtual int methodD8(); virtual int methodDC(); virtual int methodE0(); }; Canvas_A2: Код: class CCanvas_A2: public IUnknown { public: virtual int method10(); virtual int method14(); virtual int method18(); virtual int method1C(); virtual int method20(); virtual int method24(); virtual int method28(); virtual int method2c(); virtual int method30(); virtual int method34(); virtual int method38(); virtual int method3c(); virtual int method40(); virtual int method44(); virtual int method48(); virtual int method4c(); virtual int method50(); virtual int method54(); virtual int method58(); virtual int method5c(); virtual int method60(); virtual int method64(); virtual int method68(); virtual int method6c(); virtual int method70(); virtual int method74(); virtual int SetPixel(int x1,int y1,int unk,int color); virtual int method7C(); virtual int method80(); virtual int method84(); virtual int method88(); virtual int method8c(); virtual int method90(); virtual int method94(); virtual int method98(); virtual int method9C(); virtual int methodA0(); virtual int DrawEllipse(int color,int width,int x1, int y1, int x2, int y2); virtual int FillSolidEllipse(int color ,int x1, int y1, int x2, int y2); virtual int methodAC(); virtual int DrawSolidLines(int color,int width,POINT* points,int counts); virtual int methodB4(); virtual int methodB8(); virtual int methodBC(); virtual int methodC0(); virtual int FillSolidRectangle(int color,int x, int y, int w, int h); virtual int methodC8(); virtual int methodCC(); virtual int methodD0(); virtual int methodD4(); virtual int methodD8(); virtual int methodDC(); virtual int methodE0(); virtual int methodE4(); virtual int methodE8(); virtual int methodEC(); virtual int methodF0(); virtual int methodF4(); virtual int methodF8(); }; GC Structure: Код: typedef struct { PCANVAS* pcanvas; // char unk1[0x8]; PCANVAS* pcanvas_pen; //CPen *pcanvas_pen int pen_color; char unk3[0x4]; PCANVAS* pcanvas_brush; //CSolidBrush * pcanvas_brush int brush_color; char unk[0x4]; PCANVAS* pcanvas_text; int unk2; PCANVAS* pcanvas_icon; }GC; CPen: Код: class CPen: public IUnknown { public: virtual int GetColor(int *color); virtual int GetStyle(int *style); virtual int GetThikness(int *thikness); virtual int SetColor(int color); virtual int SetStyle(int style); virtual int SetThikness(int thikness); virtual int method2C(); virtual int method30(); }; CSolidBrush: Код: class CSolidBrush: public IUnknown { public: virtual int GetColor(int *color); virtual int SetColor(int color); }; CMyCanvas_h: Код: class CMyCanvas { public: CMyCanvas(GC *); ~CMyCanvas(); int SetPixel(int x1,int y1,int unk,int color); int DrawSolidLines(int color,int width,POINT* points,int counts); int FillSolidRectangle(int color,int x, int y, int w, int h); int DrawEllipse(int color,int width,int x1, int y1, int x2, int y2); int FillSolidEllipse(int color ,int x1, int y1, int x2, int y2); int DrawGlyphs(PCANVAS* pcanvas_text,int color,int x, int y,wchar_t *str, POINT *pp, int npp); int DrawLine(PCANVAS* pcanvas_pen,int x1, int y1, int x2, int y2); int Ellipse(PCANVAS* pcanvas_pen,PCANVAS* pcanvas_brush,int x, int y, int w, int h); int Glyphs(PCANVAS* pcanvas_text,int color,char unk ,int x, int y,wchar_t *str,int npp); int RoundRect(PCANVAS* pcanvas_pen,PCANVAS* pcanvas_brush,int x, int y, int w, int h, int arcw, int arch); private: CCanvas_DB2010 * pcanvas_db2010; CCanvas_DB2020 * pcanvas_db2020; CCanvas_A2 * pcanvas_A2; }; UUID: Код: UUID IID_Canvas_DB2010={0xC1, 0x65, 0xDB, 0x9E, 0x40, 0x18, 0x42, 0x81, 0x8E, 0x66, 0x42, 0x52, 0xB9, 0x2F, 0x64, 0xD1}; UUID IID_Canvas_DB2020={0xFB, 0x41, 0xD, 0x9C, 0x9C, 0x7B, 0x48, 0xFC, 0x8A, 0xC8, 0xC6, 0x34, 0xC3, 0x70, 0xF5, 0x08}; UUID IID_Canvas_A2={0xA9, 0x32, 0xD3, 0x2D, 0xEA, 0x47, 0x49, 0xF1, 0x93, 0xC3, 0xAD, 0x5A, 0xD0, 0x3D, 0x25, 0xFB}; CMyCanvas_cpp: Код: CMyCanvas::CMyCanvas(GC *gc) { pcanvas_db2010 = NULL; pcanvas_db2020 = NULL; pcanvas_A2 = NULL; switch (GetChipID()&CHIPID_MASK) { case CHIPID_DB2010: ((IUnknown *)(gc->pcanvas))->QueryInterface(&IID_Canvas_DB2010,PPINTERFACE(&pcanvas_db2010)); break; case CHIPID_DB2020: ((IUnknown *)(gc->pcanvas))->QueryInterface(&IID_Canvas_DB2020,PPINTERFACE(&pcanvas_db2020)); break; case CHIPID_DB3150: case CHIPID_DB3200: case CHIPID_DB3210: case CHIPID_DB3350: ((IUnknown *)(gc->pcanvas))->QueryInterface(&IID_Canvas_A2,PPINTERFACE(&pcanvas_A2)); break; } } CMyCanvas::~CMyCanvas() { if(pcanvas_db2010) { pcanvas_db2010->Release(); } if(pcanvas_db2020) { pcanvas_db2020->Release(); } if(pcanvas_A2) { pcanvas_A2->Release(); } } int CMyCanvas::FillSolidEllipse(int color ,int x1, int y1, int x2, int y2) { int r; if(pcanvas_db2010) { r = pcanvas_db2010->FillSolidEllipse(color, x1, y1, x2, y2); } if(pcanvas_db2020) { r = pcanvas_db2020->FillSolidEllipse(color, x1, y1, x2, y2); } if(pcanvas_A2) { r = pcanvas_A2->FillSolidEllipse(color, x1, y1, x2, y2); } return r; } So Funny. Hope someone can research it together. [ Редактировано MO_oC в 28.10.10 20:05 ] |
den_po: |
28.10.10, 16:34 |
1. these classes are where are some library functions from 2. it's not necessary to use switch/case block. |
MO_oC: |
31.10.10, 16:38 |
UUID: Код: typedef struct UUID2010SAFE { UUID uuid; UUID2010SAFE* parent; }*PUUID2010SAFE; UUID CID_IDisplayManager={0x88, 0xC6, 0x4A, 0x99, 0x8D, 0x3A, 0x42, 0x48, 0xB5, 0xD4, 0x24, 0x30, 0xDD, 0x3F, 0x74, 0x17}; UUID2010SAFE IID_IDisplayManager_DB2020={0xBC, 0x8E, 0xB4, 0x2, 0x3E, 0x52, 0x41, 0x3E, 0xA1, 0x19, 0x98, 0xE0, 0x9D, 0x7, 0x95, 0xE3,NULL}; UUID2010SAFE IID_IDisplayManager_DB3350={0x87, 0x7E, 0x94, 0x1D, 0x61, 0x27, 0x48, 0x2A, 0x9A, 0x2C, 0x1C, 0xE7, 0x6D, 0x56, 0xA5, 0x97,NULL}; UUID2010SAFE IID_IDisplayManager_A2={0x2F, 0x63, 0xF8, 0xC5, 0xFF, 0x23, 0x41, 0x87, 0xAC, 0xB9, 0x74, 0xA8, 0xDC, 0x57, 0x1C, 0xC3,NULL}; UUID2010SAFE IID_IDisplayManager_DB2010={0x00, 0x75, 0x50, 0xC3, 0x9A, 0x1D, 0x4F, 0xA4, 0xAE, 0xC9, 0x10, 0x98, 0xD8, 0xF9, 0xDA, 0x7A,NULL}; UUID2010SAFE IID_IDisplaySession_DB2010={0xE1, 0xB6, 0xF0, 0xFC, 0xBD, 0xDE, 0x44, 0x6B, 0xB8, 0xE9, 0x19, 0x1A, 0x42, 0x11, 0xA8, 0x39,NULL}; UUID2010SAFE IID_IDisplaySession_DB2020={0xB0, 0x90, 0x04, 0xAE, 0xB0, 0xA0, 0x40, 0x67, 0xBD, 0x69, 0x4B, 0xC3, 0x95, 0x82, 0xEE, 0xDF,NULL}; UUID2010SAFE IID_IDisplaySession_DB3350={0x2B, 0x9F, 0x99, 0x70, 0xA0, 0xE2, 0x4C, 0x5A, 0xBC, 0xB3, 0x45, 0x85, 0xAB, 0xB4, 0x46, 0x4A,NULL}; UUID2010SAFE IID_IDisplaySession_DB3210={0xDF, 0xB1, 0xE7, 0xC2, 0x6A, 0xF3, 0x44, 0x0B, 0xBB, 0xEE, 0x83, 0xD8, 0x9C, 0x91, 0x8E, 0xD4,NULL}; UUID2010SAFE IID_IDisplaySession_DB3150={0xB2, 0xB7, 0xBA, 0x91, 0x86, 0x71, 0x44, 0x3E, 0xBE, 0x29, 0xA0, 0xAB, 0x34, 0xF7, 0xC2, 0x93,NULL}; classes: Код: class IDisplaySession_DB2010: public IUnknown { public: virtual int method10(); virtual int method14(); virtual int method18(); virtual int method1C(); virtual int method20(); virtual int method24(); virtual int method28(); virtual int method2c(); virtual int method30(); virtual int method34(); virtual int method38(); virtual int get_DisplayBuffer(int x,int y,int width,int height,char* bmp); }; class IDisplaySession_DB2020: public IUnknown { public: virtual int method10(); virtual int method14(); virtual int method18(); virtual int method1C(); virtual int method20(); virtual int method24(); virtual int method28(); virtual int method2c(); virtual int method30(); virtual int method34(); virtual int method38(); virtual int method3c(); virtual int method40(); virtual int get_DisplayBuffer(int x,int y,int width,int height,char* bmp); }; class IDisplaySession_DB3150: public IUnknown { public: virtual int method10(); virtual int method14(); virtual int method18(); virtual int method1C(); virtual int method20(); virtual int method24(); virtual int method28(); virtual int method2c(); virtual int method30(); virtual int method34(); virtual int method38(); virtual int method3c(); virtual int method40(); virtual int get_DisplayBuffer(int x,int y,int width,int height,char* bmp); }; class IDisplaySession_DB3350: public IUnknown { public: virtual int method10(); virtual int method14(); virtual int method18(); virtual int method1C(); virtual int method20(); virtual int method24(); virtual int method28(); virtual int method2c(); virtual int method30(); virtual int method34(); virtual int method38(); virtual int method3c(); virtual int method40(); virtual int method44(); virtual int method48(); virtual int method4c(); virtual int method50(); virtual int get_DisplayBuffer(int x,int y,int width,int height,char* bmp); }; class IDisplaySession_DB3210: public IUnknown { public: virtual int method10(); virtual int method14(); virtual int method18(); virtual int method1C(); virtual int method20(); virtual int method24(); virtual int method28(); virtual int method2c(); virtual int method30(); virtual int method34(); virtual int method38(); virtual int method3c(); virtual int method40(); virtual int method44(); virtual int method48(); virtual int method4c(); virtual int get_DisplayBuffer(int x,int y,int width,int height,char* bmp); }; class IDisplayManager_A2: public IUnknown { public: virtual int method10(); virtual int method14(); virtual int method18(); virtual int method1C(); virtual int method20(); virtual int method24(); virtual int method28(); virtual int method2c(); virtual int method30(); virtual int method34(); virtual int method38(); virtual int method3c(); virtual int method40(); virtual int method44(); virtual int method48(); virtual int method4c(); virtual int method50(); virtual int method54(); virtual int CreateDisplaySession(int,int,int,int,int, void** pIDisplaySession_A2); }; class IDisplayManager_A1: public IUnknown { public: virtual int method10(); virtual int method14(); virtual int method18(); virtual int method1C(); virtual int method20(); virtual int method24(); virtual int method28(); virtual int method2c(); virtual int method30(); virtual int method34(); virtual int method38(); virtual int method3c(); virtual int method40(); virtual int CreateDisplaySession(int,int,int,int,int, void** pIDisplaySession_A1); }; get_DisplayBuffer: Код: int get_DisplayBuffer(int x,int y,int width,int height,char* buffer) { IDisplayManager_A2 * pIDisplayManager_A2 = NULL; IDisplayManager_A1 * pIDisplayManager_A1 = NULL; IDisplaySession_DB3210 * pIDisplaySession_DB3210 = NULL; IDisplaySession_DB3350 * pIDisplaySession_DB3350 = NULL; IDisplaySession_DB2020 * pIDisplaySession_DB2020 = NULL; IDisplaySession_DB3150 * pIDisplaySession_DB3150 = NULL; IDisplaySession_DB2010 * pIDisplaySession_DB2010 = NULL; IUnknown * pIUnknown = NULL; CoCreateInstance(&CID_IDisplayManager,&IID_IDisplayManager_A2,PPINTERFACE(&pIDisplayManager_A2)); if(!pIDisplayManager_A2) CoCreateInstance(&CID_IDisplayManager,&IID_IDisplayManager_DB3350,PPINTERFACE(&pIDisplayManager_A2)); CoCreateInstance(&CID_IDisplayManager,&IID_IDisplayManager_DB2020,PPINTERFACE(&pIDisplayManager_A1)); if(!pIDisplayManager_A1) CoCreateInstance(&CID_IDisplayManager,&IID_IDisplayManager_DB2010,PPINTERFACE(&pIDisplayManager_A1)); if(pIDisplayManager_A2) { pIDisplayManager_A2->CreateDisplaySession(0,0,0,0,0,PPINTERFACE(&pIUnknown)); if(pIUnknown) { pIUnknown->QueryInterface(&IID_IDisplaySession_DB3350,PPINTERFACE(&pIDisplaySession_DB3350)); pIUnknown->QueryInterface(&IID_IDisplaySession_DB3210,PPINTERFACE(&pIDisplaySession_DB3210)); pIUnknown->QueryInterface(&IID_IDisplaySession_DB3150,PPINTERFACE(&pIDisplaySession_DB3150)); pIUnknown->Release(); } pIDisplayManager_A2->Release(); } if(pIDisplayManager_A1) { pIDisplayManager_A1->CreateDisplaySession(0,0,0,0,0,PPINTERFACE(&pIUnknown)); if(pIUnknown) { pIUnknown->QueryInterface(&IID_IDisplaySession_DB2020,PPINTERFACE(&pIDisplaySession_DB2020)); pIUnknown->QueryInterface(&IID_IDisplaySession_DB2010,PPINTERFACE(&pIDisplaySession_DB2010)); pIUnknown->Release(); } pIDisplayManager_A1->Release(); } if(pIDisplaySession_DB3350) { pIDisplaySession_DB3350->get_DisplayBuffer(x,y,width,height,buffer); pIDisplaySession_DB3350->Release(); return 1; } if(pIDisplaySession_DB3210) { pIDisplaySession_DB3210->get_DisplayBuffer(x,y,width,height,buffer); pIDisplaySession_DB3210->Release(); return 1; } if(pIDisplaySession_DB2020) { pIDisplaySession_DB2020->get_DisplayBuffer(x,y,width,height,buffer); pIDisplaySession_DB2020->Release(); return 1; } if(pIDisplaySession_DB3150) { pIDisplaySession_DB3150->get_DisplayBuffer(x,y,width,height,buffer); pIDisplaySession_DB3150->Release(); return 1; } if(pIDisplaySession_DB2010) { pIDisplaySession_DB2010->get_DisplayBuffer(x,y,width,height,buffer); pIDisplaySession_DB2010->Release(); return 1; } return 0; } And this is the sshoot.elf make by the code, support db2010 db2020 db3150 db3210 db3350 [ Редактировано MO_oC в 1.11.10 23:18 ] |
thomassafca: |
31.10.10, 20:08 |
Works on my W995 |
zylka: |
31.10.10, 22:49 |
W800 - reset after pressing key |
den_po: |
31.10.10, 23:13 |
zylka, i had problems with some classes at w800. may be there are wrong ose_getshell/cocreateinstance? |
den_po: |
01.11.10, 02:48 |
ok, i've found what's wrong with w800 (thanks to zylka). w800 checks parents for IIDs so we have 2 ways: 1. extended UUID structure with a parent set to NULL Код: struct UUID2010SAFE { UUID uuid; UUID2010SAFE* parent; }; UUID CID_IDisplay_Manager={0x88, 0xC6, 0x4A, 0x99, 0x8D, 0x3A, 0x42, 0x48, 0xB5, 0xD4, 0x24, 0x30, 0xDD, 0x3F, 0x74, 0x17}; UUID2010SAFE IID_IDisplay_Manager_DB2020={0xBC, 0x8E, 0xB4, 0x2, 0x3E, 0x52, 0x41, 0x3E, 0xA1, 0x19, 0x98, 0xE0, 0x9D, 0x7, 0x95, 0xE3 , NULL}; UUID2010SAFE IID_IDisplay_Manager_DB3350={0x87, 0x7E, 0x94, 0x1D, 0x61, 0x27, 0x48, 0x2A, 0x9A, 0x2C, 0x1C, 0xE7, 0x6D, 0x56, 0xA5, 0x97 , NULL}; ... 2. patched CreateInstance with a removed parent check Добавлено 1.11.10 10:44 MO_oC, z610_r6da001: Код: ROM:4552A228 tblDisplayManager DCD IID_IDisplayManager ; DATA XREF: sub_447261B0+4Eo ROM:off_44726210o ROM:4552A22C DCD IDisplayManager_QueryInterface+1 ROM:4552A230 DCD IDisplayManager_AddRef+1 ROM:4552A234 DCD IDisplayManager_Release+1 ROM:4552A238 DCD IDisplayManager_1+1 ROM:4552A23C DCD IDisplayManager_GetFontInfo+1 ROM:4552A240 DCD IDisplayManager_3+1 ROM:4552A244 DCD IDisplayManager_4+1 ROM:4552A248 DCD IDisplayManager_5+1 ROM:4552A24C DCD IDisplayManager_SetDisplayProperty+1 ROM:4552A250 DCD IDisplayManager_7+1 ROM:4552A254 DCD IDisplayManager_8+1 ROM:4552A258 DCD IDisplayManager_DisplayDriverDebugCommand+1 ROM:4552A25C DCD IDisplayManager_DisplayDriverReadRegister+1 ROM:4552A260 DCD IDisplayManager_DisplayDriverWriteRegister+1 ROM:4552A264 DCD IDisplayManager_12+1 ROM:4552A268 DCD IDisplayManager_GetNumberOfFonts+1 ROM:4552A26C DCD IDisplayManager_14+1 ROM:4552A270 DCD IDisplayManager_15+1 ROM:4552A274 DCD IDisplayManager_16+1 ROM:4552A278 DCD IDisplayManager_GetDisplayUpdateOrientation+1 ROM:4552A27C DCD IDisplayManager_GetOriginalDisplayUpdateOrientation+1 ROM:4552A280 DCD IDisplayManager_19+1 |
MO_oC: |
01.11.10, 17:15 |
den_po, thanks for your code. only w800? seems that it works on w810. |
IronMaster: |
01.11.10, 17:36 |
MO_oC, The func is called IDisplayManager_CreateDisplaySession and the pIDisplay is IDisplaySession interface |
IronMaster: |
01.11.10, 20:59 |
MO_oC, You have mistake... UUID IID_ICanvas_A2 is {0xC4, 0xA3, 0x8D, 0xBB, 0x15, 0x68, 0x4D, 0x91, 0xAF, 0xD3, 0xD1, 0x16, 0xDF, 0x5F, 0xC6, 0x15}; and your UUID is IID_IBufferCanvas Код: class IBufferCanvas : public ICanvas |
Страница 1 из 2: [1] 2 » |
URL этой темы: https://mobilefree.justdanpo.ru/newbb_plus/viewtopic.php?topic_id=5122 © 2005-2018 supertrubka.org |