|
I think the only way you will be able to do this is using a multi-process approach and using .net remoting or some other IPC mechanism to communicate. AppDomains are .net only and P/Invoke will still end up using LoadLibrary in the end.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
I have Visual Studio C++ V6. After updating with SP6 my SourceSafe became V6.0d. Fine.
Now ... I just bought C# Std and guess what? it won't use my SourceSafe!
C# actually tells me I've got SourceSafe Version 4.xx and I should upgrade to version 5 or higher.
My SourceSafe About dialog says I've got V6.0d.
Is there any way Visual Studio C++ V6 SourceSafe (or other SourceSafe?) can be used with C# standard?
Many Thanks
|
|
|
|
|
AFIAK things should work. SourceSafe hasn't had an update for a while. 6d should work fine. Try reinstalling SourceSafe.
Alex Korchemniy
|
|
|
|
|
OK thanks for that. I will try but I doubt it will work. Scouring the web seems to indicate that SourceSafe cannot be integrated with C# .Net Standard ... unless somebody out there can definitely say otherwise.
BazM
|
|
|
|
|
You know you might be right about standard edition. I personally never used standard.
Alex Korchemniy
|
|
|
|
|
I'm new to remoting and not very articulate so bear with me here. I have an object that needs to be queried by a remote client but it inherits from some other class already.
public MyClass : SomeBaseClass
{
public string GetName { return "name"; }
}
So I made a remoting object like so
public class RemotingObject : MarshalByRefObject
{
private MyClass c;
public RemotingObject( ) { }
public setClass( MyClass start )
{ c = start; }
public string GetName( )
{
return c.GetName( );
}
}
and a server like so
public class RemotingServer
{
public RemotingServer()
{
TcpChannel channel = new TcpChannel( 8080 );
ChannelServices.RegisterChannel( channel );
RemotingConfiguration.RegisterWellKnownServiceType(
typeof( RemotingObject ),
"RemotingObject",
WellKnownObjectMode.Singleton );
}
}
My question is that how can I pass a MyClass object to the remotable object after it is created? Is is possible to pass it in the constructor of the remotable object?
Thanks.
|
|
|
|
|
A remote object is like another object, you can indeed pass it as a constructor parameter.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I have an typed collection wich is bounded to datagrid control like this:
dataGrid1.DataSource = collection;
How to disable 'new row' in DataGrid ?
---
object oriented
uml oriented
iconix oriented
sql oriented
truespace oriented
---
solitare oriented
|
|
|
|
|
CurrencyManager currencyManager = (CurrencyManager)this.BindingContext[this.dataTable];
if ( currencyManager != null )
{
((DataView)currencyManager.List).AllowNew = true;
}
|
|
|
|
|
Hy, 10x for response,
but I have a collection bounded to Datagrid control not a DataSet/DataTable
object oriented
uml oriented
iconix oriented
sql oriented
truespace oriented
---
solitare oriented
|
|
|
|
|
I am using a collection called "GridLinkedListCollection"
this.globalEntitySearchGrid.DataSource = this.linkedList;
this.globalEntitySearchGrid.AllowNavigation = false;
this.gridTableStyle = new DataGridTableStyle();
this.gridTableStyle.MappingName = "GridLinkedListCollection";
and the new row addition is disabled. Are you binding your DataGrid with code similar to above?
Are you implementing IBindingList?
|
|
|
|
|
Yes, indirectly.
My collection is derived from CollectionTemplate (I use ORM.NET from Olero) base class collection witch
implement IBindingList (is true).
I just want that DataGrid to do not display new row.
object oriented
uml oriented
iconix oriented
sql oriented
truespace oriented
---
solitare oriented
|
|
|
|
|
|
This line
((DataView)currencyManager.List).AllowNew = true;
generate an error: invalid cast !
10x in advance
---
object oriented
uml oriented
iconix oriented
sql oriented
truespace oriented
---
solitare oriented
-- modified at 15:06 Thursday 8th September, 2005
|
|
|
|
|
In the quickwatch see the base type of currencyManager.List.
That will definitely help.
|
|
|
|
|
Hello,
I am trying to use an old C++ library that generates nurbs curves with my C# program. The library is the nurbs++ one available online. I have come to the point where I think I need to write a wrapper to use the functions from the library in my C# program but I have one big problem. The nurbs++ library is all completely in templates, and I am unsure of how to write the wrapper with template functions. The MSDN guide to write wrappers is all in regular functions not templates, and I have also not been able to find any examples of how to wrap a C++ template class or funciton online anywhere. If anyone can help I could really use it. Please either point me in the right direction or give me a wrapped template function example.
Thanks a lot,
Michael Brown
|
|
|
|
|
If you need to keep the "templateness" of things, you are forced to use version 2.0 of the .NET Framework. BUT! Things are still not necessarily going to be easy then, since generics and templates are different creatures.
A simple solution (if it can work for you) is to create a non-template MC++ wrapper around a specialized template class. (For example, if you have a template class CCalc<T>, then create an MC++ wrapper called CCalcInt.) The other .NET languages can then easily use the non-templatized wrapper class.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
-- modified at 13:35 Thursday 8th September, 2005
|
|
|
|
|
Why does C# NOT support default parameters when VB.NET and C++ do?
|
|
|
|
|
Because MS has decided they were a bad idea. Instead you should write overloaded method calls with the minimum params, all of them, and any intermediate combination that you feel is neccesary.
|
|
|
|
|
I have a form which i use to initiate my windows application in Application.Run()
and i need a way to access a function within that form.
I need to do this because i have another active form which has to update the form created in the Application.Run(), and ive managed to show/hide the main form but not to access its functions.
// Example. In form B which has its owner set to the main form
ActiveForm.Owner.Visible = false;
This affects the main form but i cant seem to find where the public functions are or to edit anything beyond basic frame parameters.
Does anyone know how i can do this?
|
|
|
|
|
You have to cast the return value of ActiveForm.Owner to the specific type.
if (ActiveForm.Owner is MainForm)
((MainForm) ActiveForm.Owner).Function(..);
www.troschuetz.de
|
|
|
|
|
I tried your way before and i also tried (ActiveForm.Owner as MainForm).function
but neither of them gives me access to functions.. why?
It seems like the form created in Application.Run() have much more privacy and restrictions to it than other forms created.
|
|
|
|
|
Which access modifier has the function? Did you declare it public or internal?
www.troschuetz.de
|
|
|
|
|
the function is public and the form class is declared like this:
public class MainForm : System.Windows.Forms.Form
|
|
|
|
|
I'm a bit at a loss than, cause in this case the given code should work.
What compiler error do you get for your code snippet (ActiveForm.Owner as MainForm).Function() ??
www.troschuetz.de
|
|
|
|