C ++ Example Code

Overview


  • A very basic C++ code sample that will show how to send a fax to the Multitech Fax Finder device using Web Service API.

Prerequisites


Note:

  • The schedule.xml is located under /FaxFinderCplus folder.

Modify schedule.xml


Load the schedule.xml file into your favorite editor, find the section below, and modify the fax number to point to your recipient fax number:


<recipient>
...
<fax_number>5138</fax_number>
</recipient>

Save it.

Modify FaxFinderCplus.cpp


Double Clicks on the FaxFinderCplus.sln to load it into the C++ IDE. Modify the following:

Change the user name and password to match yours.

NetworkCredential ^ myCredential = gcnew NetworkCredential("admin","admin");

Change the IP address to point to your Fax Finder’s IP address.

WebRequest ^ myRequest = WebRequest::Create("http://216.133.69.247
/ffws/v1/ofax");

Change the file path to match yours.

ifstream textIn("D:\\Users\\windows7-32bit\\Documents\\Visual Studio\\2008\\Projects\\FaxFinderCplus\\FaxFinderCplus\\schedule.xml");

Save and Run it.

Now, if you web into your FaxFinder device and go to Status & Log -> Fax Status, you should be able to see the Fax Finder is sending out a fax.