----------------------------------------------------------- New Message on MumbaiUserGroup
----------------------------------------------------------- From: Rohit_BD Message 1 in Discussion Hello all, I have been trying to write an audio-based program using C# and DirectX 8.0. Now I am able to reference DirectX8 libraries and instantiate the DirectSound8, DirectSoundBuffer8 objects for the same without problems. Now, the DirectSoundBuffer8 object has a method called Play(), which takes as one of it's parameters a variable of type System.IntPtr. In C++, this particular parameter is actually the address of an array (or a pointer to a block of memory) containing the audio data, and the datatype is void *. My problem is that none of the .Net data structures like arrays or arrylists can be typecast to type IntPtr. In C#, IntPtr denotes a number, whereas in C++ it denotes an address. Even IntPtr constructor takes a parameter of type void *, but trying to take the address of any .net array by using the "&" operator results in compiler error. I tried using the "fixed" keyword, but this simply assigns a int number to the IntPtr variable instead of the actual address. How can I make the IntPtr parameter hold the address of an array other than a plain number? Any help will be greately appreciated. Thanks, Rohit. ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
