Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Where is GetTickCount64()? Pin
Randor 11-Oct-17 11:52
professional Randor 11-Oct-17 11:52 
GeneralRe: Where is GetTickCount64()? Pin
inlandchris11-Oct-17 17:24
inlandchris11-Oct-17 17:24 
GeneralRe: Where is GetTickCount64()? Pin
Randor 11-Oct-17 19:26
professional Randor 11-Oct-17 19:26 
AnswerRe: Where is GetTickCount64()? Pin
leon de boer11-Oct-17 15:29
leon de boer11-Oct-17 15:29 
GeneralRe: Where is GetTickCount64()? Pin
inlandchris11-Oct-17 17:27
inlandchris11-Oct-17 17:27 
GeneralRe: Where is GetTickCount64()? Pin
Richard MacCutchan11-Oct-17 21:23
mveRichard MacCutchan11-Oct-17 21:23 
AnswerRe: Where is GetTickCount64()? Pin
inlandchris12-Oct-17 2:09
inlandchris12-Oct-17 2:09 
GeneralRe: Where is GetTickCount64()? Pin
leon de boer11-Oct-17 22:14
leon de boer11-Oct-17 22:14 
I am on VS2017 and the only code required is

C++
#define _WIN32_WINNT 0x0600
#include <WinBase.h>
void test(void) 
{
	long long i = GetTickCount64();
}

You also have me slight bemused you keep talking about finding the code, which is impossible it is buried in the kernel32.dll all you will find is the header file.

Here let me dynamically link it for you .. that is where the code is end of story. If it doesn't work your O/S is earlier than Vista.
#include "tchar.h"				// Unicode support
typedef long long (*tickproc64) (void);
tickproc64 myTick;

long long test(void) 
{
	long long i = 0;
	BOOL freeResult, runTimeLinkSuccess = FALSE;
	HMODULE dllHandle = NULL;

	//Load the dll and keep the handle to it
	dllHandle = LoadLibrary(_T("C:\\Windows\\System32\\kernel32.dll"));

	// If the handle is valid, try to get the function address. 
	if (NULL != dllHandle)
	{
		//Get pointer to our function using GetProcAddress:
		myTick = (tickproc64)GetProcAddress(dllHandle,	"GetTickCount64");  // Name must be ascii

		// If the function address is valid, call the function. 
		if (runTimeLinkSuccess = (NULL != myTick))
		{
			i = myTick();
		}

		//Free the library:
		freeResult = FreeLibrary(dllHandle);
	}

	return (i);
}

In vino veritas


modified 12-Oct-17 4:49am.

AnswerRe: Where is GetTickCount64()? Pin
inlandchris12-Oct-17 2:14
inlandchris12-Oct-17 2:14 
GeneralRe: Where is GetTickCount64()? Pin
inlandchris18-Oct-17 8:25
inlandchris18-Oct-17 8:25 
GeneralRe: Where is GetTickCount64()? Pin
leon de boer18-Oct-17 9:09
leon de boer18-Oct-17 9:09 
AnswerRe: Where is GetTickCount64()? Pin
«_Superman_»11-Oct-17 19:03
professional«_Superman_»11-Oct-17 19:03 
GeneralRe: Where is GetTickCount64()? Pin
inlandchris12-Oct-17 2:40
inlandchris12-Oct-17 2:40 
QuestionVST programing Pin
Haiou10-Oct-17 18:44
Haiou10-Oct-17 18:44 
AnswerRe: VST programing Pin
Richard MacCutchan10-Oct-17 21:00
mveRichard MacCutchan10-Oct-17 21:00 
QuestionGenetic Prorgaming Pin
bluatigro9-Oct-17 2:19
bluatigro9-Oct-17 2:19 
AnswerRe: Genetic Prorgaming Pin
David Crow9-Oct-17 2:39
David Crow9-Oct-17 2:39 
QuestionWhile loop not working on C. Pin
Tarun Jha8-Oct-17 0:23
Tarun Jha8-Oct-17 0:23 
AnswerRe: While loop not working on C. Pin
Richard MacCutchan8-Oct-17 1:45
mveRichard MacCutchan8-Oct-17 1:45 
GeneralRe: While loop not working on C. Pin
Tarun Jha8-Oct-17 3:36
Tarun Jha8-Oct-17 3:36 
GeneralRe: While loop not working on C. Pin
Richard MacCutchan8-Oct-17 6:15
mveRichard MacCutchan8-Oct-17 6:15 
GeneralRe: While loop not working on C. Pin
Tarun Jha8-Oct-17 6:24
Tarun Jha8-Oct-17 6:24 
GeneralRe: While loop not working on C. Pin
geodoom12-Oct-17 12:12
geodoom12-Oct-17 12:12 
GeneralRe: While loop not working on C. Pin
Tarun Jha13-Oct-17 5:40
Tarun Jha13-Oct-17 5:40 
AnswerRe: While loop not working on C. Pin
«_Superman_»8-Oct-17 17:59
professional«_Superman_»8-Oct-17 17: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.