Click here to Skip to main content
15,888,521 members
Home / Discussions / C#
   

C#

 
GeneralRe: Trying to design thread safe class Pin
Member 120616002-Nov-15 20:19
Member 120616002-Nov-15 20:19 
GeneralRe: Trying to design thread safe class Pin
Member 1206160031-Oct-15 8:15
Member 1206160031-Oct-15 8:15 
GeneralRe: Trying to design thread safe class Pin
Member 1206160031-Oct-15 1:02
Member 1206160031-Oct-15 1:02 
Questionproblems with windows Ui Pin
Member 1209985029-Oct-15 22:25
Member 1209985029-Oct-15 22:25 
AnswerRe: problems with windows Ui Pin
F-ES Sitecore29-Oct-15 22:43
professionalF-ES Sitecore29-Oct-15 22:43 
AnswerRe: problems with windows Ui Pin
BillWoodruff29-Oct-15 22:48
professionalBillWoodruff29-Oct-15 22:48 
AnswerRe: problems with windows Ui Pin
Dave Kreskowiak30-Oct-15 3:09
mveDave Kreskowiak30-Oct-15 3:09 
QuestionFILETIME implementation in C# Pin
Member 1206160029-Oct-15 21:27
Member 1206160029-Oct-15 21:27 
I have C++ code which has calls like this

C#
1) SystemTimeToFileTime(&st, &m_Time) 

Before above call st is assembled by assigning values to its members manually - but only year, month, day, hour, minutes and seconds are assigned to it.

m_Time is instance variable of type FILETIME.

Afterwards there is a function like that:
C#
2) dppDatetime_t RsDateTime::GetAsPrepaidTime() const
{
    dppDatetime_t dt;// Just a custom structure, this is no problem to create in C#
    SYSTEMTIME st = GetLocalTimeAsSystem();
    dt.Year     = st.wYear;
    dt.Month    = st.wMonth;
    dt.Day      = st.wDay;
    dt.Hour     = st.wHour;
    dt.Minute   = st.wMinute;
    dt.Second   = st.wSecond;
    return dt;
}

GetLocalTimeAsSystem defined as:

C#
3) SYSTEMTIME RsDateTime::GetLocalTimeAsSystem() const
{
    SYSTEMTIME st;

    ::FileTimeToSystemTime(&m_Time, &st);
    return st;
}


I basically need to replicate all this functionality I mentioned in above 1), 2), 3) points in C#. I would really appreciate some help on how to go with this? How to achieve same result in C#?

Can't I implement what is done above using only DateTime structure in C#?

modified 30-Oct-15 4:46am.

AnswerRe: FILETIME implementation in C# Pin
John Torjo29-Oct-15 23:02
professionalJohn Torjo29-Oct-15 23:02 
GeneralRe: FILETIME implementation in C# Pin
Member 1206160030-Oct-15 0:10
Member 1206160030-Oct-15 0:10 
GeneralRe: FILETIME implementation in C# Pin
John Torjo30-Oct-15 0:46
professionalJohn Torjo30-Oct-15 0:46 
AnswerRe: FILETIME implementation in C# Pin
Richard MacCutchan29-Oct-15 23:06
mveRichard MacCutchan29-Oct-15 23:06 
GeneralRe: FILETIME implementation in C# Pin
Member 1206160030-Oct-15 0:09
Member 1206160030-Oct-15 0:09 
GeneralRe: FILETIME implementation in C# Pin
Richard MacCutchan30-Oct-15 1:05
mveRichard MacCutchan30-Oct-15 1:05 
QuestionVS_FIXEDFILEINFO implementation in C# Pin
Member 1206160028-Oct-15 23:51
Member 1206160028-Oct-15 23:51 
AnswerRe: VS_FIXEDFILEINFO implementation in C# Pin
Richard MacCutchan29-Oct-15 0:06
mveRichard MacCutchan29-Oct-15 0:06 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 1:00
Member 1206160029-Oct-15 1:00 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Richard MacCutchan29-Oct-15 1:04
mveRichard MacCutchan29-Oct-15 1:04 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 1:08
Member 1206160029-Oct-15 1:08 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Richard MacCutchan29-Oct-15 5:16
mveRichard MacCutchan29-Oct-15 5:16 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 5:19
Member 1206160029-Oct-15 5:19 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Richard MacCutchan29-Oct-15 5:39
mveRichard MacCutchan29-Oct-15 5:39 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 3:05
Member 1206160029-Oct-15 3:05 
AnswerRe: VS_FIXEDFILEINFO implementation in C# Pin
OriginalGriff29-Oct-15 0:11
mveOriginalGriff29-Oct-15 0:11 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 0:59
Member 1206160029-Oct-15 0:59 

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.