English 中文(简体)
• 如何利用VC进入GMT时间
原标题:How to access GMT time using VC

In my project i am using GetLocalTime() and GetSystemTime and set the current time into registry. But my problem is when i am changing the time of my machine the changed time only saving to registry. Is there any chance to access the GMT time so that its independent of machine and nobody can change the time..

请提供一些帮助。

问题回答

• 如何利用VC进入GMT时间

// you mentioned it
#include <Windows.h>
SYSTEMTIME gmtTime;
ZeroMemory(&gmtTime,sizeof(gmtTime));
GetSystemTime(&gmtTime);

这项职能使用你的机器硬件时间。 如果你需要独立于你的机器的时间,那么你可能希望使用NTP或SNTP。





相关问题
how to reliable capture display setting changed

static void Main() { // Set the SystemEvents class to receive event notification when a user // when display settings change. SystemEvents.DisplaySettingsChanged += new ...

Why use CComBSTR instead of just passing a WCHAR*?

I m new to COM. What exactly is the advantage of replacing: L"String" with CComBSTR(L"String") I can see a changelist in the COM part of my .NET application where all strings are replaced in this ...

COM Basic links

folks can you provide me the tutorial link or .pdf for learning basic COM?. i do google it.. still i recommend answers of stackoverflow so please pass me.. Thanks

Statically linking Winsock?

I m using Winsock 1.1 in my project. I include wsock32.lib in "Additional Dependencies". I m looking at the DLL project using depends.exe and notice that the DLL depends on wsock32.dll. How can I ...

热门标签