Results 1 to 15 of 15
  1. #1
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108

    [Help]Resource File, ReadMemory

    Ok I have 2 questions...

    1.) Is it possible to create another .resx? Cuz it's confusing having ~300 pictures in the same resource...They don't order correctly and I have to add every picture one by one :S

    2.) How do I ' Read Memory'...The opposite of writing to memory in a trainer...

    Code:
        'WriteMemory
        Public Function CYVLKCNBWG(ByVal IPVNEWULBH As Integer, ByVal ZXWMIGSUIR As Long, ByVal TIWTLMDJPA As Integer)
    
            Dim EEYHPAEHQD As Process() = Process.GetProcessesByName("iw4mp")
            If EEYHPAEHQD.Length = 0 Then
                End
            End If
            Dim AHHBGFUHSN As IntPtr = SBLMKMTWSO(&H1F0FFF, 0, EEYHPAEHQD(0).Id)
            INVEHXCMPX(AHHBGFUHSN, IPVNEWULBH, ZXWMIGSUIR, TIWTLMDJPA, Nothing)
            XOUIGIIPBK(AHHBGFUHSN)
    
        End Function
    Code:
          Try
                string1 = readdll2("cshell.dll")
                string2 = "&H" + Hex(string1 + &Haddress)
                Call ITZAMOBSVG(string2, stars.Text, 4)
            Catch
                MsgBox(ErrorToString)
            End Try
    This is how I write memory...however I want to know how to read it..

    E.g. on button event it reads the value of an address and fills in the value to a textbox.

    See what I mean by a new .resx file in attachement..



  2. #2
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Credit To Microsoft, This is long, so I grabbed it from their site

    Step-By-Step Example

    On the View menu, click Toolbox.

    Add a Button control to Form1.

    In the Properties window, set the Text property of the Button control to Create Resource.

    Double-click Create Resource.

    Add the following imports statement to the Form1.vb file:

    Imports System.Resources

    Add the following code in the Button1_Click event handler:

    Code:
    ' Code to Create a Resource. 
    Dim objImage As Image
    Dim strString As String
    Dim rsw As ResourceWriter
    
    ' objImage is the Image that will be added as a resource.
    objImage = Image.FromFile("c:\\Winter.jpg")
    
    ' strString is the string that will be added as a resource.
    strString = "This is the string from resource"
    
    'Creates a resource writer instance to write to MyResource.resources.
    rsw = New ResourceWriter("MyResource.resources")
    
    'Adds the image to the resource.
    ' "MyImage" is the name that the Image is identified as in the resource.
    rsw.AddResource("MyImage", objImage)
    
    'Adds the string to the resource.
    ' "MyText" is the name that the string is identified as in the resource.
    rsw.AddResource("MyText", strString)
    
    rsw.Close()
    MessageBox.Show("Resource Is Created.....")
    Note Change the Image.FromFile ("c:\\Winter.jpg") path based on the location of the image that you want to add as a resource.
    Add a PictureBox control to Form1.

    Add a Label control to Form1.

    Add another Button control to Form1.

    In the Properties window, set the Text property of the Button2 control to Use Resource.

    Double-click Use Resource.

    Add the following code in the Button2_Click event handler:

    Code:
    ' Code to retrieve the information from the resource. 
    Dim myImage As Image
    Dim myString As String
    Dim rm As ResourceManager
    
    ' Create a Resource Manager instance.
    rm = ResourceManager.CreateFileBasedResourceManager("MyResource", ".", Nothing)
    
    ' Retrieve the Image from MyResource by using the GetObject method.
    myImage = rm.GetObject("MyImage")
    
    ' Retrieves the string from MyResource.
    myString = rm.GetObject("MyText")
    PictureBox1.Image = myImage
    Label1.Text = myString
    On the File menu, click Save to save the project.

    On the Build menu, click Build Solution to build the project.

    On the Debug menu, click Start to run the project.

    Back to the top

    Verify That it Works

    When you run the project, Form1 appears.

    Click Create Resource to create a resource file.

    A message box confirms that you successfully created the resource file.

    Click Use Resource.

    Confirm that the image and the This is the string from resource text appears on the
    form.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  3. #3
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    I don't want to add 1 image to a resource I want to add another .resx file...check attachement...

    I need to add 48 pictures each...it would be helpful if I had different resource files...



  4. #4
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Crap: Edit:

    Yes, One Second.

    I am looking for it, I am pretty sure there is a resgen.exe file that allows you to generate resx and then you can add it as a embedded resource file

    Go here, Grab the Csharp Code, Compile and use

    https://jasonhaley.com/articles/resou...%20creator.htm
    Last edited by NextGen1; 02-27-2010 at 09:16 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  5. #5
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Ok I got my .resx...how to add it to my project so I can select it like I select the .resx at my image which is attached to my first post



  6. #6
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Right Click, Project in solutions explorer, Go to Add....Existing Item....choose your Resx File, Then change it's assembly type to embedded.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  7. #7
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Quote Originally Posted by NextGen1 View Post
    Right Click, Project in solutions explorer, Go to Add....Existing Item....choose your Resx File, Then change it's assembly type to embedded.
    Ok well this basically fucked up everything.

    By adding this. All images I used before are screwd now.

    155 errors containing:

    Code:
    bei EnvDTE.ProjectItem.get_FileCount()
    bei Microsoft.VisualStudio.Design.Serialization.ResXGlobalObjectProvider.GetFileNameForProjectItem(ProjectItem item)
    bei Microsoft.VisualStudio.Design.Serialization.ResXGlobalObject.BuildType()
    bei Microsoft.VisualStudio.Design.Serialization.ResXGlobalObject.GetObjectType()
    bei Microsoft.VisualStudio.Shell.Design.GlobalType.get_ObjectType()
    bei Microsoft.VisualStudio.Shell.Design.GlobalType.Equals(Object o)
    bei Microsoft.VisualStudio.Shell.Design.GlobalObject.Equals(Object o)
    bei Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GlobalKey.Equals(Object obj)
    bei System.Collections.Generic.ObjectEqualityComparer`1.Equals(T x, T y)
    bei System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
    bei Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects(Type baseType)
    bei Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects()
    bei Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetTypeFromGlobalObjects(String name, Boolean throwOnError, Boolean ignoreCase)
    bei Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
    bei Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name)
    bei System.ComponentModel.Design.Serialization.DesignerSerializationManager.GetType(String typeName)
    bei System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.GetType(String typeName)
    bei System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
    bei System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyReferenceExpression(IDesignerSerializationManager manager, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)
    bei System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
    bei System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)
    bei System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
    bei System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

    Glad I saved before doing that, restored it...

    However there's still no new resource file... :/

    Only 'Resources.resx'
    Last edited by Blubb1337; 02-27-2010 at 10:45 AM.



  8. #8
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    When you imported it, did you change the name first?

    You can't have 2 resource.resx

    Let me install C# and compile it, ( I used VWD for debugging, But you can't build a C# program with VWD)
    I will test and let you know


    Last edited by NextGen1; 02-27-2010 at 10:49 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  9. #9
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    I named it 'page3' so names are different.

    Thanks



  10. #10
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    I let you know in 15 mins. I will do it now.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  11. #11
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    My Findings.....

    I created a Resource File in the software as resx

    Added 4 Jpg files

    Went to solution Explorer

    Added existing item

    Chose the res file

    made sure the assembly type was embedded (it was)

    Double clicked it

    It showed the images, Clicked on the access modifier on the top, changed it to public

    now I have this

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/image-2.jpg[/IMG]


     


     


     



    The Most complete application MPGH will ever offer - 68%




  12. #12
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    ok well this is working...HOWEVER there is only 1 projectresource showing up(image in first post), I want the the added .resx to be there...



  13. #13
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Screenshot, Im confused, Worked, but didnt?


     


     


     



    The Most complete application MPGH will ever offer - 68%




  14. #14
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Quote Originally Posted by NextGen1 View Post
    I let you know in 15 mins. I will do it now.
    Do you mind teamviewing me for a second?

    leave me a pm



  15. #15
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    I will , Just give me a few, On a conference call till about 5 (long call)


     


     


     



    The Most complete application MPGH will ever offer - 68%




Similar Threads

  1. [Request] please help need file
    By elletheking in forum Battlefield 2 Hacks & Cheats
    Replies: 6
    Last Post: 01-09-2010, 08:26 PM
  2. Help-Rar files"end of archieve
    By Sycho in forum Combat Arms Mod Discussion
    Replies: 3
    Last Post: 12-13-2009, 06:26 PM
  3. Help me [file name]
    By cebolinha1 in forum Combat Arms Mod Discussion
    Replies: 5
    Last Post: 12-12-2009, 07:26 PM
  4. [Help] CA File Extension Deleter
    By LetItRock in forum Visual Basic Programming
    Replies: 8
    Last Post: 11-02-2009, 04:15 PM
  5. LithTech Resource File crack?
    By NoName805 in forum Combat Arms Discussions
    Replies: 4
    Last Post: 10-29-2009, 08:38 AM