|
I want a shared method to be implemented by other business classes. But the problem is in interface class i cannot declare a Shared Method.
Even If I use a base class that is inherited by other business classes, I cannot use Overload or MustOverride against shared functions.
Is there a way out that I can force business classes to implement a shared method.
e.g.
Public Shared Function GetDefaultValue() as String
I am using VB.NET for my business objects that will be used my windows forms.
Ganesh
|
|
|
|
|
Why would you want the method to be static (shared in VB)?
You can't put a static method in an interface, or enforce implementation in inheriting classes, as there is no way of calling that method without specifying the exact class where it's implemented.
So, even if you could force someone to implement a static method, you can't call it. So, what would be the point?
---
b { font-weight: normal; }
|
|
|
|
|
My question is : Is thre any way to pass a remote object as parameter in method call ??
For example:
I have a class library and 2 projects which have references to the class library.
In the class library there's 2 classes both of them inherit from MarshalByRefObject Subject, Observer
In my server project in a form I'm doing
RemotingServices.Marshal(subject, "subject");
In my client I want to do :
Class ConcreteObserver : observer
{
Subject subject = (Authenticator) RemotingServices.Connect(typeof(Subject), URI);
subject.addObservers(this);
}
Is there any way to make this work??? I want to know if it's possible to call a remote object method (in this case addObservers) and pass a remote object in this case a ConcreteObserver.
Thanks very much in advance
|
|
|
|
|
Hi,
We have a Windows service written in .NET 1.1. running on an embedded XP device. It pushes results to a web service every so often.
Today we witnessed for the first time on one of the devices where a dedicated worker thread was running in two instances rather than the in one. As such, a race condition occurred over and over again where the return value obtained from a synchronous web service call in this thread appeared to be erronous (the two racing calls to the web service appear to get their results mixed up).
Although this isn't a show stopper in the code it is really a head scratcher for us. Our code only explicitly creates one worker thread (via the thread class and ThreadStart class). Further, this build of the service has been running for 5 months in production 24/7 on 20 odd devices and it has only shown up this one time (today) on one device
Has anyone experienced a situation where a worker thread gets spwaned multiple times even when it is explicitly only created once? What can I do to prevent this from happening?
Our customer will be asking us for a "root cause" of this problem and I have nothing to offer as an explanation (other than ).
If anyone has any advice to offer then sweet mercy please just someone send me a message.
|
|
|
|
|
Hi All,
I want to convert my .Net 2003 Project to .Net 2005 which is ASP.Net WebService project. Problem is that I don't have .Net 2003 at my home, only I have .Net 2005.
Could you pl help me to convert it in latest version? It's urgent basis.
Thanks.
Hardik Doshi
Software Engineer
-- modified at 1:24 Friday 13th January, 2006
|
|
|
|
|
you don't need vs .net 2003. When opening the Solution-file with vs 2005, the conversion-wizard will guide you through the migration process.
André
'A programmer is just a tool which converts caffeine into code'
|
|
|
|
|
Hi,
I’m working for a company that requires Video conferencing between two employees I’m intending to code this in Managed C++ over a .NET framework. I’m thinking of using windows media player. Therefore, if "A" wants to connect to "B", A would send a Request (opens the connection) and B accepts the request and establishes a connection. I’m currently using Visual Studio C++ Express Edition.
I’ve been researching this like crazy. I would really like some comments/feedback on starting of this project. Any links or advice will be much appreciated!
Many Thanks
hbjs
makaveli
|
|
|
|
|
First of all, I would suggest that any sort of UI development with Express Edition is a PITA. If these people want you to write professional code for them, tell them to buy you a decent IDE.
I would have suggested Direct Show generally for this sort of thing, but it appears to have disappeared. I'm not sure how the WMP control is going to help, does it allow video to be streamed to it ? How are you going to capture the video ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian,
Well I need to develop a prototype of it working for my company. Express isn’t to bad for now.
Well basically there will be a list of names on a database linked with their individual ip address/MAC. When A wants to talk to B, he will select the name. B receives a diologbox asking B is they want to accept. IF they accept, a connection is initiated. Unless you a better suggestion?
WMP do allow videos to be streamed to it, the problem its difficulty actually doing that. It will involve a few encoders. There will be a TCP/IP connection to the full connection. There be UDP from each system. I was also thinking if it will be easier to create a separate screen to pop up only contains the video. What do you think?
I hope I have made it clearer.
Thanks for your help
makaveli
|
|
|
|
|
hbjs wrote: Well I need to develop a prototype of it working for my company. Express isn’t to bad for now.
In that case, have you considered C# Express ? b/c UI with Winforms will be easier in C#, and you don't have MFC in C++ Express.
hbjs wrote: I was also thinking if it will be easier to create a separate screen to pop up only contains the video. What do you think?
No, the WMP control can be quite happily hosted in a form, there's no trouble there.
I'm sorry, I've not done any video capture, so I can't help much beyond that.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yeh i have to use Managed C++ so I cant use C#.
Thanks for your help and advise!
makaveli
|
|
|
|
|
OK. I'm interested to know why do you have to use managed C++ ( and not MFC, for example ) ? Surely if you're not hired as a developer ( which I assume from you're having to prove yourself before they will provide tools ), they are lucky to get whatever you're willing to work with ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have already started my application with MC++. I had to build a Database Management System in MC++. I can probably integrate C# If I wanted to . MC++ will produce a more powerfull and robust code
I actually want to Learn MC++ aswell coz im a beginner to it
im research continues
makaveli
|
|
|
|
|
hbjs wrote: MC++ will produce a more powerfull and robust code
I don't see why MC++ would be more 'robust', although I believe it will be *slightly* faster than the equivelant C# code. Not much, tho.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I have created one setup project to create an MSI for my application. In that application i have used one COM DLL , when i developed i registerd that dll manually and added/used in the application.
While giving the msi to testing team, i need to give a msi, which automatically register that DLL in that machine as a part of installation of the application.
Please provide me code or link, which would be more help.
thanks
Happy coding!!
kotteeswaran
|
|
|
|
|
When you look at the properties tab when having selected this dll than you will see a Register property. Just set it to vsdrfCOM or any of the other settings you want.
|
|
|
|
|
HRESULT __stdcall DllRegisterServer()
{
HKEY h1,h2;
RegOpenKey(HKEY_CLASSES_ROOT,"CLSID",&h1);
RegCreateKey(h1,"{22A4ACB4-3615-11d3-9D85-008048D7F59D}",&h2);
RegSetValue( h2,"InProcServer32",REG_S2,"C:\WINNT\Profiles\muser\sarbjit\comcalc\debug\\comcalc.dll",50);
RegCloseKey(h1);
RegCloseKey(h2);
return S_OK;
}
You can use the above code for auto registering the dll when the dll or the COM Component is invoked.
Thanks
Sarbjit Chawla
|
|
|
|
|
I have one application where all the business logic gets executed under transaction, like if one update fails; all the previous updates would be reverted back.
In a scenario, i tried to drop a message to local MSMQ under the transaction and as well as to a remote queue. While testing, i gave wrong Qpath to test the transaction, if the queue is local queue, it works as expected( I mean the other updates gets reverted), but in case of Remote queue... ... I cant .. other updates gets committed becoz the Q.Send method doesnt throw an exception in case of non-existence of remote queue.
Any help with code would be much appreciated...
Happy coding!!
kotteeswaran
Happy coding!!
kotteeswaran
|
|
|
|
|
I looked at the web development message board and my question seems to me to fit better here.
There are three parts to my situation.
1) XML server that pushes XML streams as updates are available to a URL of my choice.
2) Here is the question lies.
3) Normal Service that wants to consume the XML streams from item 1.
Currently I have an ASP.NET page that writes the xml streams to disk, my service has a file watcher
that watches the directory that the ASP.net page is writing the files to.
While this works, I find it far from ideal.
I would like to have a webservice running that would "forward" the xml streams straight to my service and skip the write the files to disk altogether.
I am not sure how to go about this. Should my service have some sort of listener that listens for input from the webservice?
Ideas appreciated,
Steve
|
|
|
|
|
Hi all.
I'm in the desperate need for a robust multi-currency API for .NET. It should follow the current rules and regulations for monetary operations and multi-currency apps.
So if you know of any API's that resemble that please let me know asap...
Kind regards,
Johannes Hansen
frontAvenue A/S
|
|
|
|
|
What do you want it to do for you ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Well I would be VERY happy if I could get an API that supports currency operations according to local rules and regulations. For instance, it should use "Argentina Rounding" and 2 decimal precision if you are making operations in an Argentina culture and the operations should follow the other rules and regulations that apply to Argentina. But I could settle for less.
Maybe I could settle for an API that implements various rounding schemes. Swiss rounding, Argentina rounding, bankers rounding etc. The currency precision is already available in the framework today using the CultureInfo class although I'm not sure which standard it follows.
Kind regards,
Johannes Hansen
frontAvenue A/S
PS: I loved your articles on image manipulation in C#... Very cool!
|
|
|
|
|
The SmtpClient does not seem to call the QUIT Command to close the connection to an SMTP server, is this usual behaviour? It appears to keep the connection open between each mail that is sent.
I would assume that at bare minimum it should call QUIT when the application that is using the SmtpClient object is shut down.
Regards,
J
James Simpson
Web Developer
imebgo@hotmail.com
P S - This is what part of the alphabet would look like if Q and R were eliminated Mitch Hedberg
|
|
|
|
|
James Simpson wrote: I would assume
Didn't your mother tell you impolite to swear like that?
The SmtpClient class is a wrapper for the CDONTS COM Component, and its NewMail class. It is NOT a full .NET implementation of a SMTP client.
It is poissible that the CDONTS class doesn't send a QUIT command. You'll have to setup a packet sniffer between your machine and the network to figure this out. I haven't been able to find any documentation on whether it actually does this or not.
If you have to guarantee a QUIT command being sent, you'll have to implement your own SMTP client in your code. Just Google for "C# SMTP Client" and you'll find a bunch of examples.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 13:19 Wednesday 11th January, 2006
|
|
|
|
|
Dave Kreskowiak wrote: The SmtpClient class is a wrapper for the CDONTS COM Component, and its NewMail class. It is NOT a full .NET implementation of a SMTP client.
I think you are refering to the 1.0/1.1 version of the Web.Mail classes, the new one (2.0) appears to be a ground up implementation of an Smtp Client which would work standalone
Dave Kreskowiak wrote: If you have to guarantee a QUIT command being sent, you'll have to implement your own SMTP client in your code. Just Google for "C# SMTP Client" and you'll find a bunch of examples.
Its not that I need the QUIT Command sending, it is workable. If you created a forms app with a button to send a simple mail through the local SMTP server (lets assume IIS), run the application, click the button to send the mail, then restart the IIS SMTP Service, and click send again the application will fall over because the connection was closed, even though the connection has been reopened. We have an inhouse smtp service which causes exactly the same problem because it has a timeout on it, if this is normal behaviour then someone using the SmtpClient would need to wrap it in a Try Catch to resend under these conditions. I would have hoped that the SmtpClient would clean itself up and attempt to reconnect to the server itself. Or send a QUIT message after the message has been sent to the server.
Thanks, James
James Simpson
Web Developer
imebgo@hotmail.com
P S - This is what part of the alphabet would look like if Q and R were eliminated Mitch Hedberg
|
|
|
|