Results for "Author: sparq"
Networked drives. They're an administrative nightmare. In fact, the average user changes his networked drive letters more often than his underwear. But you can solve this problem of binding an application to a particular drive by using a Universal Naming Convention (UNC) path. This still references a network area, but doesn’t tie it to any one drive letter. And you can retrieve and check the UNC of a particular path in code using this neat little function. To use it, simply call GetUNCPath, passing it your drive letter along with a pre-declared empty string. If a problem occurs, the relevant number is passed back with the function. These can be matched with the possible return code constants. However if everything goes swimmingly, the function returns a zero (a constant value of NO_ERROR) and places the UNC path into the ByRef-passed variable. This code works by making a call to the WNetGetConnection function in MPR.DLL. It's essentially a neat wrapper for a regular API call.
Access all different aspects of your control panel (Add/Remove Programs, Mouse Control, etc..).
This code will enable you to take two dates, find the total seconds in between them, and calculate the Hours, Minutes, and Seconds.
This code allows you to input two zip codes, and find out the Distance (In Miles, Kilometers, and Nautical Miles). The Access Database was aqcuired on this site some time ago.. so thank you to whoever it was that posted it. :) Feedback is appreciated.. and Vote if you like it.