Software Archive
Read-only legacy content
17060 Discussions

System interfaces and integer(8)

james1
Beginner
816 Views
Are there any plans to take advantage of integer(8) in the interface definitions? This would lead to a more normal interaction with a number of services, rather than using types based on the assumption that integer(4) is the largest integer data type.

James
0 Kudos
4 Replies
Steven_L_Intel1
Employee
816 Views
Which services did you have in mind?

Steve
0 Kudos
james1
Beginner
816 Views
Basically any structure or call interface in DFWINTY and KERNEL32 that reference type (T_LARGE_INTEGER) and (T_LARGE_INTEGERX). A typical example is GetDiskFreeSpaceEx which requires 8 byte integers. Of course one can always re-define the interface or equivalence one type to another, however it would certainly be cleaner and more "natural" to simply deal with the integers now that we have eight byte integers implemented.

James
0 Kudos
james1
Beginner
816 Views
Wondered if there was an answer to this one yet? Thanks.

James
0 Kudos
james1
Beginner
816 Views
Here is another example. I have some code that does some time arithmetic with the integer(8) time representation. Routines such as GetSystemTimeAsFileTime and SetWaitableTimer are used. In each case a different "type" is needed, so I end up have equivalence statements such as:


 
integer(DWORDLONG) binary_time 
type (T_FILETIME) binary_time_filetime 
type (T_LARGE_INTEGER) binary_time_large 
equivalence (binary_time, binary_time_filetime, binary_time_large) 


And using the appropriate variable name for each case, which make the code harder to follow for the next guy. I'd rather have the ability to cast in this case, it would actually be more readable, IMHO.


James

0 Kudos
Reply