C# :: How To Edit Process Memory
Mar 29, 2014
I would like to ask about editing proccess memory.For example,I would like to create some program for a multiplayer game which I play.How do I work with memory adresses and what are commands for it.
View 1 Replies
ADVERTISEMENT
Mar 8, 2013
I am looking for a way to run a process form memory, without having any executable. The application will be kept inside a resource and will be extracted during run time. It should be then started as a new process. I couldn't find a solution that works also on x64
View 5 Replies
View Related
Apr 8, 2014
Writing bytes to external process to remove a detour that the program does
this is what im trying it fails
HANDLE Handle = OpenProcess(PROCESS_ALL_ACCESS, false, ProcessId);
BYTE btLdrLoadDll[] = { 0x8B, 0xFF, 0x55, 0x8B, 0xEC };
if (!WriteProcessMemory(Handle, (BYTE*)((DWORD)GetProcAddress(GetModuleHandle("ntdll.dll"), "LdrLoadDll")), &btLdrLoadDll, sizeof(btLdrLoadDll), NULL)) {
CloseHandle(Handle);
std::cout << "
Failed to write Bytes to memory. Press enter to exit.";
[Code] ....
an also using the right address like this fails
WriteProcessMemory(Handle, (BYTE*)0x77C64F9F, &btLdrLoadDll, sizeof(btLdrLoadDll), NULL)
View 8 Replies
View Related
Jun 21, 2013
Why the size of a process grows larger in size for lots of small memory allocations. For example, say I have this struct, which is 16 bytes (for a 32 bit build):
Code:
struct Person {
int iID;
int iAge;
char * pForeName;
char * pSurName;
};
If I allocate memory like this:
Code:
LPBYTE lpB = new BYTE[sizeof(Person) * 1000000];
Then my process grows to 16,48KB in size, which is what I expected. However if I allocate memory like this:
Code:
Person * lpPerson;
for(int i = 0; i < 1000000; ++i)
lpPerson = new Person;
Then the process grows to 78,656KB, which I don't understand.
Additionally, I was surprised to find a vector acts more similarly to the first example. This code:
Code:
Person temp = { 0 };
std::vector<Person> people;
for(int i = 0; i < 1000000; ++i)
people.push_back(temp);
Only increases the process memory to 16,892.
View 5 Replies
View Related
Apr 16, 2013
Well,I have a dat file which following format;
ID Level(Manager or Executive)
Name
Sales(for 12months)
For example;
W00051 M
Lee Ah Moi
1200.00 150.00 1400.20 156.00 200.00 880.00 1500.00 8000.00 800.00 120.00 1600.00 1800.00
My question is how am i going to find the value 880.00 (August) & replace it with a new value?
Is it possible for me to open & edit the same file without creating s new one?
View 5 Replies
View Related
Aug 13, 2014
Its my 1st time using fopen,fprintf and others and i cant seem to edit my file via fprintf! Heres my program:
Code:
#include <stdio.h>
#include <stdlib.h>
char letter,check,nought,bleh,hi,a;
int main()
[Code]....
View 2 Replies
View Related
Jan 20, 2015
how i am using wxDev-c++ and i need to make.Tasks would include: use a class or struct variable, and create a program that can perform the following actions:
1. The data provided by the user to enter the keyboard.
2. The display of the stored data.
3. edit the data.
Example of data: name surname age.
I Try like it,its let me input and save it but how to edit it or i am doing it bad?
#include<iostream>
#include<fstream>
using namespace std;
int main()
[code]....
View 5 Replies
View Related
Aug 7, 2014
how to change a certain part of a text file? I want to +1 to a text file every time the user does a particular input. For example my text file has name << password << count . When the user logs in and choose option 1 the program will +1 to the count.
for e.g. Bob Bob123 1
when he logs in and chooses option 1.
it will change to Bob Bob123 2
View 3 Replies
View Related
Feb 12, 2015
What i'm trying to do is compile a text file to an executable, but the problem is that I want to be able to edit the resource file while in runtime, for example write something on a textbox, hit compile and get the executable file edited by the texbox.
Here's my codedom:
public static bool Compile(string sourcefile, string exefile) {
CSharpCodeProvider ccp = new CSharpCodeProvider();
CompilerParameters cp = new CompilerParameters();
cp.ReferencedAssemblies.Add("System.dll");
[Code] ....
Is there anyway I could do that?
View 2 Replies
View Related
Sep 27, 2014
I have problem with using ShellExecute For a simple calling ShellExecute I am using
ShellExecute( NULL, "open", "test.pdf", NULL, NULL, SW_SHOWNORMAL );
and I am able to open test.pdf file in working dir.
How can I use Edit box and put inside some name of file and after that use ShellExecute(with button...) and open file which name I typed in Edit box
I am using Borland Builder C++ 6.0
View 7 Replies
View Related
Jul 6, 2014
I'm trying to edit an existing xml file but with no luck. I'm new to xml environment.
This is the xml content :
<?xml version="1.0" encoding="UTF-8"?>
-<mmp>
<ID>aaa</ID>
<clientID>bbb</clientID>
<time>2004-05-10T17:35:41.29</time>
<session>2000</session>
<Answer>Yes</Answer>
-<Program>
<_id>ppp</id>
</mmp>
I'm trying to change the time and id values and can't do it.I tried almost anything.
View 4 Replies
View Related
Sep 24, 2013
I'm trying to take a value from an edit box and display it in the edit box as hex. I'm using this code:
CString buffer;
int intbuf;
m_edit[5]->GetWindowTextA(buffer);
intbuf = atoi(buffer);
buffer.Format("%02X", intbuf);
m_edit[5]->SetWindowTextA(buffer);
If I include the last line of code here I get a stack overflow error. If I don't include it, I can run through the debugger and the buffer CString is converted to hex just like I want, I just can't display it because I get that error.
View 4 Replies
View Related
Nov 27, 2013
I am working on this project where I need to update an edit box every couple of seconds with a status and based on the status I need to change the color of the background to a particular color.I am able to update the edit box with the status but is clueless on how to update background color.I have read some info on line about this but is confused.This edit box is on a tab in a dialog. Also, on this tab is a Groupable List Ctrl.
View 2 Replies
View Related
Nov 14, 2014
I have this project for school where I basically need to write a program that will take any text file and convert it into html code.
string line;
int lineCount = 0;
while (!inFile.eof()) {
getline(inFile, line);
cout << line << endl;
lineCount++;
}
cout << lineCount - 1 << " lines of text read in this file." << endl;
I have this block of code to print each line of the text file into the terminal window and count the number of lines printed. But I don't know how to make it change a single character or set of characters to something else. For example, if a line of text begins with the number "1", I want to be able to change it to "<h1>".
View 2 Replies
View Related
Jan 5, 2015
I have a report that's generated by a piece of software, and (I'm assuming because it was intended for Linux/Unix) when I open to read it in notepad, it has a bunch of funky symbols in it, and incorrect line feed characters instead of returns that windows uses.
I looked at the txt file with a hex editor and can see all the hex codes for the symbols I want deleted. One of the symbols 0A.
How can I do a "find and replace" command but do it with hex codes? These symbols cant be simply placed into my code file because VS does not know how to interpret it.
View 7 Replies
View Related
Jul 19, 2014
I have made a datagrid in a WPF and added a button to add rows, here is the code for that:
this.itemListDataGrid.Items.Add(new TextBox());
Also, I have already got 3 colums in the datagrid pre-added by me, so when the rows are added I click on one to edit it and it comes up with error edit item not allowed.
View 7 Replies
View Related
Apr 17, 2015
Is it possible to edit the message map at startup instead of just having it set at compile time?
I'm reading some values from an XML file at startup. The menu options will be determined from what I find in there. But I need to assign those menu options to the message map.
View 8 Replies
View Related
Dec 16, 2013
I'm trying to create an edit box in a CView.So far, this is how far I've gotten:
With this code
Code:
// .h
CEdit m_MyEditField;
// .c
m_MyEditField.Create(WS_CHILD | WS_VISIBLE,CRect(40,40,500,Y+55),this,0x1552);
m_MyEditField.SetWindowText("this is my CEdit field");
As you can see, the edit box doesn't look like the ones in a dialog, which is what I'm trying to accomplish.
Is there possibly some other class I should be using for the edit box?Or another setting for .Create?
View 2 Replies
View Related
May 5, 2014
I am working on a program that will do several mathematical calculation and will store the data into a csv file.The one below is just a prototype version of this.In my program,I will store my csv file as (current-date).csv using time.
With this in mind,I want my program to first check does (current-date).csv already exists.If not,the program runs normally and output all the data into the csv file.
However if (current-date).csv already exists,I want my program to read and edit that particular csv file,by skipping part1 in my code(name,id N etc.) and start with prompting the user for numbers straight-away.
In other words, if (current-date).csv already exists,the user should continue outputting the numbers from where the user last left before last termination instead of outputting the name,date & etc into the csv file again.
Eg: if no=22, continue inputting values from no=23 till terminating the program again and storing the values correctly into the csv file.
#include <iostream>
#include <fstream>
#include <iomanip>
#include <locale>
#include <string>
#include <sstream>
#include <time.h>
using namespace std;
// Program to read date N store it as currentdate.csv
[Code] ....
View 6 Replies
View Related
Feb 5, 2015
writing this program where you can search a structure array for existing elements, add new elements to the structure array, and find and display entire elements of the array structure and all.
Right now I am stuck on adding new elements to the structure array.
#include <iostream>
#include <string>
#include <iomanip>
[Code]....
Any methods to displaying the a array structure or editing it ....
View 6 Replies
View Related
Feb 10, 2015
i am working on a resx file. I have read the file and load it on data-gridview. now i wanted to be able to edit from the file and save.I have tried many ways but i didn't come with the solution. yesterday i tried this code below. I don't know how i can edit. here is what i have tried,
private void btnSave_Click(object sender, EventArgs e) {
foreach (DataGridViewRow _row in Gridview_Output.Rows) {
DataRow dt1 = oDataTable.NewRow();
for (int i = 0; i < Gridview_Output.ColumnCount; i++) {
Gridview_Input.SelectedRows[0].Cells[1].Value = oDataSet.Tables["data"].Rows[0][1].ToString();
[Code]...
View 1 Replies
View Related
Apr 26, 2014
I have a tabbed dialog with a couple of Separate dialogs. I created classes of CDialog for each dialog. Im trying to get the text from the edit control from the tabbed dialog and it appears in a message box when I press a button on the main dialog.
Code:
myDialog test;
test.UpdateData(TRUE);
CString bla = test.m_edit1;
test.UpdateData(FALSE);
MessageBox(bla,bla,MB_OK);
The m_edit is a variable of CString for the edit box
it gives me a error and crashes.
How do I get the text from the other dialogs edit control?
View 8 Replies
View Related
Aug 19, 2013
I want to search and display the field stored in text file and also i want to delete the field that is entered. Case 3 and 4 is incomplete.
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
int main() {
int a;
int st_id;
[Code] ....
View 6 Replies
View Related
Nov 11, 2013
I have outlook 2007 and i am building a plugin, that will edit the footer for all the email attachments,(for example - abc confidential). How can i write an outlook addin, that will on the fly, will check for excelsheets and word documents and edit their footer with "abc confidential"
View 1 Replies
View Related
Mar 15, 2013
Found an online suggestion of using an rc2 file and cut and paste stuff from .rc file to .rc2 file to see which line causes the problem but don't know how to create a blank .rc2 file. Problem started after I ported from VC++ 6 to VS2010.
View 5 Replies
View Related
Apr 13, 2015
I have a dialog box with several edit control boxes and I want to identify the edit control when I click the left mouse button on it. Any button action (up or down) doesn;t register when the mouse is clicked on any of the edit controls. There has got to be a simple way to do this.
View 1 Replies
View Related