Click here to Skip to main content
15,906,329 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simulating mouse click Pin
John Fisher4-Mar-04 10:50
John Fisher4-Mar-04 10:50 
GeneralMDI PARENT PROPERTY Pin
ASGill3-Mar-04 17:26
ASGill3-Mar-04 17:26 
GeneralRe: MDI PARENT PROPERTY Pin
Sabyasachi Bose3-Mar-04 18:34
Sabyasachi Bose3-Mar-04 18:34 
GeneralCaching In C# Application Pin
MicSky3-Mar-04 17:04
MicSky3-Mar-04 17:04 
GeneralRe: Caching In C# Application Pin
Dave Kreskowiak3-Mar-04 18:20
mveDave Kreskowiak3-Mar-04 18:20 
GeneralRe: Caching In C# Application Pin
Anonymous3-Mar-04 18:32
Anonymous3-Mar-04 18:32 
GeneralRe: Caching In C# Application Pin
Marcie Jones4-Mar-04 4:09
Marcie Jones4-Mar-04 4:09 
GeneralRe: Caching In C# Application Pin
Dave Kreskowiak4-Mar-04 6:03
mveDave Kreskowiak4-Mar-04 6:03 
GeneralRe: Caching In C# Application Pin
Anonymous7-Mar-04 3:20
Anonymous7-Mar-04 3:20 
QuestionHow do I hide the scrollbar in Panel? Pin
jason_htun3-Mar-04 16:22
jason_htun3-Mar-04 16:22 
AnswerRe: How do I hide the scrollbar in Panel? Pin
Meysam Mahfouzi3-Mar-04 17:02
Meysam Mahfouzi3-Mar-04 17:02 
GeneralC# Serial Port Pin
econner3-Mar-04 15:56
econner3-Mar-04 15:56 
GeneralRe: C# Serial Port Pin
Charlie Williams3-Mar-04 18:20
Charlie Williams3-Mar-04 18:20 
GeneralCapturing the path of the image source from a PictureBox to a String Pin
bneacetp3-Mar-04 15:14
bneacetp3-Mar-04 15:14 
GeneralRe: Capturing the path of the image source from a PictureBox to a String Pin
Dave Kreskowiak3-Mar-04 18:39
mveDave Kreskowiak3-Mar-04 18:39 
GeneralRe: Capturing the path of the image source from a PictureBox to a String Pin
Sabyasachi Bose3-Mar-04 18:55
Sabyasachi Bose3-Mar-04 18:55 
Generalcreate web page snapshot Pin
AWebDude3-Mar-04 15:08
AWebDude3-Mar-04 15:08 
GeneralRe: create web page snapshot Pin
John Kuhn3-Mar-04 15:50
John Kuhn3-Mar-04 15:50 
Generalcreate web page content snapshot Pin
AWebDude4-Mar-04 3:17
AWebDude4-Mar-04 3:17 
GeneralRe: create web page content snapshot Pin
John Kuhn4-Mar-04 16:32
John Kuhn4-Mar-04 16:32 
QuestionIs there a way to programatically determine if a binary is managed code? Pin
Throckmorton3-Mar-04 13:51
Throckmorton3-Mar-04 13:51 
AnswerRe: Is there a way to programatically determine if a binary is managed code? Pin
Nathan Blomquist3-Mar-04 16:00
Nathan Blomquist3-Mar-04 16:00 
I know this function works with managed and unmanaged dlls. You could try it with executables though:

public bool IsManaged(string filePath)
{
	byte[] Data = new byte[4096];
	FileInfo file = new FileInfo(filePath);
	FileStream fin = file.OpenRead();
	int read = fin.Read(Data,0,Data.Length);
	fin.Close();
	// Verify this is a executable/dll
	if ((Data[1] << 8 | Data[0]) != 0x5a4d)
		return false;
	// This will get the address for the WinNT header
	Int32 iWinNTHdr = Data[63]<<24 | Data[62]<<16 | Data[61] << 8 | Data[60];
	// Verify this is an NT address
	if ((Data[iWinNTHdr+3] << 24 | Data[iWinNTHdr+2] << 16 
		| Data[iWinNTHdr+1] << 8 
		| Data[iWinNTHdr]) != 0x00004550)
		return false;
	Int32 iLightningAddr = iWinNTHdr + 24 + 208;
	Int32 iSum=0;
	Int32 iTop = iLightningAddr + 8;
	for (int i = iLightningAddr; i < iTop; i++)
		iSum|=Data[i];
	if (iSum == 0)
		return false;
	else
		return true;
}


Got this from a blog entry here:
http://blogs.msdn.com/adam_nathan/archive/2003/10/26/56786.aspx[^]

Hope this helps,
Nathan

---------------------------
Hmmm... what's a signature?
QuestionIs there a file properties dialog in C#? Pin
Flack3-Mar-04 12:50
Flack3-Mar-04 12:50 
AnswerRe: Is there a file properties dialog in C#? Pin
Dave Kreskowiak3-Mar-04 18:46
mveDave Kreskowiak3-Mar-04 18:46 
AnswerRe: Is there a file properties dialog in C#? Pin
Heath Stewart4-Mar-04 5:18
protectorHeath Stewart4-Mar-04 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.