[Help]Resource File, ReadMemory

Posts 1–15 of 15 · Page 1 of 1
[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..
resx.JPGattachment deleted · 10 downloads before removal
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.
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...
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

http://jasonhaley.com/articles/resou...%20creator.htm
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
Right Click, Project in solutions explorer, Go to Add....Existing Item....choose your Resx File, Then change it's assembly type to embedded.
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'
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


I named it 'page3' so names are different.

Thanks
I let you know in 15 mins. I will do it now.
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
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

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...
Screenshot, Im confused, Worked, but didnt?
I will , Just give me a few, On a conference call till about 5 (long call)
Posts 1–15 of 15 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?