well, since I don't know how to do it via API - you may consider looking directly in the registry. This means you will have to know where to look for each windows version. In Win2K, I have found the following two keys:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\{3D8B8D97-AE67-4522-AF6C-F2CF52B8243A}\Parameters\Tcpip\
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\{3D8B8D97-AE67-4522-AF6C-F2CF52B8243A}\Parameters\Tcpip

Each time the value was stored in "EnableDHCP", which is a dword value set to 0 for false, and 1 for true. I trust you know how to use the registry API?
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net