BCB Components rotating around DirectX

Welcome to BCB-Tools.com Latest News

Development Tools Demo Applications Step-By-Step Tutorials Component Reference

Register Here Available Downloads

Frequently Asked Questions Discussion Forums Receive emails from BCB-Tools.com Send us some Feedback

Links to other sites Information about the BCB-Tools.com website


    FORUM MESSAGE
    Go to the Welcome Page
        FORUM MESSAGE

    You are reading a General forum message.

    Runtime error when using Dx_SoundNotify on bcb6

    Author: Omar Zelaya

    Date Posted: 2004-07-07 00:59:09



    Hi,

    i have the following code:

    void __fastcall TRemoteView::Dx_SoundBuffer1Create(TObject *Sender)
    { int percent = DSBufferDesc1->BufferBytes/4;

      DSBPositionNotify1->ArraySize = 4;
      DSBPositionNotify1->Offset[0] = 0;
      DSBPositionNotify1->Offset[1] = percent;
      DSBPositionNotify1->Offset[2] = percent*2;
      DSBPositionNotify1->Offset[3] = DSBPN_OFFSETSTOP;

      if (Dx_SoundNotify1->Create( Dx_SoundBuffer1 ))
        if (Dx_SoundNotify1->SetNotificationPositions( DSBPositionNotify1->ArraySize,
                                                       DSBPositionNotify1 ))
         {
          /// created ok
         }
    }
    on the close event of the form i have the following code:l

    if (Dx_SoundBuffer1->Created)
                Dx_SoundBuffer1->Destroy();
             if (Dx_Sound1->Created)
                Dx_Sound1->Destroy();
    but i get a access violation when i close the form and the debugger stop at the following line
    void __fastcall TDx_SoundNotify_ThreadClass::RebuildHandles()
    ....
    for (int i=0;i<TDx_SoundNotify_ComponentList->Count;i++) // here

    if i comment the creation of the notify component, i have no access violation no more.

    what am i doing wrong.

    Thanks




    REPLY TO THIS MESSAGE?
    Top    

    You can post a reply to this General message using the form below:
    Your Name:


    Message Subject:


    Message Body:


    Verification:





    When ready, click on the submit button below:






Top

Welcome |  Latest News |  Tools |  Demos |  Tutorials |  Reference |  Register |  Downloads
FAQ |  Forums |  Feedback |  Mailing List |  Links |  Site Information

This page is Copyright © 2007 Darren John Dwyer, Australia. All Rights Reserved.
Borland C++ Builder, CBuilder, etc are Trademarks of Borland Corporation.
DirectX, DirectDraw, Windows, etc are Trademarks of Microsoft Corporation.