|
Hi I found this : http://www.neowin.net/forum/index.php?showtopic=356523, which at the bottom says how I could get applications to work, using a different registry. It needs to inject a dll (how and could it be a .net one?) and to hook the api calls (how?)
Please help
JoeJoe
|
|
|
|
|
joejoeiscool wrote: It needs to inject a dll (how and could it be a .net one?)
No, you can't inject a managed-code .DLL into another process. They don't support the necessary exports required for code injection.
joejoeiscool wrote: which at the bottom says how I could get applications to work, using a different registry
No, the article hypothesizes how to get emulate an alternate registry. The problem is, in order to get code injection to work and hook into the Kernel code functions to redirect them to your code, you need admin priv's. Which, if you have, then all of this becomes a moot point.
Basically, you can't do what you're thinking of doing to get around security.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am converting vb6 code to C# and I have a question regarding array argument. In vb6 the array argument below sometimes take the form of 1Dimension or MultiD where it is Redim depending on how it comes. C# does not allow this.....my question is, how do I handle it?
public double[] ConvertMatrixToBase0(double[] MyMat)
{
long i, j;
double[] ConvMat;
if(MultiDimensional(MyMat) == false) //1-dimensional array
{
ConvMat = new double[MyMat.GetLength(1) - 1]; //ReDim ConvMat(UBound(MyMat, 1) - 1)
for(i=1; i<=MyMat.GetLength(1); i++) //For i = 1 To UBound(MyMat, 1)
ConvMat[i - 1] = MyMat[i];
}
else //multi-dimensional array
{
ConvMat = new double[MyMat.GetLength(1)-1, MyMat.GetLength(2)-1]; //ReDim ConvMat(UBound(MyMat, 1) - 1, UBound(MyMat, 2) - 1)
for(i=1; i<=MyMat.GetLength(1); i++) //For i = 1 To UBound(MyMat, 1)
{
for(j=1; j<=MyMat.GetLength(2); j++) //For j = 1 To UBound(MyMat, 2)
ConvMat[i-1,j-1] = MyMat[i,j];
}
}
return ConvMat;
}
|
|
|
|
|
double[,] matrix = new double[10, 10];
led mike
|
|
|
|
|
led mike,
I don't think I did a good job describing the problem. It should have been how to handle a dynamic array argument in c#.
From readings that I have done, I do not think it's possible. I think I have to use Arraylist.
|
|
|
|
|
You would be better off using a generic collection rather than an arraylist
only two letters away from being an asset
|
|
|
|
|
I am going to look into collection but can you educate a bit about the differences between the two?
Thanks
|
|
|
|
|
Given your example using an ArrayList you would incur a boxing/unboxing penalty everytime to stored or accessed the values since ArrayList uses object. Using a generic collection, say List<double> you would not have this issue, with the additional benefit of being typesafe.
only two letters away from being an asset
|
|
|
|
|
Greetings Good People,
What is a good book I can use to learn about the .NET Framework Class Library for C#?
Thanks,
BP
|
|
|
|
|
|
Framework 3.0 exist but you advice 1.1
|
|
|
|
|
I do not advice anything.
I just recommended a good source for learning.
SkyWalker
|
|
|
|
|
The best book that I can think of that is primarily for C# and is the first place I look for all my questions in the language is: Sams Teach Yourself Visual Studio 2003 in 21 Days (I am sure their is a 2005 version). The book covers both C# and Visual Basic and gives you a complete outline of the features of various class libraries. An excellent book.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Which C#/.NET Obfuscator is best? Price and feature wise? I wise looking at the professional edition of dotfuscator but the price for the professional one is just silly. Any recommendations would be welcome.
|
|
|
|
|
|
ok. thanks. ive had a good look at that document before. What Obfuscators do you guys use?
|
|
|
|
|
One of them
SkyWalker
|
|
|
|
|
here is a good thread about them and a few naems and prices if you read the entire thread.
http://www.truevision3d.com/phpBB2/viewtopic.php?t=14340
|
|
|
|
|
I want that every button click
I will have a new object like:
class x = new class();
(the next time I will click on the button i will have another object named y or something else)
thanks
|
|
|
|
|
And what the question might be?
SkyWalker
|
|
|
|
|
You may use an array to store on increasing indexed items the newly created objects.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I tried to use arraylist
but again the first element in the array
is the same name as the second and so on
can you give me example of how to call the object from the arrylist?
thanks
|
|
|
|
|
Can you please post the relevant piece of code, pointing out what's going wrong?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I wrote:
Class p = new Class();
ArrayList a = new ArrayList();
a.Add(p);
now I want to call function of on eof the objects
in the array
how I call it?
a[0].?
|
|
|
|
|
groundzero111 wrote: how I call it?
It is quite straighforward, you have only to remember that, since the ArrayList operator [] returns an Object , then you have to cast it to the proper type, for instance (assuming that MyClass has a method Version() returning a string ):
MyClass p = new MyClass();
ArrayList a = new ArrayList();
a.Add(p);
string sVersion =((MyClass)a[0]).Version();
MessageBox.Show(sVersion);
hope that helps
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|