|
Hi
I have a project which uses DirectSound. I use C#.NET and VS 2005 under Windows XP(x86). Everything is OK, but when I tried the exe file under Windows Vista(x86), it crashed during initialization. I installed VS 2005 + SP1 + Patch for Vista to debug the project, but since that I have not had any problems with my project. It starts, plays sounds and everything is fine now.
So, my question is: where is the problem under Vista? I can't tell other people to install VS to use my application. There might be a patch or something like that but I can't find such a solution. So, help me to solve this problem, please!
Best Regards
|
|
|
|
|
I've never had any problems with DirectSound on Vista.
You really need to debug on Vista to drill down to the problem...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Likewise - my job is developing audio software, and I'm currently working happily on Vista. (Well, I say happily, but it is Vista... )
Are you (OP) trying to run the .exe you build on the XP machine on a Vista box? I'm not sure if that will work, or if you'll have to build a Vista version.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
FWIW....
The OS the binaries are built on makes no difference.
The binaries should run fine on Vista unless the OP specifically used
something only supported on XP, in which case (s)he's not doing proper
error/exception handling (which is probably the case anyway, unless it's
just a case of the required .NET framework not being installed )
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: unless it's
just a case of the required .NET framework not being installed
Aside from the fact that your post broke the CP SPCTL (Single Post Critical Thinking Limit) somewhere in the second sentence...
Maybe the power cord isn't plugged in. 
|
|
|
|
|
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: The OS the binaries are built on makes no difference.
Yeah, I kind of sort of vaguely kind of knew that. Binaries aren't really binaries these days anyway.
We're developing mostly on Vista, but we'll be deploying on XP and Mono (and no doubt Win 7 as well). I tend not to worry about all that sort of strategic stuff though, and just get on with my bit of it.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
molesworth wrote: Binaries aren't really binaries these days anyway.
Heh - maybe I should have put "binaries" in quotes
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
you say that the application crashed on launch? Silly question, but was the correct .Net Framework already installed on the vista machine? or what about the DircetSound libraries?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi, guys
I solved my problem. It all was my mistake... The problem was just an exception thrown by CaptureBuffer constructor because the current machine hadn't got a microphone plugged in.
Thank you for your replies!
Bye
|
|
|
|
|
I have a custom type, FooNode, defined in my C# code. I want to add an instance of that custom type to the global System.Windows.Forms.Clipboard, and then retrieve it from the clipboard again. The add seems to work, but I am not able to retrieve the instance. Upon retrieval, several exceptions print to standard output like the following:
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in System.Windows.Forms.dll
(... and 9 more just like above)
The result of the retrieval is a null reference. There is no crash or halt. The above exceptions are being dealt with internally; I am not able to catch them. The problem is not with the DataObject itself, because I can retrieve my FooNode from it. I just can't retreive my FooNode from the clipboard's DataObject.
I am able to add and then retreive other types of objects to the system clipboard, such as strings and System.Guid. Why can I not retrieve an object of my custom type?
Following is my test code. Call FooTest.Test() to run.
using System;
using System.Diagnostics;
using System.Windows.Forms;
public class FooNode
{
private Guid m_Guid;
private string m_Name = String.Empty;
public FooNode( )
{
m_Guid = Guid.NewGuid();
m_Name = "Foo";
}
public Guid Guid
{
get { return m_Guid; }
set { m_Guid = value; }
}
public string Name
{
get { return m_Name; }
set { m_Name = value; }
}
}
public class FooTest
{
public static void Test( )
{
FooNode fooNode = new FooNode();
DataObject dob = new DataObject( fooNode );
dob.SetData( typeof( Guid ), fooNode.Guid );
dob.SetData( DataFormats.StringFormat, fooNode.Guid.ToString() );
Clipboard.SetDataObject( dob );
object raw = Clipboard.GetDataObject().GetData( typeof( FooNode ) );
Spam( Clipboard.GetDataObject(), new Type[] { typeof( FooNode ), typeof( Guid ) } );
}
public static void Spam( IDataObject dob, Type[] types )
{
Debug.WriteLine( dob );
Debug.Indent();
Debug.WriteLine( "Data formats:" );
Debug.Indent();
string[] formatNames = dob.GetFormats( true );
foreach ( string name in formatNames )
{
Debug.WriteLine( name );
}
Debug.Unindent();
foreach ( string name in formatNames )
{
if ( dob.GetDataPresent( name ) )
{
Debug.WriteLine( String.Format( "Present as format=\"{0}\"", name ) );
Debug.Indent();
object raw = dob.GetData( name );
Debug.WriteLine( String.Format( "raw={0}", raw != null ? raw : "null" ) );
Debug.Unindent();
}
}
if ( types != null )
{
foreach ( Type type in types )
{
if ( dob.GetDataPresent( type ) )
{
Debug.WriteLine( String.Format( "Present as type={0}", type ) );
Debug.Indent();
object raw = dob.GetData( type );
Debug.WriteLine( String.Format( "raw={0}", raw != null ? raw : "null" ) );
Debug.Unindent();
}
}
}
Debug.Unindent();
}
}
modified on Monday, May 18, 2009 8:21 PM
|
|
|
|
|
Hi,
I'm no expert in this matter, but I doubt your object makes it to the Clipboard. I have a hunch you need a [Serializable] for your FooNode class. Also you may want to add ",true" to Clipboard.SetDataObject() to make your object survive your app.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Awesome!
Decorating my FooNode class with the SerializableAttribute got it working.
Thank you.
[Serializable]
public class FooNode
{
...
}
|
|
|
|
|
you're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
i have to encrypt the feed of Audio video stream which is live, And for that i have to encrypt it through ASP.NET. I have already the IP of Feed and that feed to be display at player after encrypting it.
so please i need help of you or any website related this.
|
|
|
|
|
Member 1855496 wrote: And for that i have to encrypt it through ASP.NET
No you don't. ASP.NET doesn't do that. The server that's creating the video stream has to support doing that. If not, you're going to need to find a new stream server that does. Also, the player on the client side is going to have to support playing an encrypted stream. You might want to test that before you throw it into production...
|
|
|
|
|
Thanks Dave for reply, but i have to need some idea or concept for go through this encryption of stream . you had written that some player have this facility for encryption can i know which player it is.
|
|
|
|
|
No, I didn't.
I said the player that the client uses has to be able to play an encrypted stream. I have no idea if there is such an animal.
You cannot use ASP.NET to encrypt the stream. That MUST be done by the stream server that is sending the stream to the client. You'll need to do some research into the stream server you're using, and if you're not using one, find one that does this.
|
|
|
|
|
I am getting the following message box whenever I try to debug the code.
<b>“The following module was built either with optimization enabled or without debug information:”
“To debug this module, change its project build configuration to Debug mode.
To suppress this message, disable the ‘Warn if no user code on launch’ debugger option”</b>
I have built the entire code in Debug mode and no where I have enabled the optimization setting.
I am using Microsoft Visual Studio 2008.
I am using the C# .NET for the very first time please help me out in this.
|
|
|
|
|
You're trying to debug the Release version of your executable. Change the build configuration to Debug.
|
|
|
|
|
Hi everyone
I have this strange thing happening, and can't seem to get past it.
My application opens a new project dialog window where the user types in the name of the project, a description of the project, and has to open a FolderBrowserDialog to select the location of some files that the application will use.
When I select the folder and click OK (or Cancel), it closes the FolderBrowserDialog as expected, but it also closes my new project dialog with a dialog result of Cancel. The new project dialog does not have the AcceptButton or CancelButton set. It uses Yes and No dialog results back to the main form.
Anyone got any ideas?
Thanks in advance.
Paul
One day I want to be a code monkey. Right now, I'm more like a code amoeba...
|
|
|
|
|
I can't reproduce this.
I took a forms project and added a new form called Form2.
On Form2 I added a button, and to this button a Click event handler
that does the following code (ripped from the MSDN docs):
FolderBrowserDialog folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
DialogResult result = folderBrowserDialog1.ShowDialog();
if (result == DialogResult.OK)
{
string folderName = folderBrowserDialog1.SelectedPath;
}
On my project's original Form1, I added a button with a Click event handler
to launch the Form2 modal like this:
Form2 subForm = new Form2();
subForm.ShowDialog(this);
Running this, closing the FolderBrowserDialog does not close Form2.
What have you done differently?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for your reply Mark.
That's pretty much how I do it too. After instantiating the form or browser dialog, I update a few properties, then use the ShowDialog() method.
Could it be a bug?
My development environment is Windows 7 RC1, Visual Studio SP1, latest patches etc.
One day I want to be a code monkey. Right now, I'm more like a code amoeba...
|
|
|
|
|
Poolee wrote: Could it be a bug?
I suppose it's possible but I have never heard about it....maybe someone
else will reply that has experienced the same behavior. That sure would break
a lot of apps
Does the same thing happen if you do what I did - create a new form,
add a button that launches the folder browser dialog, and open that
new form modally (with ShowDialog)??
Are you opening your new project dialog modally as well?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark
Created a project as you described... worked properly.
I will have to review my code... and Dialog properties... LOL
Still very weird... I will post the results if I manage to discover the cause.
Thanks for your help!
Paul
One day I want to be a code monkey. Right now, I'm more like a code amoeba...
|
|
|
|