# GetFileTime

int GetFileTime (char fileName[], int *hours, int *minutes, int *seconds);

## Purpose

Gets the time that the file was last modified.

| Note Windows SDK also contains a GetFileTime function. If you include windows.h and do not include utility.h, you will receive compile errors if you call the GetFileTime function.

### Example

/* Get the time of WAVEFORM.DAT. */
int hours, minutes, seconds;
GetFileTime ("WAVEFORM.DAT", &hours, &minutes, &seconds);

## Parameters

Input
Name | Type | Description
fileName | string | The pathname of the file for which to get the time. If you specify an empty string "", GetFileTime gets the time of the file found by the most recent call to GetFirstFile or GetNextFile.
Output
Name | Type | Description
hours | integer | The hours component of the time. Values: 0 to 23
minutes | integer | The minutes component of the time. Values: 0 to 59
seconds | integer | The seconds component of the time. Odd values are rounded down. Values: 0 to 59

## Return Value

Name | Type | Description
result | integer | The result of the call.
Code | Description
0 | Success.
-1 | File not found or directory in path not found.
-3 | General I/O error occurred.
-4 | Insufficient memory to complete the operation.
-5 | Invalid path; for example, c:filename.
-6 | Access denied.