CEGui and EndScene menu

Shout-Out

User Tag List

Results 1 to 4 of 4
  1. #1
    hypnodok's Avatar Member
    Reputation
    19
    Join Date
    Nov 2007
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CEGui and EndScene

    Ive been trying to get CEGUI to render inside my EndScene hook, it doesnt seem to work right tho.
    This is my code:
    Code:
    CEGUI::DirectX9Renderer* myRenderer;
    bool initialized = false;
    
    HRESULT WINAPI hook_EndScene( IDirect3DDevice9 * pThis )
    {
        if(!initialized)
        {
            Debug("Trying to initialize CEGUI");
            myRenderer = new CEGUI::DirectX9Renderer( pThis, 512 );
            new CEGUI::System( myRenderer );
            Debug("CEGUI initialized");
            initialized=true;
        }
    
        CEGUI::System::getSingleton().renderGUI();
        Debug("Rendered CEGUI");
    
        return oEndScene(pThis);
    }
    Not exactly pretty but I dont see why it shouldnt work. The code compiles fine but for some reason the DLL wont inject.
    A little hint maybe?

    CEGui and EndScene
  2. #2
    hypnodok's Avatar Member
    Reputation
    19
    Join Date
    Nov 2007
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have identified the problem to an extent.
    It seems that the dll fails to load the corresponding .dll files and hence fails to inject.
    After moving CEGUIBase_d.dll (I use the debug ones for now) to my wow directory, I can make the game crash using
    Code:
    CEGUI::System::getSingleton().renderGUI();
    before initializing the system.
    However the dll still fails to do its job if I leave
    Code:
    myRenderer = new CEGUI::DirectX9Renderer( pThis, 512 );
    in there, movin DirectX9GUIRenderer_d.dll to my wow directory too did not fix this issue for me.
    Can someone tell me where to put the CEGui includes/dlls/libs in order to make it work?

  3. #3
    hypnodok's Avatar Member
    Reputation
    19
    Join Date
    Nov 2007
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Problem fixed, the solution was statically linking all of CEGuis dependencies, then fixing the device so that the screen doesnt stay blank after rendering the GUI.
    For reference, these are the threads that helped me fix it:
    www.cegui.org.uk :: View topic - Problem Implementing Into DirectX9 Hook
    www.cegui.org.uk :: View topic - Problems with CEGUI_STATIC, well, running CEGUI at all

  4. #4
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Before you go writing all of this stuff in C++, you might want to think about writing an addon and using ConsoleRegister() to register your functions into WoW. You can then call them from your addon you wrote. There's an article on GD on how it works, addresses will be wrong, just check the new WoWX pattern.xml.

Similar Threads

  1. [Sample Code] EndScene Hook with ASM and blackmagic
    By RivaLfr in forum WoW Memory Editing
    Replies: 90
    Last Post: 4 Weeks Ago, 04:06 PM
  2. Understanding Detours and EndScene Hooking
    By berlinermauer in forum WoW Memory Editing
    Replies: 7
    Last Post: 10-04-2012, 02:08 PM
  3. EndScene and WPF problem
    By !@^^@! in forum WoW Memory Editing
    Replies: 20
    Last Post: 01-11-2011, 01:15 AM
  4. Replies: 11
    Last Post: 01-06-2011, 02:59 PM
  5. Replies: 11
    Last Post: 12-23-2010, 09:30 PM
All times are GMT -5. The time now is 10:54 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search