|
you have to pull in entire projects because that's the only way you'll get the project specific settings and options (such as linker options for each project)
|
|
|
|
|
Well, not only. I think that the only way to have built a dll and a dependent exe is to put them in different projects. That's what I ment. Isn't it right?
|
|
|
|
|
yes, but they can be in the same solution
|
|
|
|
|
and that's what I am saying... They can exist inside the same solution, but not inside the same project.
|
|
|
|
|
yep... that'll facilitate a lot of other things like building an entire solution with a single click and debugging dll/exe source simultaneously.
i have a solution with 26 projects in it (for a large software suite)
|
|
|
|
|
yes its possible, the terminology may sound a bit confusing but its easy... see my comment to luc
|
|
|
|
|
You could, but that's not how it's intended to be used. My first thought on how to do it would be to use a pre- or post-build event.
As luc said -- each project in a solution is intended to produce one executable (EXE or DLL).
|
|
|
|
|
well the concept of a solution is meant to contain multiple projects... and that is the way its meant to be used...
|
|
|
|
|
Yeeesss... isn't that kinda what I said?
|
|
|
|
|
i guess you did, but using pre and post build events for building multiple projects in not a good approach, should be one solution with multiple projects
|
|
|
|
|
Yeeesss... isn't that kinda what I said?
|
|
|
|
|
I have the following problem:
I use Microsoft.DirectX.AudioVideoPlayback class for playing video on our school TV (connected with HDMI also with the sound). Video works fine, but I´ve got a problem with audio. I need to redirect audio (represented by Audio object implemented in my Video object) to another output (Display audio output) in Windows 7. But all other sounds (also from my app) I want to send to default output.
I need to send audio directly from directX playback. I don´t wanna extract audio form AVI for example.
If there is some solution, please answer. Thanks.
|
|
|
|
|
As far as I remember it cant be done with basic audiovideoplayback.
You might want to take a look at DirectShow instead, since you can define exactly what you want the player to do. You can start with the simple-playback sample from http://directshownet.sourceforge.net/[^] and add a DsDevice (aka soundcard output) to the graph (google how to).
|
|
|
|
|
hello , I got exception in my application that is :
Unhandled exception has occurred in yourl application.
Exception form HRESULT 0*800AC472
help me the solution of this problem:
thanks in advance
|
|
|
|
|
Without having more details it is tough to guess the problem. Here[^] is something that may help.
|
|
|
|
|
I think , i should range in this code please help me how i use range in this code
private Excel.Application app = null;
private Excel.Workbook workbook = null;
private Excel.Worksheet worksheet = null;
object misValue = System.Reflection.Missing.Value;
public void createDoc()
{
try
{
app = new Excel.Application();
app.Visible = true;
workbook = app.Workbooks.Add(1);
worksheet = (Excel.Worksheet)workbook.Sheets[1];
}
catch (Exception e)
{
Console.Write("Error");
}
finally
{
}
}
public void addData()
{
string s;
int i = 1;
foreach (ListViewItem li in listView2.Items)
{
s = "A" + i.ToString();
worksheet.get_Range(s, misValue).Formula = li.Text;
i++;
}
}
public void addData1()
{
string s;
int i = 1;
foreach (ListViewItem li in listView1.Items)
{
s = "A" + i.ToString();
worksheet.get_Range(s, misValue).Formula = li.Text;
i++;
}
}
|
|
|
|
|
|
|
Information provided is too little.
With this information, at best, you can search on msdn for this error.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
I have a collection class marked with [Serializable]. Its purpose is "lazy" loading of data. I have overriden all the accessor methods so I can call the item factory to load the items. All works perfect.
A user recently pointed out that if he uses the XML serializer, it doesn't work.
I do have a method thats marked with OnSerialized. Works great with the binary formatter, but doesn't get called with the XML one.
[OnSerializing]
internal void OnSerializing(StreamingContext context)
{
LazyLoad();
}
Whats the work-around to support both? Without a lot of wheel reinvention .
modified on Friday, April 1, 2011 11:13 PM
|
|
|
|
|
SledgeHammer01 wrote: A user recently pointed out that if he uses the XML serializer, it doesn't
work.
Define "doesn't work". What happens and what is expected?
Correct me if I'm wrong, but isn't the method tagged with OnSerialized called AFTER serialization of the object is completed? I thought OnSerializing is called before serialization giving the object a chance, like in your case, to finalize values in prep for serialization.
|
|
|
|
|
Yeah, sorry, I posted the wrong snippet.
It *is* OnSerializing. Fixed the original post. I was testing if OnSerialized was called. Its not. I saw on google that the XmlSerializer doesn't support those attributes. By "not work", I mean, I don't get a notification that somebody is serializing the object, so I don't have a chance to perform the lazy load and the serializer writes out an empty collection. The serializer is doing what its supposed to because the collection IS empty at that point. Thats kind of what this special collection does. It only loads the items when needed. So I was looking for something to hook into for the serialization so I know its time to load.
The work-arounds on google that I found were:
1) use BinaryFormatter or the soap formatter which support the attributes (yes, BF does work, but thats besides the point -- if the user wants to use XmlFormatter, they should be able to). Not an acceptable solution.
2) Implement ISerializable. This does get called with all the serializers, but its pretty much reimplementing serialization from the ground up. Really a last resort after I've exhausted every single other last resort.
I also have work-arounds myself: a) have the user call a property that forces the lazy load b) add a "forceload" method. I'd prefer to not do either of these and do it automatically .
|
|
|
|
|
OK. From everything you've posted, the only automatic solution you've got that works with all the formatters is ISerializable. Yeah, It's a pain to use (I always use it myself), but it's the only way to go.
|
|
|
|
|
The collection I'm working on is derived from ObservableCollection<T>. That means I would need to implement ISerializable to basically mimic everything the .NET serialization does on *any* type of object and I'd spend the rest of my life trying to handle all the cases Not a good idea IMO.
BUT GOOD NEWS!!
After spending an hour or so in Reflector, I managed to find a little hole that I can cram myself into. Works with all the different serializers. Much easier solution then implementing ISerializable . NOTE: this is NOT a general / generic solution, I just wanted something to work automatically with my ObservableCollection<T> derived class and this is it.
ObservableCollection<T> is derived from Collection<T>. Collection<T> implements the ICollection interface.
What I found was, that somewhere deep in the bowels of .NET XML serialization, they special case ICollection and call the ICollection.Count getter very early on.
So all I did was implement ICollection in my class:
int ICollection.Count
{
get
{
LazyLoad();
return Count;
}
}
for ICollection.IsSyncronized, they simply return false, so I did the same.
ICollection.SyncRoot and ICollection.CopyTo, well, those are a bit trickier functions that I didn't really want to bother re-writing, so I just used reflection & expression trees to call the ones in Collection<T> .
And voila! Now my class will perform the lazyload automatically when its serialized.
|
|
|
|
|
Interesting and cool. Good work!
|
|
|
|