Robin Golden wrote: Can you tell me if Service installation is any better than in 1.0?
I found in 1.0 that on subsequent installations it would not overwrite registry settings for usernames, passwords, executable location etc.
I had no problems with re-installing the Windows Service. Note though that I always did an un-install of the previous version first, then I installed the new version. Also the install script was very simple, the windows service I made was pretty contained in that it did not need any registry settings. All it needed was to be registered with Windows as a service and a username and password given (asked for during the installutil.exe running or it could be put in the Install script and it always picked up the change if there was one.)
Paul Watson Bluegrass Cape Town, South Africa
brianwelsch wrote: I find my day goes by more smoothly if I never question other peoples fantasies. My own disturb me enough.
I just installed Visual Studio .NET 2002 a few months ago. I am using the C++ compiler almost exclusively for ATL,MFC,WTL and managed C++ apps. Why should I upgrade to Visual Studio .Net 2003? What REAL benefits do I get. My company has already rejected the .Net framework for now... So I only use the C++ compiler. Is the upgrade worth it?
I upgraded and found that compiling a huge c++ project seems to be slightly faster, and overall the ide ui seems to be a bit less buggy, although strangely enough when you drag the vertical bar it still sometimes opens a new window to msdn unexpectely.
Also, it seems as though everything that used to compile with a linker warning about being deprecated in future is now in fact deprecated, so I had to re-jig a bit of code that used the old IOSTREAM library etc.
I guess it might also be a potential issue of paying more down the road to upgrade if you don't incrementally upgrade.
"Things are more like they are now than they ever were before."
-- Dwight Eisenhower
when call BitBlt in .NET, I came across a problem.
I want to copy a bitmap to another bitmap in memory using BitBlt(dc, 100, 100, 60, 60, sc, 0, 0, SRCCOPY);
then draw it on screen in OnPaint(), but it display a black square with the same size of the source bitmap instead of the real bitmap. What is the possible problem in my call of BitBlt or is there something wrong somewhere else?
I think I may have mislead you when I mentioned BitBlt in our previous thread. You don't need to use BitBlt, the framework does it for you when have enabled the doublebuffer style bits (using SetStyle on the control/form). You can continue to do your drawing as you did before, once you finish your painting in OnPaint then the framework will take over and do what it needs to do for the double-buffer.
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
Not at all, I am now doing my drawing in OnPaint().
What I want to use BitBlt is to realize some special kind of paint brushes.
The brush to be realized is going to draw a small bitmap repeatly.But it seems doesn't work well as I said in this Post.
Another problem is how to get the mouse position on client surface outof Mouse events.
Or can I change the OnMouseMove()'s time interval of getting the current mouse position?
Now the time interval cannot satisfy my need to make a nice brush, I would like this interval to be as small as I want(can be equal to my Timer tick interval as about 1ms) can I do this??
I use Control.MousePosition to get the current mouse position on screen, then use this.PointToClient(Control.MousePositon) to translate it to client relative coordinate.
But it seems the point sensor interval is still not satisfied me.
By the way,
I have realized a nice eraser that works well with my layers.
When the eraser tool is activited, my code sets the Graphics.CompositeMode to SourceCopy and set the color of a pen inside my eraser class to a ZERO alpha value. The SourceCopy mode makes sure that the new stroke with new alpha value could cover the existing things on the bitmap.
That works fine for my eraser, but I think, to realize a selection rectangle, I need a XOR operation or a copy-paste of covered region operation.
I am getting this message from a system that is using DIME over web services. It has been working fine for quite some time and then just today for some reason I keep getting this message:
Microsoft.Web.Services.Timestamp.TimestampFault: Message Expired
at Microsoft.Web.Services.Timestamp.TimestampInputFilter.ProcessMessage(SoapEnvelope envelope)
at Microsoft.Web.Services.Pipeline.ProcessInputMessage(SoapEnvelope envelope)
at Microsoft.Web.Services.WebServicesExtension.BeforeDeserializeServer(SoapMessage message)
None of the programming code on either machine has been changed. Have spent a little while digging but have not yet found out anything even remotely related.
Found out that the computers were off more than five minutes from one another. I didn't dream they would have to be in sync time wise to work, but I changed the time on one of the machines to match the other and it is all happy again. Guess the first web service I should call is to get the time of the other machine and make sure they are in sync.
Since the Winforms dialog controls do not allow must in the way of customizing (e.g. customizing the OpenFileDialog), I was wondering if anyone has seen any commercially available 3rd party controls that provide customized dialogs. I thought I've seen some one time on the web, but a google search hasn't helped me find it again.
I'm having a problem with an architectural issue and the MS newsgroups are too slow, so here's to hoping...
I have a licensing service (hosted by a Windows Service) that essentially uses the number of registered sponsors as the current number of licenses granted. This is done using signed XML, a unique ID (the computer's SID), and a number representing the number of licenses granted. The service - after having read and verified the license information - increments the granted license count with each registered sponsor and decrements the count when a sponsor unregisters*, where 0 <= n <= m, where n is the number of registered sponsors and m is the max number of licenses. If a client can't get a license, they're booted from the system (after a friendly error message).
* Now, the problem is that the only thing in the entire .NET Framework (I've searched all the extracted IL with regex's) that calls ILease::Unregister (where I would decrement the count) is ClientSponsor::Unregister. Nothing in the .NET Framework calls ClientSponsor::Unregister, however. This becomes a problem in any case because the server basically has to know when a sponsor is dropped, whether they've expired, quit, or have been unloaded unexpectedly (perhaps from Environment::Exit after a fatal error, or the OS crashes).
So, I must take the DCOM approach and poll the sponsor list that I keep track of (I implement my own ILease). This is not a unacceptable idea since this will all probably happen on a local network, but I would rather avoid it.
So, is there any way that the lease can know when a sponsor is dropped without GC? If the item is GC'd on the client, can I expect that the item in the list is GC'd eventually as well? I guess I'm just hoping for some ideas to solve this counter problem.
PS: The remoting interface is merely a marker. All the actual work is done by the lease/sponsor relationship since a Register/Unregister mechanism already exists.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
Tom Barnaby posted the following message on http://www.dotnet247.com/247reference/msgs/25/128945.aspx:
I use what I call a "Disposing Sponsor" in situations where I need timely cleanup of a remote object when its lease expires. This is a server side sponsor that does NOT renew the lease but just calls dispose on the sponsored object. Here is an example: (lifted right out of my book )
class DisposingSponsor : ISponsor
private IDisposable mManagedObj;
public DisposingSponsor(IDisposable managedObj)
mManagedObj = managedObj;
public TimeSpan Renewal(ILease leaseInfo)
Then you simply register this sponsor with the remote object. This can be
done in a number of places, but a logical place is the remote object's
InitializeLifetime service method:
public override object InitializeLifetimeService()
ILease leaseInfo = (ILease)base.InitializeLifetimeService();
// Register a CustomerSponsor object as a sponsor.
// Register a DisposingSponsor object
There is a wealth of information that talkes about the various .config file changes that have to be done to modify your application to run under various Fx version scenarios. There's also a link that talks about various API breaking changes.
.NET Developer Evangelist
Microsoft - Norcal