[C#] My program is looking for a dependency which I clearly referenced. menu

User Tag List

Results 1 to 4 of 4
  1. #1
    Bitsize's Avatar Private
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C#] My program is looking for a dependency which I clearly referenced.

    I'm getting this wonderful error and I'm absolutely stumped.


    I even tried replacing the existing WInterface.dll in the output directory with the one from WInterface's output directory.

    Here is my Wcraft class. There is clearly nothing wrong with these classes so it has to be something with the settings. Any ideas?

    Code:
    using EasyHook;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace Warcraft
    {
        public class Wcraft : IEntryPoint
        {
            private readonly WInterface Interface;
    
            public Wcraft(RemoteHooking.IContext InContext, string InChannelName)
            {
                Console.WriteLine("hi");
                Interface = RemoteHooking.IpcConnectClient<WInterface>(InChannelName);
                Interface.WriteConsole("Dll successfully injected.");
            }
    
            public void Run(RemoteHooking.IContext InContext, string InChannelName)
            {
                try
                {
                    Console.WriteLine("Run method");
                    System.Windows.Forms.MessageBox.Show("Finally!");
                }
                catch (Exception e)
                {
                    Console.WriteLine("Owned.");
                    Console.WriteLine(e);
                }
                Console.ReadLine();
            }
        }
    }
    WInterface:

    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace Warcraft
    {
        public class WInterface : MarshalByRefObject
        {
            public void IsInstalled(Int32 InClientPID)
            {
                return;
            }
    
            public void WriteConsole(String Write)
            {
                Console.WriteLine(Write);
            }
        }
    }
    WInjector:

    Code:
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.IO;
    using System.Linq;
    using System.Runtime.InteropServices;
    using System.Runtime.Remoting;
    using System.Text;
    using System.Threading.Tasks;
    
    using EasyHook;
    using Warcraft;
    
    namespace WInjector
    {
        class WInjector
        {
            public string ChannelName;
            public readonly string dll = "..\\..\\..\\..\\Warcraft\\bin\\x86\\Debug\\Warcraft.dll";
    
            public static void Main(string[] args)
            {
                new WInjector().inject();
            }
    
            public void inject()
            {
                try
                {
                    Process[] procs = Process.GetProcessesByName("Wow");
                    int wowPid = procs[0].Id;
                    AttachConsole(wowPid);
    
                    Config.Register("Wow Injex", dll);
    
                    RemoteHooking.IpcCreateServer<WInterface>(ref ChannelName, WellKnownObjectMode.SingleCall);
                    RemoteHooking.Inject(wowPid, InjectionOptions.Default, dll, null, ChannelName);
                }
                catch (Exception e)
                {
                    Console.WriteLine(Marshal.GetLastWin32Error());
                    Console.WriteLine(e);
                    throw e;
                }
                Console.ReadLine();
            }
    
            [DllImport("kernel32", SetLastError = true)]
            private static extern bool AttachConsole(int dwProcessId);
        }
    }
    (private server btw)

    [C#] My program is looking for a dependency which I clearly referenced.
  2. #2
    ~Unknown~'s Avatar Contributor
    Reputation
    193
    Join Date
    Jan 2009
    Posts
    211
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not familiar with Easyhook, but is perhaps your Warcraft.dll looking for your WInterface.dll in the wow directory now that it is injected into that process instead of the project directory? shot in the dark as I don't use Easyhook at all.

  3. #3
    HeWhoIsUnknown's Avatar Corporal
    Reputation
    2
    Join Date
    Feb 2013
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to give up on C# and use C++ because LoadLibrary is just 100 bazillion times easier to work withe



  4. #4
    yellowspark's Avatar Contributor
    Reputation
    147
    Join Date
    Feb 2012
    Posts
    165
    Thanks G/R
    0/4
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are using EasyHook, you need to copy all files (INCLUDING .EXE) from EasyHook to your Debug folder

Similar Threads

  1. [Misc] Looking for some Guys which want to join a WoW Server Project
    By Frezer in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 02-28-2012, 11:26 AM
  2. Looking for a program I saw on here.
    By Voodoo13 in forum World of Warcraft General
    Replies: 0
    Last Post: 01-09-2007, 08:17 PM
  3. Looking for a Program.
    By TheHanyou in forum World of Warcraft General
    Replies: 10
    Last Post: 07-12-2006, 08:54 PM
All times are GMT -5. The time now is 01:58 AM. 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