谁能给一个关于对麦克风编程的例子,

解决方案 »

  1.   

    phoneOpenThe phoneOpen function opens the specified phone device. A phone device can be opened using either owner privilege or monitor privilege. An application that opens the phone with owner privilege can control the phone's lamps, display, ringer, and hookswitch or hookswitches. An application that opens the phone device with monitor privilege is notified only about events that occur at the phone, such as hookswitch changes or button presses.Ownership of a phone device is exclusive. In other words, only one application can have a phone device opened with owner privilege at a time. The phone device can, however, be opened multiple times with monitor privilege.
    LONG WINAPI phoneOpen(
      HPHONEAPP hPhoneApp,
      DWORD dwDeviceID,
      LPHPHONE lphPhone,
      DWORD dwAPIVersion,
      DWORD dwExtVersion,
      DWORD_PTR dwCallbackInstance,
      DWORD dwPrivilege
    );Parameters
    hPhoneApp 
    Handle to the application's registration with TAPI. 
    dwDeviceID 
    Identifier of the phone device to be opened. 
    lphPhone 
    Pointer to an HPHONE handle that identifies the open phone device. Use this handle to identify the device when invoking other phone control functions. 
    dwAPIVersion 
    API version number under which the application and Telephony API have agreed to operate. This number is obtained from phoneNegotiateAPIVersion. 
    dwExtVersion 
    Extension version number under which the application and the service provider agree to operate. This number is zero if the application does not use any extensions. This number is obtained from phoneNegotiateExtVersion. 
    dwCallbackInstance 
    User instance data passed back to the application with each message. This parameter is not interpreted by the Telephony API. 
    dwPrivilege 
    Privilege requested. This parameter uses one and only one of the PHONEPRIVILEGE_ Constants. 
    Return Values
    Returns zero if the request succeeds or a negative error number if an error occurs. Possible return values are:PHONEERR_ALLOCATED, PHONEERR_NODRIVER, PHONEERR_BADDEVICEID, PHONEERR_NOMEM, PHONEERR_INCOMPATIBLEAPIVERSION, PHONEERR_OPERATIONFAILED, PHONEERR_INCOMPATIBLEEXTVERSION, PHONEERR_OPERATIONUNAVAIL, PHONEERR_INVALAPPHANDLE, PHONEERR_RESOURCEUNAVAIL, PHONEERR_INVALPOINTER, PHONEERR_UNINITIALIZED, PHONEERR_INVALPRIVILEGE, PHONEERR_REINIT, PHONEERR_INUSE, PHONEERR_NODEVICE, PHONEERR_INIFILECORRUPT.
      

  2.   

    很简就是录音。我想的。你查查wav录音即可。