Click here to Skip to main content
15,887,135 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: visual studio 2005 with framework 1.1 Pin
Vasudevan Deepak Kumar15-Jun-07 3:05
Vasudevan Deepak Kumar15-Jun-07 3:05 
QuestionWeird System.BadImageFormatException Pin
Vaibhav Gawali12-Jun-07 19:26
Vaibhav Gawali12-Jun-07 19:26 
QuestionResizing bitonal bitmap image losing quality. Pin
vikram srirangam12-Jun-07 19:08
vikram srirangam12-Jun-07 19:08 
AnswerRe: Resizing bitonal bitmap image losing quality. Pin
Vasudevan Deepak Kumar15-Jun-07 3:07
Vasudevan Deepak Kumar15-Jun-07 3:07 
AnswerRe: Resizing bitonal bitmap image losing quality. Pin
Vasudevan Deepak Kumar15-Jun-07 3:08
Vasudevan Deepak Kumar15-Jun-07 3:08 
QuestionShow dividing lines between subroutines in text editor Pin
B_miller12-Jun-07 5:09
B_miller12-Jun-07 5:09 
AnswerRe: Show dividing lines between subroutines in text editor Pin
Mike Dimmick12-Jun-07 5:23
Mike Dimmick12-Jun-07 5:23 
QuestionBeginInvoke in multi-processor machine Pin
Adam_contel12-Jun-07 5:06
Adam_contel12-Jun-07 5:06 
Hi I wrote a multi thread program (windows service) that writes to a log (text) file.
So I used beginInvoke so that only one thread will write to the file.
When I tested it on my machine it worked fine but when I installed the program on a multi processor production server it crashed.Frown | :(

Code:
Public Delegate Sub DelegateLogError(ByVal txtMsg As String)

Public Class Server_main

   Private log_ As LogHandler

   Public Sub logError(ByVal txtMsg As String)

     Dim del As New DelegateLogError(AddressOf log_.LogError)
     Dim ac As AsyncCallback = New AsyncCallback(AddressOf cbLogError)
     del.BeginInvoke(txtMsg, ac, Nothing)

   End Sub

   Public Shared Sub cbLogError(ByVal ar As IAsyncResult)
     If ar.IsCompleted Then
       Dim del As DelegateLogError = CType(CType(ar, _
       System.Runtime.Remoting.Messaging.AsyncResult).AsyncDelegate, _
       DelegateLogError)
     del.EndInvoke(ar)
     End If
   End Sub


   Protected Sub Initialize()
     Try
       logError("Starting Server")
       .
       .
       .

End Class

Does anyone have any idea how to make it work on a multi processor?

Thank you


Adam
AnswerRe: BeginInvoke in multi-processor machine Pin
Luc Pattyn12-Jun-07 5:31
sitebuilderLuc Pattyn12-Jun-07 5:31 
AnswerRe: BeginInvoke in multi-processor machine Pin
Robert Rohde13-Jun-07 19:31
Robert Rohde13-Jun-07 19:31 
GeneralRe: BeginInvoke in multi-processor machine Pin
Adam_contel13-Jun-07 19:45
Adam_contel13-Jun-07 19:45 
QuestionVc++ .NET? Pin
$uresh $hanmugam12-Jun-07 3:54
$uresh $hanmugam12-Jun-07 3:54 
AnswerRe: Vc++ .NET? Pin
Kevin McFarlane12-Jun-07 6:43
Kevin McFarlane12-Jun-07 6:43 
GeneralRe: Vc++ .NET? Pin
$uresh $hanmugam12-Jun-07 21:49
$uresh $hanmugam12-Jun-07 21:49 
GeneralRe: Vc++ .NET? Pin
Kevin McFarlane12-Jun-07 23:18
Kevin McFarlane12-Jun-07 23:18 
AnswerRe: Vc++ .NET? Pin
Sathesh Sakthivel12-Jun-07 15:45
Sathesh Sakthivel12-Jun-07 15:45 
AnswerRe: Vc++ .NET? Pin
Christian Graus12-Jun-07 16:22
protectorChristian Graus12-Jun-07 16:22 
QuestionVisual Studio VS Visual Studio .net Pin
ForNow11-Jun-07 12:59
ForNow11-Jun-07 12:59 
AnswerRe: Visual Studio VS Visual Studio .net Pin
MatrixCoder11-Jun-07 17:19
MatrixCoder11-Jun-07 17:19 
GeneralRe: Visual Studio VS Visual Studio .net Pin
ForNow11-Jun-07 18:46
ForNow11-Jun-07 18:46 
GeneralRe: Visual Studio VS Visual Studio .net Pin
MatrixCoder11-Jun-07 19:19
MatrixCoder11-Jun-07 19:19 
GeneralRe: Visual Studio VS Visual Studio .net Pin
ForNow11-Jun-07 19:29
ForNow11-Jun-07 19:29 
GeneralRe: Visual Studio VS Visual Studio .net Pin
Kevin McFarlane12-Jun-07 3:17
Kevin McFarlane12-Jun-07 3:17 
GeneralRe: Visual Studio VS Visual Studio .net Pin
ForNow12-Jun-07 6:27
ForNow12-Jun-07 6:27 
GeneralRe: Visual Studio VS Visual Studio .net Pin
Kevin McFarlane12-Jun-07 6:38
Kevin McFarlane12-Jun-07 6:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.