[Release][C#]WhiteMagic - Injected .NET Helper Library menu

Shout-Out

User Tag List

Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 54
  1. #31
    adaephon's Avatar Active Member
    Reputation
    76
    Join Date
    May 2009
    Posts
    167
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeh, I understand that. As I said, I was wanting to use this check for a personal project, not in conjunction with White Magic. I just looked at White Magic to see if it was only my issue or not.

    If you're interested, I got around it using
    Code:
    structure.GetType().StructLayoutAttribute == LayoutKind.Auto
    or
    structure.GetType().StructLayoutAttribute.IsDefaultAttribute()
    I'm guessing the GetCustomAttributes doesn't work because all classes/structs have the StructLayoutAttribute (it's just usually default value of Auto) and maybe it's not considered Custom.

    [Release][C#]WhiteMagic - Injected .NET Helper Library
  2. #32
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by adaephon View Post
    Yeh, I understand that. As I said, I was wanting to use this check for a personal project, not in conjunction with White Magic. I just looked at White Magic to see if it was only my issue or not.

    If you're interested, I got around it using
    Code:
    structure.GetType().StructLayoutAttribute == LayoutKind.Auto
    or
    structure.GetType().StructLayoutAttribute.IsDefaultAttribute()
    I'm guessing the GetCustomAttributes doesn't work because all classes/structs have the StructLayoutAttribute (it's just usually default value of Auto) and maybe it's not considered Custom.
    That's actually a very good point.

    Thanks for the heads up. (Ya learn something new every day!)

  3. #33
    Binded's Avatar Private
    Reputation
    12
    Join Date
    Nov 2011
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apoc, this is very well written although, because I'm anal, I've located a few functions you can safely convert to LINQ, the bottom function I just added in the ?? operator.

    Code:
    private static bool DataCompare(byte[] data, int offset, byte[] byteMask, string mask)
            {
                // Only check for 'x' mismatches. As we'll assume anything else is a wildcard.
                return !mask.Where((t, i) => t == 'x' && byteMask[i] != data[i + offset]).Any();
            }
    Code:
            public T Read<T>(params IntPtr[] addresses)
            {
                return Read<T>(addresses.Select(ptr => (ADDR) ptr.ToInt32()).ToArray());
            }
    Code:
            public static Magic Instance
            {
                get { return _instance ?? (_instance = new Magic()); }
            }
    Don't mean to nit-pick here.

    --Formerly known as "Bind"
    Last edited by Binded; 02-01-2012 at 08:25 PM.

  4. #34
    namreeb's Avatar Legendary

    Reputation
    668
    Join Date
    Sep 2008
    Posts
    1,029
    Thanks G/R
    8/222
    Trade Feedback
    0 (0%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    > 2 year necro for cosmetic changes? I don't even....

  5. #35
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Needless to say, pattern matching with a linq query is much slower than a hard coded loop because those lambdas aren't inlined.
    Also you are changing the expected behaviour of Read<T>(params IntPtr[]), if I interpreted it in a way it would compile.

  6. #36
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) You just broke Read<T>(params IntPtr[]). Thats not how it works.
    2) I'm well aware that I could use LINQ. However, LINQ is also much slower due to the compiler not being able to inline any of it. (It can't inline delegates)
    3) Really?

    If you're going to nitpick and assume that ReSharper knows-all, at least understand that R# isn't always correct in terms of performance.

  7. #37
    ziinus's Avatar Member
    Reputation
    2
    Join Date
    Nov 2008
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Could you re-upload your library ?
    Havn't messed with Wow code for at least 2 years and I'd like to change that

    Thanks

  8. #38
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  9. #39
    ~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)
    Originally Posted by Apoc View Post
    1) You just broke Read<T>(params IntPtr[]). Thats not how it works.
    2) I'm well aware that I could use LINQ. However, LINQ is also much slower due to the compiler not being able to inline any of it. (It can't inline delegates)
    3) Really?

    If you're going to nitpick and assume that ReSharper knows-all, at least understand that R# isn't always correct in terms of performance.
    I lol'd because I was going to say the same thing. Resharper is good, but don't post on here with a resharper cosmetic change and assume someone like Apoc hasn't already noted that. Being that it is a 2 year necro and I hadn't already said it,Good work on the library Apoc!

  10. #40
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ~Unknown~ View Post
    I lol'd because I was going to say the same thing. Resharper is good, but don't post on here with a resharper cosmetic change and assume someone like Apoc hasn't already noted that. Being that it is a 2 year necro and I hadn't already said it,Good work on the library Apoc!
    Thanks. Fact is though, this library is actually quite bad.

    I've recently written "GreyMagic", which is an in/out of process wrapper. It absolutely shits on WhiteMagic in terms of performance. (Also substantially faster than other out of process libs as well). I may end up releasing it sometime soon.

  11. #41
    ~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)
    Originally Posted by Apoc View Post
    Thanks. Fact is though, this library is actually quite bad.

    I've recently written "GreyMagic", which is an in/out of process wrapper. It absolutely shits on WhiteMagic in terms of performance. (Also substantially faster than other out of process libs as well). I may end up releasing it sometime soon.
    Ah that sounds great. I currently use WhiteMagic in cleancore (cach and mic library) and hadn't actually looked much into the implementation. I'm sure plenty of people would be interested in it (myself for sure). Pretty much learned a lot of in-process work from WhiteMagic. Also +points for your original naming scheme

  12. #42
    st0724's Avatar Member
    Reputation
    2
    Join Date
    Feb 2007
    Posts
    60
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ~Unknown~ View Post
    Ah that sounds great. I currently use WhiteMagic in cleancore (cach and mic library) and hadn't actually looked much into the implementation. I'm sure plenty of people would be interested in it (myself for sure). Pretty much learned a lot of in-process work from WhiteMagic. Also +points for your original naming scheme
    I just can't resist to say... I love that naming scheme too!

    Looking forward to it very much.

  13. #43
    skiss0rz's Avatar Member
    Reputation
    3
    Join Date
    Nov 2010
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I call m.Read<IntPtr>(0xABF47C, 0x2800), 42) I'm getting an exception raised that says: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

    I'm using the code from the example and only changed the EndScene offsets to the ones for the current version. I'm calling a method in my C# .dll from an injected C++ bootstrap DLL using ExecuteInDefaultAppDomain, which should mean I'm in-process, right? Am I doing something wrong?

  14. #44
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  15. #45
    skiss0rz's Avatar Member
    Reputation
    3
    Join Date
    Nov 2010
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Didn't WoW already have ASLR at the time he wrote that example?

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. [Release] LuaMe Version 1 (Script Helper)
    By Envoke in forum WoW EMU Programs
    Replies: 14
    Last Post: 04-05-2009, 03:05 AM
  2. [Release] Ascent/Arc/Asoure GM Helper
    By xeross155 in forum WoW EMU General Releases
    Replies: 5
    Last Post: 11-07-2008, 03:28 PM
  3. [Release]Custom Launcher[Vb.Net]
    By Emptie[Imp] in forum WoW EMU Programs
    Replies: 12
    Last Post: 10-13-2008, 01:13 PM
  4. [RELEASE] GamerzWoW Launcher - VB9.NET Source!
    By whitekidney in forum World of Warcraft Bots and Programs
    Replies: 9
    Last Post: 04-26-2008, 03:59 PM
  5. [RELEASE] GamerzWoW Launcher - VB9.NET Source!
    By whitekidney in forum WoW EMU Programs
    Replies: 0
    Last Post: 04-26-2008, 11:48 AM
All times are GMT -5. The time now is 10:34 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