Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: LOGPEN - resource usage warning Pin
PJ Arends18-Jul-04 9:06
professionalPJ Arends18-Jul-04 9:06 
GeneralRe: LOGPEN Pin
Alexander Wiseman18-Jul-04 8:56
Alexander Wiseman18-Jul-04 8:56 
GeneralGet a pointer from an RVA Pin
Toni7818-Jul-04 6:43
Toni7818-Jul-04 6:43 
GeneralRe: Get a pointer from an RVA Pin
bikram singh19-Jul-04 12:55
bikram singh19-Jul-04 12:55 
GeneralProblem Creating a server on the local PC using CAsyncSocket Pin
femi ashiru18-Jul-04 6:42
femi ashiru18-Jul-04 6:42 
GeneralRe: Problem Creating a server on the local PC using CAsyncSocket Pin
valikac18-Jul-04 13:59
valikac18-Jul-04 13:59 
GeneralDirectory Date/Time Pin
Atlence18-Jul-04 4:04
Atlence18-Jul-04 4:04 
GeneralRe: Directory Date/Time Pin
Toni7818-Jul-04 7:32
Toni7818-Jul-04 7:32 
HANDLE hDir = CreateFile(
			".\\testFolder",                            // pointer to the file name
			FILE_LIST_DIRECTORY|FILE_WRITE_ATTRIBUTES,                // access (read/write) mode
			FILE_SHARE_READ|FILE_SHARE_DELETE,  // share mode
			NULL,                               // security descriptor
			OPEN_EXISTING,                      // how to create
			FILE_FLAG_BACKUP_SEMANTICS,         // file attributes
			NULL                                // file with attributes to copy
			);

	if( hDir == INVALID_HANDLE_VALUE )
	{
		printf( "Cannot open directory!\n" );
		return 0;
	} // end if

	FILETIME CreationTime;
	if( !GetFileTime( hDir, &CreationTime, NULL, NULL ) )
	{
		printf( "Couldn't read file time\n");
		return 0;
	} // end if

	CreationTime.dwLowDateTime ^= 0x0101010101010101;
	CreationTime.dwHighDateTime ^= 0x0101010101010101;

	if( !SetFileTime( hDir, &CreationTime, NULL, NULL) )
	{
		printf( "Couldn't set file time\n");
		return 0;
	} // end if

	CloseHandle( hDir )


// These two lines are there just so that the time will change drastically
// and that the changes would be visible to your eye. So you need to remove
// them in your application
CreationTime.dwLowDateTime ^= 0x0101010101010101;
CreationTime.dwHighDateTime ^= 0x0101010101010101;

Instead of GetFileTime, you can use GetSystemTime or whatever you wish to do.


// Afterall, I realized that even my comment lines have bugs

If the sun were to blow up, it would take us 7-8 minutes to realize it.
GeneralRe: Directory Date/Time Pin
Atlence18-Jul-04 14:19
Atlence18-Jul-04 14:19 
GeneralRe: Directory Date/Time Pin
Atlence2-Apr-05 12:55
Atlence2-Apr-05 12:55 
GeneralRe: Directory Date/Time Pin
Toni7829-Apr-05 13:30
Toni7829-Apr-05 13:30 
GeneralRe: Directory Date/Time Pin
Toni789-May-05 6:42
Toni789-May-05 6:42 
GeneralDialog Problem Pin
Kunal Shetye18-Jul-04 2:44
Kunal Shetye18-Jul-04 2:44 
GeneralRe: Dialog Problem Pin
Alexander Wiseman18-Jul-04 3:22
Alexander Wiseman18-Jul-04 3:22 
GeneralRe: Dialog Problem Pin
Kunal Shetye18-Jul-04 8:27
Kunal Shetye18-Jul-04 8:27 
GeneralRe: Dialog Problem Pin
Bob Stanneveld18-Jul-04 3:24
Bob Stanneveld18-Jul-04 3:24 
QuestionDevice Contexts usage? Pin
0v3rloader17-Jul-04 23:02
0v3rloader17-Jul-04 23:02 
AnswerRe: Device Contexts usage? Pin
Jörgen Sigvardsson18-Jul-04 0:07
Jörgen Sigvardsson18-Jul-04 0:07 
GeneralRe: Device Contexts usage? Pin
0v3rloader18-Jul-04 0:27
0v3rloader18-Jul-04 0:27 
GeneralRe: Device Contexts usage? Pin
Jörgen Sigvardsson18-Jul-04 0:35
Jörgen Sigvardsson18-Jul-04 0:35 
Generaldata mining Pin
Yulianto.17-Jul-04 22:23
Yulianto.17-Jul-04 22:23 
GeneralShellExecute Question Pin
otrcomm17-Jul-04 21:42
otrcomm17-Jul-04 21:42 
GeneralRe: ShellExecute Question Pin
vcplusplus18-Jul-04 2:26
vcplusplus18-Jul-04 2:26 
GeneralRe: ShellExecute Question Pin
User 665818-Jul-04 7:53
User 665818-Jul-04 7:53 
GeneralRe: ShellExecute Question Pin
otrcomm18-Jul-04 8:32
otrcomm18-Jul-04 8:32 

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.