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

C / C++ / MFC

 
AnswerRe: reading a line of text from a txt file without doulble quotes? Pin
ThatsAlok21-Aug-07 1:56
ThatsAlok21-Aug-07 1:56 
JokeRe: reading a line of text from a txt file without doulble quotes? Pin
ghle27-Aug-07 5:39
ghle27-Aug-07 5:39 
Questioncan anybody tell me how to read from a .csv file Pin
philiptabraham20-Aug-07 22:12
philiptabraham20-Aug-07 22:12 
AnswerRe: can anybody tell me how to read from a .csv file Pin
jhwurmbach20-Aug-07 22:47
jhwurmbach20-Aug-07 22:47 
QuestionHow to get complie time. Pin
Max++20-Aug-07 21:24
Max++20-Aug-07 21:24 
AnswerRe: How to get complie time. Pin
Stephen Hewitt20-Aug-07 21:34
Stephen Hewitt20-Aug-07 21:34 
GeneralRe: How to get complie time. Pin
Max++20-Aug-07 22:01
Max++20-Aug-07 22:01 
AnswerRe: How to get complie time. Pin
Stephen Hewitt20-Aug-07 22:01
Stephen Hewitt20-Aug-07 22:01 
Here's an example of how an EXE can determine when it was linked. You may also want to check out the following link: http://www.microsoft.com/msj/0297/hood/hood0297.aspx
-----------------------------------------------------------------
// CommandLine.cpp : Defines the entry point for the console application.
//

#include "StdAfx.h"
#include <Windows.h>
#include <iostream>
#include <assert.h>

void main()
{
using namespace std;

// Get out module handle.
HMODULE hUs = GetModuleHandle(NULL);

// In Win32 a module handle is really a pointer to a "DOS header".
PIMAGE_DOS_HEADER pDOS = (PIMAGE_DOS_HEADER)hUs;
assert(pDOS->e_magic == IMAGE_DOS_SIGNATURE);

// Get the address of the "NT headers" from the "DOS header".
PIMAGE_NT_HEADERS pNT = (PIMAGE_NT_HEADERS)((char*)pDOS + pDOS->e_lfanew);
assert(pNT->Signature == IMAGE_NT_SIGNATURE);

// Get the link time.
FILETIME ft;
static const __int64 t1970 = 0x019DB1DED53E8000;
__int64 InNS = (__int64)(pNT->FileHeader.TimeDateStamp) * 10000000;
*(__int64*)&ft = t1970 + InNS;

// Display the date.
FILETIME ftLocal;
if ( !FileTimeToLocalFileTime(&ft, &ftLocal ) )
{
cerr << "'FileTimeToLocalFileTime' FAILED!" << endl;
return;
}
SYSTEMTIME st;
if ( !FileTimeToSystemTime(&ftLocal, &st) )
{
cerr << "'FileTimeToSystemTime' FAILED!" << endl;
return;
}

cout << st.wHour << ":" << st.wMinute << ":" << st.wSecond << " on "
<< st.wDay << "/" << st.wMonth << "/" << st.wYear << endl;
}


Steve
AnswerRe: How to get complie time. Pin
cp987620-Aug-07 22:07
cp987620-Aug-07 22:07 
GeneralRe: How to get complie time. Pin
Stephen Hewitt20-Aug-07 22:11
Stephen Hewitt20-Aug-07 22:11 
GeneralRe: How to get complie time. Pin
cp987620-Aug-07 22:23
cp987620-Aug-07 22:23 
AnswerRe: How to get complie time. Pin
David Crow21-Aug-07 4:09
David Crow21-Aug-07 4:09 
Questionconverting VT_DISPATCH into VT_BSTR or CString Pin
Dhiraj kumar Saini20-Aug-07 20:57
Dhiraj kumar Saini20-Aug-07 20:57 
QuestionUsing NULL to Close the DB connection after Close() Pin
ragavan20-Aug-07 20:43
ragavan20-Aug-07 20:43 
QuestionRe: Using NULL to Close the DB connection after Close() Pin
David Crow21-Aug-07 4:12
David Crow21-Aug-07 4:12 
QuestionCOleDateTime Pin
vicky0000020-Aug-07 20:37
vicky0000020-Aug-07 20:37 
AnswerRe: COleDateTime Pin
Hamid_RT20-Aug-07 21:12
Hamid_RT20-Aug-07 21:12 
GeneralRe: COleDateTime Pin
vicky0000021-Aug-07 0:04
vicky0000021-Aug-07 0:04 
GeneralRe: COleDateTime Pin
Hamid_RT21-Aug-07 2:32
Hamid_RT21-Aug-07 2:32 
GeneralRe: COleDateTime Pin
David Crow21-Aug-07 4:19
David Crow21-Aug-07 4:19 
GeneralRe: COleDateTime Pin
Mark Salsbery23-Aug-07 5:20
Mark Salsbery23-Aug-07 5:20 
GeneralRe: COleDateTime Pin
David Crow23-Aug-07 5:35
David Crow23-Aug-07 5:35 
GeneralRe: COleDateTime Pin
Mark Salsbery23-Aug-07 5:42
Mark Salsbery23-Aug-07 5:42 
GeneralRe: COleDateTime Pin
David Crow23-Aug-07 5:55
David Crow23-Aug-07 5:55 
GeneralRe: COleDateTime Pin
Mark Salsbery23-Aug-07 6:37
Mark Salsbery23-Aug-07 6:37 

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.