PWM Buzzer

Waldemar
Hallo,
there is no english (google translated) forgiveness

I want to control Mini2440 buzzer pwm, now, the whole works but I do not
like wiess freuquenz set


// ------------------------------------   Buzzer  
  // Open PWM Device
            hPort = CreateFile( _T("PWM1:"), GENERIC_READ | GENERIC_WRITE,
0, NULL, OPEN_EXISTING, 0, 0);

      // hFile = CreateFile(TEXT("PIO1:"), GENERIC_READ | GENERIC_WRITE, 0,
NULL, OPEN_EXISTING, 0, 0); 

            if (hPort == INVALID_HANDLE_VALUE)
            {
                MessageBox(_T("Open PWM1 Driver Fail"));
            }



// --------------------------------- Beep On
BYTE pinnum = 10;


  // Constant from PWM Driver
        const UINT PWM_STOP    = 1;
        const UINT PWM_SET_FEQ  = 2;
        const UINT PWM_SET_DUTY = 3;
        const UINT PWM2_STOP  = 4;
        const UINT PWM2_SET_FEQ = 5;
        const UINT PWM2_SET_DUTY = 6;

    UINT sInput = 0;

        
                // Set Duty[0-99] to PWM Device
                DeviceIoControl(hPort, PWM_SET_DUTY, &pinnum, 4, NULL, 0,
0, 0);


                // Set Freq to PWM Device
                DeviceIoControl(hPort, PWM_SET_FEQ, &pinnum, 4, NULL, 0, 0,
0);


const UINT PWM_STOP = 1;
  
  // Stop PWM Device
     DeviceIoControl(hPort, PWM_STOP, NULL, 0, NULL, 0, 0, 0);