|
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...
|
|
|
|
|
Ok, here's where I slap myself, bang my head against a particularly strong wall, then put my head down a toilet... gurgling NOOOOB as it flushes!
I had copied the button from the Cancel button on the form. I had retained the DialogResult property of Cancel. So yeah, clicking the button opened the FolderBrowserDialog of course, then as soon as it closed, the DialogResult caused the form to close.
Thanks again for your help Mark!
Cheers
Paul
One day I want to be a code monkey. Right now, I'm more like a code amoeba...
|
|
|
|
|
Good one
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Experts,
I am developing an Asp.Net 2.0 website, with MySql 6.0 connector and same Membership provider. Every thing was running until I uploaded my page having use of that connector 6.0
I simply used this
using MySql.Data.MySqlClient;
and made the connection in code
like this
System.Data.OleDb.OleDbConnection conn= new System.Data.OleDb.OleDbConnection();
this code is running absolutely fine on my computer but its not working when I upload the page.
It shows this error:
CS0433: The type 'MySql.Data.MySqlClient.MySqlConnection' exists in both 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\1e4eaa05\e62de4c8\assembly\dl3\cf265f44\00f987f7_7669c801\MySql.Data.DLL' and 'c:\windows\assembly\GAC_MSIL\MySql.Data\1.0.7.31597__36c71baaebd03a5d\MySql.Data.dll'
When I checked I found a difference in dll version. Server is having Mysql 4.0.
Please tell me how to overcome this issue. I just checked my local computer where I havent found that dll in temporary asp.net files.
Thanks in advance.
|
|
|
|
|
Upgrade the server to the same library version as you're using.
Or, downgrade the library on your development machine to match the server's version - if you can still find the old version on the web somewhere.
|
|
|
|
|
Hi Dave,
I have switched to MySql Connector 5.1.5.0 and similarly my host has changed db from 4.0 version to 5.0 but problem persists. Now I am completely puzzled what to do.
Please help me out.
Best Regards
Jay Khatri
P.S.: for your ready reference my host is having this version (MySQL - 5.0.21-community-nt)
|
|
|
|
|
Your going to have to work with the ISP to figure this one out. I just told you the first thing I would try. I don't use MySQL for anything.
|
|
|
|
|
Hi Dave,
My problem have been solved by this:
<remove assembly="MySql.Data" />
<add assembly="*" />
This has removed the dll from GAC and added all again. So I can even use different version of dll by this.
Thanks for your support.
Best Regards
Jay Khatri
|
|
|
|