IntrafoundationNetworkDiscovery C++ COM Object
C++ Objective-C C
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
networkdiscoverycom
test_harness
.gitattributes
.gitignore
ReadMe.txt
global.asa
install.bat
post_build.bat
post_build64.bat
readme.md
reset.bat
resetmx.bat
uninstall.bat

readme.md

<title>Intrafoundation.NetworkDiscovery.1 COM v1.3</title>
C++ ATL COM Component
FOR ASP and ColdFusion
Open Source 64 and 32-bit C++ COM Object

v1.3, August 30th 2012
http://www.intrafoundation.com
webmaster@intrafoundation.com

NOTICE: This software is now 64-bit. If you need 32-bit builds, they are located in the 32bit_versions\ folder.
NEW: Follow the open source development of this software at lasellers @ github.com or lasellers @ codeplex.com.

The COM object NetworkDiscovery was designed to be used in conjunction with UDPClient and/or TCPClient. It is a network discovery tool, which, among other things, can tell you the name of all computers currently on your local area network. (Before you can query other computers on a network, your first step is generally determine which computers are there -- their name and IP addresses.)

A COM object (for those of you who are using this software who are not web developers but hardcore gamers) is a type of .DLL. This particular type is the kind that makes up most of the code that powers the Windows Operating System itself. They are essentially self-contained ("encapulated, object-oriented" in tech-speak) programs. Many of the applications you may use (the .EXE files) will make use of COM objects that it brings with it or that are included with the Windows Operating System.




REQUIREMENTS / SERVER PLATFORMS

This COM object was originally designed on and for Windows 2000 Professional and Windows XP Professional. The 2012 version and up was rebuilt on Windows 7 64-bit. It has not been tested under Windows 95, 98, ME or NT 3.51/4. Nevertheless, it may work under some of them.

Additionally you most typically will need either Adobe ColdFusion or Microsoft ASP installed. If you don't know what either of these are... then you're going to need to make friends with a geeky web developer somewhere to help you.

You should be able to use the COM from:

  • Adobe ColdFusion
  • Microsoft ASP
  • PHP4
  • Any other engine or compiler that can use COM objects.




COPYRIGHT / TERMS OF USE

This software is Copyright (c) 2004 by Lewis A. Sellers. It is not public domain, nor is it GPL'ed, but it is very close. As long as you do not modify any files in the archive, nor add to them, nor delete any of them, and do not charge for access to said archive you may redistribute the archive as you like.

You may use this software as-is with any software you wish, so long as said archive is included unmodified with proper credits and link to it's homesite is included also (http://www.intrafoundation.com/software/networkdiscovery.htm).

You may modify and use the source code as you like -- with the understanding that if you do, you still have to include the original, unaltered archive as well as the aforementioned credits and link.

You may use this software in commerical applications, whether closed-source or open-source so long as the aforementioned unaltered archive is included with the application and the aforementioned creditation and hyperlink are included.

If this software is used in a released project or included in a publication you are to make reasonable efforts to contact the author and notify them as to such. The author of this software has a primary email address of: webmaster@intrafoundation.com.

You use this software at your own risk.




INSTALLATION

The COM object itself is the file called NetworkDiscoverycom.dll. To install it, at the command prompt type: regsvr32 NetworkDiscoverycom.dll. You may first wish to copy it to your project folder or some other folder you make just for it.

The precompiled file NetworkDiscoverycom.dll is root folder of the archive.

There are install.bat and uninstall.bat files included that you can simply click from Windows which will do the same.




UNINSTALLATION

At the command prompt type: regsvr32 /u NetworkDiscoverycom.dll. Or see above.




THE EXAMPLE SCRIPTS

There are several example scripts included with this COM object. Some are only partially done. None are optimised for the protocols they use. Addtionally, some are written by the author(s) of this software, whlie others have been developed by it's users.

For most of the examples you'll need to have the appropriate SERVER software installed on your local computer (i.e., either ASP or ColdFusion).

You might want to look at the source of the scripts before you use them.


Send in your own sample scripts.




COMMAND OVERVIEW : MAKING IT WORK

Well, assuming you installed/registered the COM object and on the same machine you've got ColdFusion or ASP installed then all you need to do is... open your browser to this web page and click on any of the examples to see it in living action. (On the server... not as a file. That is with "HTTP://" prepended not "FILE://". But I really hope you knew that already.)

