Concurrency problem using Unmanged code (COM+ dll)

  • Thread starter Thread starter Sanjay
  • Start date Start date
S

Sanjay

Hi,

I am calling COM + dll from VB.net class.

When two clients invoke same method of com+ dll concurrently both
client requests fail.

COM + dll is insatlled in Library package.

I got same problem when when I changed packaege from Library to
server.

Any idea how to resolve this?

Any suggestions?

Thanks,

Sanjay
 
There could be many reasons that could make your calls fail. More info.
needed. Better post a sample code to repeat the problem.

-jl
 
Hi,

Here is sample dotnet code:

VB.net class

*****************
Imports BPLogFunction

Public Class LogWrapper

' Pointer to an external unmanaged resource.
Private handle As IntPtr

Public Sub New()
Me.handle = handle
End Sub

Public Function SearchUser(ByRef userId As String, ByVal objectType As
String) As Boolean
Dim _params(1, 1) As String
Dim _result As Boolean
Dim _bpCom As New BPLogFunction.CBPLogFunction

_params(0, 0) = "Function" : _params(0, 1) = "SEARCH"
_params(1, 0) = "UserID" : _params(1, 1) = userId
_result = _bpCom .UserInfoFunctions(CType(_params, System.Array))
' Call the appropriate methods to clean up
' unmanaged resources here.
' If disposing is false,
' only the following code is executed.
CloseHandle(handle)
handle = IntPtr.Zero
Return _result
End Function
*****************
Thanks, Sanjay
 
Can not see any problem here. What is Private handle for? What is it doing
inside UserInfoFunctions?
 
Back
Top