>Hi There,
>
>I am wondering if there is a way to getting server info from VFP functions or WIN32API calls? And Where can I get more information on how to get registry info thru VFP? Any links, books, magazine article examples will be great. Thanks in Advance.
There are files here on UT that implement registry access through the Win32 API; you can download them from the File Section. VFP 6 has a Registry class as a part of the FFC as well.
There are several ActiveX controls that make access to the registry fairly easy. The Windows Scripting Host (a part of Win98 and Win2K, and that can be added to any of the Win32 operating systems via a self-installing executable downloadable from
http://msdn.microsoft.com/scripting) has an OLE Automation object, Wscript.Shell, which exposes several methods for reading and writing the registry. There have been several articles on the Windows Scripting Host in various Fox-related publications within the past 6 months.
What do you mean when you say 'getting server information'? There are Win32 APIs for accessing all sorts of information; VFP6 has a number of new internal functions to access information about shares, network printer resources and the like. Virtually all of the Win32 API calls for network access can be reached by VFP through the DECLARE...DLL syntax, although you'll need some tools like Paul tatavu's Pointers class or my CLSHEAP class to manage some structures that require embedded pointers and static memory allocations.
Again, there are OLE Automation objects available to simplify accessing network functionality. Specifically, Wscript.Network, another part of the Windows Scripting Host, and ADSI, which exposes Microsoft's Active Directory Services, can access a great deal of information about network environments. Microsoft has very extensive documentation on ADSI (unfortunately, none of it is VFP-centric; there are solid examples of how to use ADSI for VC++, VB and VBScript on Microsoft's Web pages, and the VB/VBScript stuff is relatively easy to transpose into VFP. Rick Strahl's Web page has some VFP-specific examples of accessing ADSI functionality in VFP.