Assuming you've seen the examples and are now suitably excited about bringing this kind of thing to your own web pages -- read on.

Basically all there is to using this COM object is call the function your interested in and parse the results.

There are several other useful properties you can look at or set that can be used for error handling and tweaking overall performance.




METHODS

METHODS
NAMEINOUT
Computerstring
ComputerIPstring
NetworkComputerscomma separated value string
NetworkComputersIPcomma separated value string
ClearLog

Computer

parameters
returnsstring

This function returns the ASCII network name of the local computer. Examples would be "HORACE", "JEDI", etc.

ComputerIP

parameters
returnsstring

This function returns the network ip of the local computer. Examples would be "127.0.0.1", "192.168.0.1", etc.

NetworkComputers

parameters
returnscomma separated string of computer names

This function does a NetBIOS query of the local network and returns a list of all computers which respond. Generally this means that it returns a list of every computer currently on the same hub, switch, router, etc as yours. The return is a comma separated list.

Extremely useful in gaming situations, etc where you which to auto-detect all computers as they plug into the network etc.

Returns the ASCII name of the computers. An examples would be "HORACE,JEDI,JOHNC,MARINE", etc.

NetworkComputersIP

parameters
returnscomma separated string of computer ips

This function does a NetBIOS query of the local network and returns a list of all computers which respond. Generally this means that it returns a list of every computer currently on the same hub, switch, router, etc as yours. The return is a comma separated list.

Extremely useful in gaming situations, etc where you which to auto-detect all computers as they plug into the network etc.

The list of all computer IPs is returned. An example would be "192.168.0.1,192.168.0.2,192.168.0.32,192.168.0.212", etc.

ClearLog

parameters
returns

Clears out the error log.




PROPERTIES

All properties are optional. They can be extremely useful for optimizing the performance of your code however, particular where high-performance, highly-responsive operation is required.

PUT

PROPERTIES (PUT)

GET

PROPERTIES (GET)
threadnumber
versionstring
copyrightstring
descriptionstring
instancenumber
instancesnumber
Logstring

description

parameters
returnsstring

Description of this COM object.

copyright

parameters
returnsstring

The copyright notice.

version

returnsstring
parameters

The current version number.

Log

returnsstring
parameters

Gets list of all error messages logged since the object was created. Clear out the error log with the ClearLog method.

instance

parameters
returnsnumber

If you code calls several instances of this COM into existance at once you can determine which instance you are talking to by calling this.

This is an integer number, where the default first instance is always numbered "1".

instances

parameters
returnsnumber

See "instance". Calling this returns the number of instances of this COM object that have been called into existance since your server has been rebooted.

Note: When using this COM in desktop software the instance number will reset itself when the software is closed and restarted. When used in sever-side software, as long as the COM stays loaded in memory, then every time the COM is called the instances number will increase by one.

Instances/Instance are mainly of use with debugging/optimizing the COM instantation process.

This is an integer number, where the default first instance is always numbered "1".




VERSION HISTORY

  • 1.3 August 30th 2012.

    Compile for 64-bit support in addition to 32-bit.

    For unknown reasons the separate classes\ folder with common code between this a few other projects was not bundled in the last uploaded version of this app. Thus, I have had to pull it from other sources. The various files were slightly out of temporal sync, thus I've had to rebuild the project more from scratch than anticipated.

    The 1.3 version pulls some of its sources from a partial port to Macintosh OS X I did years ago but never released.

    From now on, each project keeps it's own separate copy of any shared files. Especially important given that it is going to be released on github and codeplex.

    This version should be considered possibly unstable as it has not been extensively retested.

    TO DO: Make C# COM interop .NET DLL or perhaps pinvoke a c wrapped version. Not interested in using C++/CLI.

  • 1.2 November 5th 2004.

    Updated the C++ classes it shares with several other projects, so recompiled. Cleaned up for the relaunch of the Intrafoundation web site.

  • 1.1 August 25th 2004.

    Changed name from NetworkTopology to NetworkDiscovery so as not to clash with old naming scheme of IHS/IHTK. Also did a small amount of preventative debugging work while I was at it.

  • 1.00 July 6th 2004.

    This was part of unreleased versions of udpclient and tcpclient for a while.

    As you might have guessed (or hoped) as time permits this COM object with gather several new, powerful functions which will generate fairly detailed network topology maps -- or at least that's the ultimate purpose.



Intrafoundation Software
Making Atomic Warfare Fun Again