How to compile example code for IOCTL_DISK_FLUSH_CACHE?

I am seeing some evidence that my T20 is resetting before pending writes to the flash disk have been flushed from the cache. The example code here looks promising:
https://developer.toradex.com/knowledge-base/ioctl_disk_flush_cache

But I can’t get it to compile as I am missing some macro definitions. Can you tell me which header files I should include in order to be able to use that code?

Dear @MikeS,

Could you refer below sample code for missing defines?

#include <windows.h>
#include <storemgr.h>

#define FILE_DEVICE_DISK            0x00000007
#define METHOD_BUFFERED             0
#define FILE_ANY_ACCESS             0

#define CTL_CODE( DeviceType, Function, Method, Access ) (((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))


#define IOCTL_DISK_BASE FILE_DEVICE_DISK
#define IOCTL_DISK_FLUSH_CACHE \
	CTL_CODE(IOCTL_DISK_BASE, 0x715, METHOD_BUFFERED, FILE_ANY_ACCESS)

int _tmain(int argc, _TCHAR* argv[])
{
	DWORD forceFlush=-1;
	HANDLE hStore = INVALID_HANDLE_VALUE;
	DWORD res=0;
	DWORD ret = 0;
	
	
	hStore = OpenStore(L"DSK2:");
	SetLastError(0);
	//ret = DeviceIoControl(hStore, IOCTL_DISK_FLUSH_CACHE, &forceFlush, sizeof(forceFlush), &res, sizeof(res), NULL, NULL);
	ret = DeviceIoControl(hStore, IOCTL_DISK_FLUSH_CACHE, NULL, 0, NULL, 0, NULL, NULL);
	printf("GetLastError 0x%X ret = %d", GetLastError(), ret);
	CloseHandle(hStore);

	return 0;
}

Thanks @raja.tx, that’s what I needed! It compiles now, and it appears to work too.