|
|
I already found tools like procmon,regmon,... but i need make monitoring in code
|
|
|
|
|
So you want to know what code is doing.
I think the application you are dealing with is coded in C#. If it is not obfuscated/packed/crypted/protected you can decompile it and see its source code in a very similar form with C#.
You can use .NET Reflector to do this.
It can freely be downloaded from:
http://www.red-gate.com/products/reflector/[^]
|
|
|
|
|
I didn't understand what do you mean by If it is not obfuscated/packed/crypted/protected you can decompile it and see its source code in a very similar form with C#.
|
|
|
|
|
What I mean is, if the application you are dealing with is not protected with special software you can see its source code.
|
|
|
|
|
I didn't know how i can use .NET Reflector to get the source code for an exe tool(procmon).
can you tell me?
|
|
|
|
|
I try to create office ( outlook ) object and i get crash all the time.
The error code that i get is 80040111 - and i don't know why i getting it because office is install on the machine and and also i setup Office 2003 Interop ( i have office 2003 on this machine ).
The line that i get the crash is
_Application olApp = new ApplicationClass();
before this line i have include office Interop and office core -
using Microsoft.Office.Interop.Outlook;
using Microsoft.Office.Core;
|
|
|
|
|
All I can tell you is Google the crap out of that number. Usually you get a little more info that just an error code though.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hello,
I am using tableLayoutPanel on a form with some rows and columns. I put the controls in it at design time but i want to hide last row and it's control initially and the form hight should also be reduced accordingly.
The hidden row should be displayed on one button click and form size should also be expanded accordingly.
I don't want to add the controls at run time everytime, just hide or display the row with all controls at run time. I am unable to get any row specific operation with the tableLayoutPanel.
How can I achieve this?
Thanks in advance.
|
|
|
|
|
Hello friends ,pls help me.
How to check username and passwords are already exists or not
how can i rewrite this code for checking passwords.
string x;
x = TextBox1.Text;
con.Open();
cmd = new SqlCommand("Select count(*) from registrations where username='" + TextBox1.Text + "' and password='" + TextBox3.Text + "'", con);
int count = (int)cmd.ExecuteScalar();
if (count != 0)
{
Session["id"] = TextBox1.Text;
Label5.Text = "Usre name already Exists ";
}
else
{
adp = new SqlDataAdapter("insert into registrations values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL ,NULL,NULL)", con);
adp.Fill(ds);
Response.Redirect("welcome.aspx?a=" + TextBox1.Text);
}
|
|
|
|
|
What is not clear for you in code which you posted?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
You never want to tell the user that the password already exists, because then they know that SOMEONE has that password. In a small environment, that could be bad.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Is there any particular reason why two people aren't allowed to have the same password? In other words, why can't I have the password "geek", if there's someone with the same password?
I are troll
|
|
|
|
|
Hi.
How can we pass a pointer ( like byte* pointerToImage ) to a method as an argument ?
I've tested this way :
void mainMethod()
{
unsafe
{
.
.
byte* pointerToImage = (byte*)(void*)Scan0;
checkOut( ref pointerToImage );
.
.
}
}
void checkOut(ref byte* pointerToImage)
{
unsafe
{
.
.
.
}
}
But it hasn't worked.
The error :
Pointers and fixed size buffers may only be used in an unsafe context
Could you guide me ?
Tank you.
|
|
|
|
|
You need to mark the method unsafe.
unsafe void checkOut(ref byte* pointerToImage)
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Thank you Expert
|
|
|
|
|
hi
how can I enable run ActiveX in web browser control in C#
(system.windows.forms.webbrowser)
|
|
|
|
|
I wish to have a TextBox which it can fire the list of AutoCompleteCustomSource when the TextBox is clicked without enter any text.
But i can't find any method that can use to trigger AutoComplete list during run time.
Pls advise. Thanks
|
|
|
|
|
hi there, im new to the forums. Im creating a dice game. however my attack logic is some what flawed. I was having trouble with random numbers generating the same number so i placed them inside there own class hoping it would then generate diffrently. however now the same number generates eg 66 + 66. this is a rather pain as my whole game will contain about 7 randoms.All being called ont he same button.Another problem im having (///////second code///////) Where the random only generates and pulls up if (dilemma == 1). Just a note im fairly new to c# so if you could explain any fixes you come up with i'd really appreciate it.
regards ant
public class Globals4
{
public static int user;
public static Random uc = new Random();
}
public class Globals3
{
public static int comp;
public static Random cc = new Random();
}
lblwarning.Text = "Warning";
MessageBox.Show("personal attack");
int userresult = Globals4.user + Globals.army;
Globals3.comp = Globals3.cc.Next(1, 100);
Globals4.user = Globals4.uc.Next(1, 100);
Globals4.user = Globals4.user + Globals.army;
MessageBox.Show("Computer rolled " + Globals3.comp + " You rolled " + Globals4.user + " with an army strength of " + Globals.army + " equals " + userresult + "");
//////////////////////////////SECOND CODE//////////////////////////////////////
dilemma = dl.Next(1, 1);
DialogResult res;
if (dilemma == 1)
{
res = MessageBox.Show("marriage", "Dilemma", MessageBoxButtons.YesNo);
if (res == DialogResult.Yes)
{
Globals.notoriety -= 1;
}
else if (res == DialogResult.No)
{
Globals.notoriety += 1;
}
if (Dilema == 2)
{
res = MessageBox.Show(" force?", "check", MessageBoxButtons.YesNo);
if (res == DialogResult.Yes)
{
Globals.notoriety -= 1;
}
else if (res == DialogResult.No)
{
Globals.notoriety += 1;
}
//EDIT i forgot to add this is c# visual i believe its called .net (not the console)
|
|
|
|
|
Random does not produce actually random values, it's a pseudo-random generator. Seed your Random with time related value. Something like that new Random(DateTime.Now.GetHashCode()); or new Random(Environment.TickCount);
Eslam Afifi
|
|
|
|
|
im afraid i dont really understand could you mock me up an example of 2 randoms in one method?
|
|
|
|
|
Hi,
Are you by any chance a graduate of the school of "I'm absolutely not going to read the documentation" programming? The reason I ask is that the title of your original post was the answer, i.e you knew that you wanted to seed the random number generator.
When you were told how to do it, you asked for code. I have just opened the documentation for the Random class and on the introductory page is a full example showing more than one method of seeding the generator.
If you had just done the same then your problem would have been solved in less time than it took to post the question.
Alan.
|
|
|
|
|
well that was a nice response,I presume your from the old school of elitist programmers who bash new people to a language or just say try google Considering i've been looking into this for 3 days hence why i knew what i was doing just not sure how to impliment it and not really understooding the code thats why i posted. I also asked for a interpretation of the code as a general rule to work from not for someone to do it for me. Im sorry ive my lack of knowledge causes you offence but as a rule of thumb forums are to learn from
|
|
|
|
|
Hi,
A lack of knowledge does not offend me in the slightest and I am more than willing to help. The point I made was that you used "Random seeds?" for the title of your post yet you appeared not to have done any research on that very topic.
You must have thought it a bit odd that something called a random number generator was giving the same sequence every time it was used.
Surely the place to start was with the documentation.
Alan.
|
|
|
|
|
As I have understood your post, you are having troubles with random numbers generation.
Here is a solution, that may be helpful.
As it has been noted, a seed number is used to start numbers generation. In most occasions this number is dependent on current time, for example, Environment.TickCount can be such a seed. What happens sometimes, is that number sequences are being generated too fast, so that the time-related seed is not changed. This may result in troubles, when you are generating numbers not in one sequence. Here is a code example. We are generating an array of objects typed sample , and each object contains a set of randomly generated numbers.
class sample
{
double[] dblMyArray = new double[20];
public sample()
{
Random rndObj = new Random(Environment.TickCount);
for (int i = 0; i < dblMyArray.Length; i++)
dblMyArray[i] = rndObj.NextDouble();
}
}
class Program
{
static void Main(string[] args)
{
sample[] mainArray = new sample[10];
for (int i = 0; i < mainArray.Length; i++)
mainArray[i] = new sample();
}
}
Now, what will happen is a sad fact: all the objects in mainArray will have THE SAME values in dblMyArray . This is because modern computations are fast, and time related seed cannot change fast enough. You may run this code and check out the values.
If you have a similar problem, the solution is to sleep a program for a short time, I used 1ms. This way the seed number will change, and each time you'll have different sequences.
|
|
|
|