[Question] ahook  error menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    kingviper's Avatar Active Member
    Reputation
    24
    Join Date
    Mar 2007
    Posts
    219
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] ahook error

    Hey guys Im having trouble hooking my program to wow. I am using aHook.dll and getting this error trying to use it, but my friend can use it and not get an error. Im not sure if it is just a setting I I have off or what tho. I have aHook in the same folder and added it to references. I dont know what else I can do

    System.BadImageFormatException was unhandled
    Message="Could not load file or assembly 'aHook, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."
    Source="WoWReloger"
    FileName="aHook, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
    FusionLog="=== Pre-bind state information ===\r\nLOG: User = Dtagg-Laptop\\Dtagg\r\nLOG: DisplayName = aHook, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Users/Dtagg/Documents/Visual Studio 2008/Projects/WoWReloger/WoWReloger/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : WoWReloger, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config.\r\n LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).\r\nLOG: Attempting download of new URL file:///C:/Users/Dtagg/Documents/Visual Studio 2008/Projects/WoWReloger/WoWReloger/bin/Debug/aHook.DLL.\r\nERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.\r\n"
    StackTrace:
    at WindowsFormsApplication1.Form1.btnStart_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNat iveMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at WindowsFormsApplication1.Program.Main() in C:\Users\Dtagg\Documents\Visual Studio 2008\Projects\WoWReloger\WoWReloger\Program.cs:line 18
    at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    InnerException:
    The example code:
    Hook EndScene = new Hook(aProcess.GetProcessIdByName("Wow"));

    UInt32 pDevicePtr = EndScene.BlackMagic.ReadUInt(0x00C5DF8;
    pDevicePtr = EndScene.BlackMagic.ReadUInt(pDevicePtr + 0x397C);

    UInt32 EndSceneAddr = EndScene.BlackMagic.ReadUInt(pDevicePtr);
    EndSceneAddr = EndScene.BlackMagic.ReadUInt(EndSceneAddr + 0xA;

    txtFill.Text = EndScene.Hook_Install(EndSceneAddr).ToString();


    // Command to send using LUA
    string Command = "print(\"EndScene hooked!\");";

    // Allocate memory for command
    uint DoString_space = EndScene.BlackMagic.AllocateMemory(Encoding.UTF8.GetBytes(Command).Length + 1);

    // Write command in the allocated memory
    EndScene.BlackMagic.WriteBytes(DoString_space, Encoding.UTF8.GetBytes(Command));

    // Write the asm stuff for Lua_DoString
    EndScene.Hook_AsmAddLine("mov eax, " + DoString_space);
    EndScene.Hook_AsmAddLine("push 0");
    EndScene.Hook_AsmAddLine("push eax");
    EndScene.Hook_AsmAddLine("push eax");
    EndScene.Hook_AsmAddLine("mov eax, 0x00819210"); // Lua_DoString
    EndScene.Hook_AsmAddLine("call eax");
    EndScene.Hook_AsmAddLine("add esp, 0xC");
    EndScene.Hook_AsmAddLine("retn");

    // Inject the shit
    EndScene.Hook_AsmInject();

    // Free memory allocated for command
    EndScene.BlackMagic.FreeMemory(DoString_space);

    // Uninstall the hook
    EndScene.Hook_Remove();

    It throws the error as soon as the method starts, It doesn't even get to any of the code lines. Any suggestions?


    :gtfo2:



    [Question] ahook  error
  2. #2
    Cheatz0's Avatar Member
    Reputation
    14
    Join Date
    May 2009
    Posts
    36
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try to compile as x86.

  3. #3
    kingviper's Avatar Active Member
    Reputation
    24
    Join Date
    Mar 2007
    Posts
    219
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cheatz0 View Post
    Try to compile as x86.
    Ty so much that got me into the method finally, unfortunately that brought up a new error at code:
    Code:
    Hook EndScene = new Hook(aProcess.GetProcessIdByName("Wow"));
    Here is the error:
    Code:
    System.ComponentModel.Win32Exception was unhandled
      Message="Not all privileges or groups referenced are assigned to the caller"
      Source="System"
      ErrorCode=-2147467259
      NativeErrorCode=1300
      StackTrace:
           at System.Diagnostics.Process.SetPrivilege(String privilegeName, Int32 attrib)
           at System.Diagnostics.Process.EnterDebugMode()
           at Magic.BlackMagic.Open(Int32 ProcessId) in D:\My Documents\Visual Studio 2008\Projects\BlackMagic\BlackMagic\BMMain.cs:line 144
           at Magic.BlackMagic.OpenProcessAndThread(Int32 dwProcessId) in D:\My Documents\Visual Studio 2008\Projects\BlackMagic\BlackMagic\BMMain.cs:line 220
           at aHook.Hook..ctor(Int32 PID)
           at WindowsFormsApplication1.Form1.logStart() in C:\Users\Dtagg\Documents\Visual Studio 2008\Projects\WoWReloger\WoWReloger\Form1.cs:line 137
           at WindowsFormsApplication1.Form1.btnStart_Click(Object sender, EventArgs e) in C:\Users\Dtagg\Documents\Visual Studio 2008\Projects\WoWReloger\WoWReloger\Form1.cs:line 100
           at System.Windows.Forms.Control.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
           at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           at System.Windows.Forms.Control.WndProc(Message& m)
           at System.Windows.Forms.ButtonBase.WndProc(Message& m)
           at System.Windows.Forms.Button.WndProc(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.Run(Form mainForm)
           at WindowsFormsApplication1.Program.Main() in C:\Users\Dtagg\Documents\Visual Studio 2008\Projects\WoWReloger\WoWReloger\Program.cs:line 18
           at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException:
    Thanks in advance


    :gtfo2:



  4. #4
    JuJuBoSc's Avatar Banned for scamming CoreCoins Purchaser
    Reputation
    1019
    Join Date
    May 2007
    Posts
    922
    Thanks G/R
    1/3
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Answer is in the message ... need admin right.

  5. #5
    kingviper's Avatar Active Member
    Reputation
    24
    Join Date
    Mar 2007
    Posts
    219
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by JuJuBoSc View Post
    Answer is in the message ... need admin right.
    That makes sense, srry about the question.
    Is there a way to have the program run as admin but still debug? Im using C# VS2008
    You were right JuJu I ran it as admin in the Bin folder so now Im just trying to figure out how to run as admin and debug while still in VS
    Awesome so far


    :gtfo2:



  6. #6
    JuJuBoSc's Avatar Banned for scamming CoreCoins Purchaser
    Reputation
    1019
    Join Date
    May 2007
    Posts
    922
    Thanks G/R
    1/3
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Run VS as admin maybe ? Dunno I always run UAC disabled.

  7. #7
    kingviper's Avatar Active Member
    Reputation
    24
    Join Date
    Mar 2007
    Posts
    219
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by JuJuBoSc View Post
    Run VS as admin maybe ? Dunno I always run UAC disabled.
    Your a boss
    I +reped you thanks


    :gtfo2:



  8. #8
    Syltex's Avatar Sergeant Major
    Reputation
    23
    Join Date
    Jul 2010
    Posts
    174
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kingviper View Post
    That makes sense, srry about the question.
    Is there a way to have the program run as admin but still debug? Im using C# VS2008
    You were right JuJu I ran it as admin in the Bin folder so now Im just trying to figure out how to run as admin and debug while still in VS
    Awesome so far
    Run C# as admin when you start it? When it runs something it will run it as the same rights as the program was given.

  9. #9
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This has been answered in the main thread over and over again, you need both WoW and VS to be run as an administrator.

  10. #10
    !@^^@!'s Avatar Active Member
    Reputation
    23
    Join Date
    Feb 2007
    Posts
    155
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sometimes I wonder why so many developers overlook the exceptions, they're there for a reason...

  11. #11
    Mr.Zunz's Avatar Contributor
    Reputation
    92
    Join Date
    Mar 2007
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by !@^^@! View Post
    Sometimes I wonder why so many developers overlook the exceptions, they're there for a reason...
    Exceptions are there to swipe them under the rug, I herd.


  12. #12
    !@^^@!'s Avatar Active Member
    Reputation
    23
    Join Date
    Feb 2007
    Posts
    155
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Mr.Zunz View Post
    Exceptions are there to swipe them under the rug, I herd.
    That's why this in all cases is prefect coding imrite?

    Code:
    try 
        {
            FailzorFunction();
        }
        catch(Exception)
        {
            //OM NOM NOM DELICOUS EXCEPTIONS
        }

  13. #13
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    	try 
    	{
    		FailzorFunction();
    	}
    	catch(Exception)
    	{
    		//OM NOM NOM DELICOUS EXCEPTIONS
    	}
    Fixed; We use tabbing, not fail 4 spaces.. Plus you forgot to tab the first line, that's the most important line.


  14. #14
    kingviper's Avatar Active Member
    Reputation
    24
    Join Date
    Mar 2007
    Posts
    219
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    holy shit guys It was fixed, stop posting,
    PLEASE CLOSE THREAD


    :gtfo2:



  15. #15
    fusspawn's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    54
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kingviper View Post
    holy shit guys It was fixed, stop posting,
    PLEASE CLOSE THREAD
    Join Date: Mar 2007. Are you sure you havent hijacked this account, You just have to be new here saying that O.o

Page 1 of 2 12 LastLast

Similar Threads

  1. Question - Critical Errors
    By oddism in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 06-21-2009, 05:46 AM
  2. [Question] Glider error
    By Spot_1337 in forum Community Chat
    Replies: 1
    Last Post: 10-18-2008, 12:47 AM
  3. [Question] Modelchange -> Error?
    By Zami in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 12-08-2007, 12:55 PM
  4. [Question] Getting errors since the last patch.
    By adonai1 in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 10-13-2007, 03:24 PM
  5. Question : ModelEditFix Error
    By rwaar in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 08-04-2007, 07:43 AM
All times are GMT -5. The time now is 06:07 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