Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# and Large Images Pin
awaldro13-Jul-09 4:08
awaldro13-Jul-09 4:08 
GeneralRe: C# and Large Images Pin
Huxley Stronghead13-Jul-09 7:11
Huxley Stronghead13-Jul-09 7:11 
GeneralRe: C# and Large Images Pin
Huxley Stronghead11-Jul-09 0:22
Huxley Stronghead11-Jul-09 0:22 
GeneralRe: C# and Large Images Pin
awaldro13-Jul-09 4:13
awaldro13-Jul-09 4:13 
GeneralRe: C# and Large Images Pin
Huxley Stronghead13-Jul-09 6:59
Huxley Stronghead13-Jul-09 6:59 
Questionhow to deal with local drive..? Pin
Mtyb8-Jul-09 11:27
Mtyb8-Jul-09 11:27 
AnswerRe: how to deal with local drive..? Pin
musefan8-Jul-09 11:48
musefan8-Jul-09 11:48 
AnswerRe: how to deal with local drive..? Pin
Luc Pattyn8-Jul-09 22:46
sitebuilderLuc Pattyn8-Jul-09 22:46 
Hi,

Windows Explorer has a menu Tools/MapNetworkDrive, which confusingly also works for local stuff; you can map any partition, and any folder to a drive letter (until you run out of free letters).

Then you can use P/Invoke to get what you want, using:
/// <summary>
/// GetVolumeInformation
/// </summary>
/// <param name="rootPathName"></param>
/// <param name="lpVolumeNameBuffer"></param>
/// <param name="nVolumeNameSize"></param>
/// <param name="lpVolumeSerialNumber"></param>
/// <param name="lpMaximumComponentLength"></param>
/// <param name="lpFileSystemFlags"></param>
/// <param name="lpFileSystemNameBuffer"></param>
/// <param name="nFileSystemNameSize"></param>
/// <returns></returns>
[DllImport("kernel32.dll")]
public static extern int GetVolumeInformation(	// BOOL
	string rootPathName,					// LPCTSTR root directory
	StringBuilder lpVolumeNameBuffer,		// LPTSTR volume name buffer
	int nVolumeNameSize,					// DWORD length of name buffer
	int lpVolumeSerialNumber,				// LPDWORD volume serial number
	int lpMaximumComponentLength,			// LPDWORD maximum file name length
	int lpFileSystemFlags,					// LPDWORD file system options
	StringBuilder lpFileSystemNameBuffer,	// LPTSTR file system name buffer
	int nFileSystemNameSize);				// DWORD length of file system name buffer

/// <summary>
/// GetDiskFreeSpaceEx.
/// </summary>
/// <param name="rootPathName"></param>
/// <param name="lpFreeBytesAvailable"></param>
/// <param name="lpTotalNumberOfBytes"></param>
/// <param name="lpTotalNumberOfFreeBytes"></param>
/// <returns></returns>
[DllImport("kernel32.dll")]
public static extern int GetDiskFreeSpaceEx(string rootPathName,
	ref long lpFreeBytesAvailable, ref long lpTotalNumberOfBytes, 
	ref long lpTotalNumberOfFreeBytes);


Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

QuestionDoes anyone know of any command line email programs that work!!! Pin
Antone Eason8-Jul-09 9:54
professionalAntone Eason8-Jul-09 9:54 
AnswerRe: Does anyone know of any command line email programs that work!!! Pin
Tr@v8-Jul-09 10:19
Tr@v8-Jul-09 10:19 
GeneralRe: Does anyone know of any command line email programs that work!!! [modified] Pin
Antone Eason8-Jul-09 10:30
professionalAntone Eason8-Jul-09 10:30 
GeneralRe: Does anyone know of any command line email programs that work!!! Pin
Tr@v8-Jul-09 10:36
Tr@v8-Jul-09 10:36 
GeneralRe: Does anyone know of any command line email programs that work!!! Pin
Antone Eason8-Jul-09 10:47
professionalAntone Eason8-Jul-09 10:47 
GeneralRe: Does anyone know of any command line email programs that work!!! Pin
danzar8-Jul-09 17:55
danzar8-Jul-09 17:55 
QuestionExplicitly call IDispose() method Pin
Richard Blythe8-Jul-09 9:41
Richard Blythe8-Jul-09 9:41 
AnswerRe: Explicitly call IDispose() method Pin
Luc Pattyn8-Jul-09 10:46
sitebuilderLuc Pattyn8-Jul-09 10:46 
GeneralRe: Explicitly call IDispose() method Pin
Richard Blythe8-Jul-09 11:08
Richard Blythe8-Jul-09 11:08 
AnswerRe: Explicitly call IDispose() method Pin
N a v a n e e t h8-Jul-09 17:25
N a v a n e e t h8-Jul-09 17:25 
GeneralRe: Explicitly call IDispose() method Pin
Luc Pattyn8-Jul-09 22:50
sitebuilderLuc Pattyn8-Jul-09 22:50 
GeneralRe: Explicitly call IDispose() method Pin
N a v a n e e t h9-Jul-09 16:40
N a v a n e e t h9-Jul-09 16:40 
AnswerRe: Explicitly call IDispose() method Pin
Curtis Schlak.8-Jul-09 17:39
Curtis Schlak.8-Jul-09 17:39 
GeneralRe: Explicitly call IDispose() method Pin
Daniel Grunwald9-Jul-09 3:38
Daniel Grunwald9-Jul-09 3:38 
QuestionCustom Treeview with Overridden OnPaint & WndProc Pin
VengefulSakhmet8-Jul-09 9:38
VengefulSakhmet8-Jul-09 9:38 
AnswerRe: Custom Treeview with Overridden OnPaint & WndProc Pin
Richard Blythe8-Jul-09 9:44
Richard Blythe8-Jul-09 9:44 
GeneralRe: Custom Treeview with Overridden OnPaint & WndProc Pin
VengefulSakhmet8-Jul-09 10:55
VengefulSakhmet8-Jul-09 10:55 

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.