|
Christian Graus wrote:
I think it's called disasmil or something.
It's called Ildasm.exe and is located in your \VisualStudio\SDK\v[number]\bin\ directory. If you're doing decompilation, I'd recommend the free Lutz Reflector which can examine .NET assemblies and generate the equivalent IL, C#, VB, or Delphi).
Any remotely useful information on my blog will be removed immediately. There are 10 kinds of people in the world. Those who have heard of the ubiquitous, overused, worn-out-like-an-old-shoe binary "joke" and those who haven't.
Judah Himango
|
|
|
|
|
Judah Himango wrote:
Lutz Reflector
I was just going to post link to Reflector...
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Ok, thx. But can we can do it on unmanaged code?
|
|
|
|
|
short answer: no
long answer: no. Why do you post it to C# forum then? AFAIK C# is managed language (it translates to IL).
David
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
dnh wrote:
AFAIK C# is managed language (it translates to IL).
Well, you could use ngen.exe[^] to compile an assembly to a native code image and then decompile that into C or whatever you have a decompiler for. I know that this information is 100% useless but I just wanted to complete your long answer.
Best regards
Dennis
|
|
|
|
|
Dennis C. Dietrich wrote:
I know that this information is 100% useless but I just wanted to complete your long answer.
Thank you! Sometimes I feel like that too (in general, not neccessary your answers).
David
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Hey all.
I need to make a program that can make screenshots of other windows (that is other applications in windows). It needs to make continuous screenshots so the my program probably needs to use the HWND information of the window in question. The optimal case would be that my program can make "screenshots" even though the window it needs to capture is minimized, is this possible?
Can anyone help?
Kind regards from Casper
|
|
|
|
|
If the window is minimised, it is not being drawn, and there is nothing to capture.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Yeah, it's not possible to capture a window that is not visible.
/\ |_ E X E GG
|
|
|
|
|
I know how easy .NET made it to create, use, and retrieve custom attributes. My question is not regarding this surface stuff. I'm trying to get at the Target within the custom attribute. This is probably not possible, but I'm still crying and whining until someone tells me to stop!!! I know that the .NET provided attributes do more that a custom attribute does. Ie... SerializableAttribute will actually set the IsSerializable to true in the Type definition of the Target. That's pretty cool in my book and I want to do similar things. Basically, a good example of what I want to do is I have two or three attributes that prompt my code to do certain things. They all mean completely different things, but aren't really meant to be used together...
Example:
EncryptAttribute
SignAttribute
DefaultOutputAttribute
<br />
[DefaultOutput("s1")]<br />
public class c1<br />
{<br />
[Sign]<br />
[Encrypt]<br />
public string s1;<br />
public string s2;<br />
}<br />
Basically I want to know if there is a way in the SignAttribute class definition to test what other attributes decorate the field/class/etc. that I am decorating because I don't want to allow Sign and Encrypt on the same target. I also don't want a class with DefaultOutput set to have any internal fields/properties to have Sign/Encrypted set. I know this is kind of a weird thing to do, but I know there as tons of people that would benefit from having a reference to the Target within a custom attribute.
Any help would be greatly appreciated...
"C makes it easy to shoot yourself in the foot;
C++ makes it harder, but when you do,
it blows away your whole leg."
--Bjarne Stroustrup (inventor of C++)
|
|
|
|
|
- Let Sign and Encrypt inherit from the same base class and prevent multiple attribute instances.
- Play around with accessebility (public, internal, private , etc) of the attribute definitions.
- Attributes really shine when they are applied to a concrete base class. Handle attributes in the default constructor. Here you can deal with all the detail .
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
Can someone direct me to the location where I can find the ID's for the various edit control messages like: EM_EMPTYUNDOBUFFER and EM_CANUNDO?
Thank you in advance,
Eric
|
|
|
|
|
I open a C++ project, type in the messages/contants/etc I want, hover the mouse over them, and the IDE shows me their numeric value. If that doesn't work, I use cout to print them as ints and get them that way.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I only have C# available and can't open a C++ project.
Thanks
|
|
|
|
|
I didn't think that was possible. In that case, I guess MSDN is your best bet. If you don't have C++, you definately don't have the header files that define that stuff.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I have never created a C++ file. My visual developement environement is the "standard" edition which only includes a single language, in my case C#.
This "standard" edition is a "trial" version that comes with a set of books in local bookstores (just incase you are wondering).
I have searched MSDN and have only found descriptions and examples but no actual number ID's for the messages.
Thanks.
Eric
|
|
|
|
|
Two more suggestions:
1. Take a look at the Visual Studio 2005 Express Edition betas which are available for free public download. Downloading the Version for C++ should enable you to use the procedure Christian suggested.
2. If you've found the descriptions on MSDN, you should know in which header-files the messages are declared. To get the header-files, download the Framework SDK and install it (they should be included).
www.troschuetz.de
|
|
|
|
|
Stefan Troschütz wrote:
To get the header-files, download the Framework SDK and install it (they should be included).
I think he already got that one and that you actually meant the Platform SDK.
Best regards
Dennis
|
|
|
|
|
No, I meant the Framework SDK and thought it would be sufficient as MSDN states that it "includes everything developers need to write, build, test, and deploy .NET Framework applications."
I know better now
THX
www.troschuetz.de
|
|
|
|
|
Beringer wrote:
Can someone direct me to the location where I can find the ID's for the various edit control messages like: EM_EMPTYUNDOBUFFER and EM_CANUNDO?
You don't need to get Visual C++ just in order to find out those defines. As Stefan already mentioned the correct header files are documented in the MSDN library. The header files themselves are part of the Microsoft Platform SDK[^].
Best regards
Dennis
|
|
|
|
|
Hello Gurus,
I created an AutoRun.EXE for my CDs in C#, based on .NET Framework. My AutoRun.exe launches "index.htm" file. It will generated an exception like this on PCs not installed with .NET FrameWork package:
Err Title: .NET Framework Initialization Error
Err Msg: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorwks.dll could not be loaded.
Basically, My program is like this:
----------------------------------
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
[DllImport("KERNEL32.DLL", EntryPoint="GetPrivateProfileString", SetLastError=true)]
private static extern int GetPrivateProfileString(string lpAppName, string lpKeyName,
string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
sAppNameToRun = GetPrivateProfileString(...);
try
{
// ProcessStartInfo psi = new ProcessStartInfo(@".\index.htm");
ProcessStartInfo psi = new ProcessStartInfo(sAppNameToRun);
Process.Start(psi);
}
catch(Exception err)
{
Do you know there is another way to create AutoRun.EXE without depending on .NET FrameWork? Or are there any tricks to this? I deeply appreciate any of your input.
Have a peaceful & thriving 2005
Khang
|
|
|
|
|
Yeah, the trick is simple. Write your autorun exe in C++. Seriously, if there was a way to run an exe without the framework, why would we be installing the framework at all ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Christian, thank you so much for your suggestion. You meant VC++ 6.0 or older versions? I guess I will have the same problems if I use VC++ .NET?
Khang
|
|
|
|
|
Khang Nguyen wrote:
I guess I will have the same problems if I use VC++ .NET?
Depends on what type of application you create in Visual Studio 2003, you can still create unmanaged applications in Visual Studio 2003.
|
|
|
|
|
Thanks, Nick. I am not familiar with this area but I will give it a try. It's nice to learn something new.
Khang
|
|
|
|