Tonec.com Bringing Internet Technology Innovations to Market since 1991
  News Products Outsourcing About Us Contact Us
descriptiondescription downloaddownload
  Tonec Homepage
ProductsT1C Soundmanual

T1C Sound T1CSound

To create the component you should:

  1. Open MS Visual C++
  2. Choose File - > New
  3. Select ATL COM AppWizard in Projects tab



  4. Type the name, i.e Tonec1. Click OK button.
  5. On the next screen, click Finish button.



  6. Add new ATL object. Insert -> New ATL Object



  7. Choose Objects in Category list, and select Simple Objects icon



  8. Type the component name. LongBeep for example



  9. Add new method to the newly created object. Right click on Ibeep item and select Add Method in pop-up menu.



  10. Choose the type of input parameters for the component. Method name: BeepSound. Parameters: [in] long Frequency, [in] long Duration



  11. Add the following line of code to ClongBeep.cpp file.

  12.    STDMETHODIMP CLongBeep::BeepSound(long Frequency, long Duration)
       {
           BOOL b1;
           b1= Beep(Frequency, Duration);

           return S_OK;
       }


  13. Compile the project (preferably with MinDependency option).
  14. Register the component:regsvr32 Tonec1.dll. (It's necessary even if you use the compiled component from the zip file below)

Example of calling BeepSound from example.vbs or example.asp:


Dim objBeep
  Set objBeep = CreateObject("TONEC1.LongBeep")
objBeep.BeepSound 1000,3000
Set objBeep = Nothing


  TonecPrivacy Policy
  © 1999-2005. Tonec, Inc. All rights reserved.