Getting a Header

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
User avatar
{KaS} Korori





Posts: 141
Joined: Sun Jun 26, 2005 7:06 pm
Location: Hopefully Kyoto Japan :)
Contact:

Getting a Header

Post by {KaS} Korori »

I almost got guerrilla in Visual Studio's. My problem is when i try to use a string as a header (I copied one from another) it does not work. So my question is that i know i have know have you use HEX but I am not familiar working with hex in Visual Studio.

I have C#/VB (2005/2008)

This is the code in hex
00000000000000000000000000000000000000000000000000000000000000000000000069746D63145E5590000000400000000000000000000000FF626C616D0000000110610F0180659C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042C800006974656D80BD0C0100000023FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000
Please visit my forum and sign up. Ask question, request maps on xbox.
Image
Establish in 2003 Visit my clan at kororigaming.com/kasclan
User avatar
xzodia




Translator Connoisseur Coagulator

Posts: 1981
Joined: Sun May 15, 2005 10:31 am
Location: UK
Contact:

Post by xzodia »

I'm assuming you want this to be constant in which case you'll need to declare it as a byte array.
Image
Halo 2 Plugins | Lock-on To Just About Anything | My Sites | Snow Hog
Old Plugins you have, upgrade you must...
Always Maintain a High Quality-To-Crap Ratio.
-DeToX-




Illusionist Recreator Connoisseur Acolyte
Sigma Decryptor Droplet Pyre
Blacksmith Socialist New Age System Engineer
ONI

Posts: 4589
Joined: Sun Jun 18, 2006 3:58 pm
Location: ...

Post by -DeToX- »

Code: Select all

        public static string BytesToHexString(byte[] data)
        {
            string hexString = "";
            for (int i = 0; i < data.Length; i++)
            {
                string dataStr = data[i].ToString("X");
                while (dataStr.Length != 2)
                {
                    dataStr = "0" + dataStr;
                }
                hexString += dataStr;
            }
            return hexString;
        }
        public static byte[] HexStringToBytes(string hexString)
        {
            List<byte> data = new List<byte>();
            for (int i = 0; i < hexString.Length; i+=2)
            {
                if (hexString.Length > i + 1)
                {
                    data.Add(byte.Parse(hexString[i] + hexString[i + 1].ToString(), System.Globalization.NumberStyles.HexNumber));
                }
            }
            return data.ToArray();
        }
These functions should give you helping hand in what you're doing.

Just go

byte[] data = HexStringToBytes("FF0077"); //FF0077 being our hexString.., replace it with your own.
Image
User avatar
SpecOp44




Advisor Recreator Snitch! Critic

Posts: 2008
Joined: Tue Jun 06, 2006 12:34 pm
Location: The Canadarm

Post by SpecOp44 »

I read the topic quickly and it look like "Getting head" or something. lol

And to stay on topic, the answer is that molecules aren't sub atomic if the boiling temperature is below 7C in hex.
Image
User avatar
{KaS} Korori





Posts: 141
Joined: Sun Jun 26, 2005 7:06 pm
Location: Hopefully Kyoto Japan :)
Contact:

Post by {KaS} Korori »

Now the problem is getting the footer lol.
Please visit my forum and sign up. Ask question, request maps on xbox.
Image
Establish in 2003 Visit my clan at kororigaming.com/kasclan
Post Reply