I was just wondering what functions/API's I should be looking at to a) retrieve the current time on the systems clock (preferably in an integer) and b) what functions and such are used to interact with the COM ports on a windows machine.

any help appreciated.