Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Denied in dll

Status
Not open for further replies.

AkshayB

Programmer
Dec 6, 2000
29
IN
Hi!

I have used err.raise method(VB com) in dll and kept it in
COM+, At server side it gives me proper error message, but
at client side I get the message method "methodname~" of object "ObjName~" failed. If I log the information there I get the error message access denied(it happens while accessing err.number, err.description And err.raise method)

What is the problem, why its not working.

Since a long time I am not getting help for this prob.
At least if some of one could give me some clue, will be helpful.

-Akshay
akshay_bedarkar@yahoo.com
 
There are two Microsoft knowledge base articles about this issue - Q255733 and Q255735. The problem is supposedly fixed in Windows 2000 SP1.

Hope this helps. Chris Buckley
 
Yes buckcs,
I've got this article from Microsoft site.
I'll try it today.

Thanks for help



 

If you can send me the components or make an example.
I'll give a try.

leitao_hugo@hotmail.com
 
After installing Service Pack2 as suggested by Microsoft I am getting proper error message at client side.

There is another problem. One of the method of my dll implemented in COM+ is as follows and I am getting error "Access Denied at errobj.number
What is the reason?

Public Sub HandleErr(errObj as object)

'This parameter is passed as err object

dim i as integer
'and some variable declaration

if errobj.number = 1 then ' here I am getting error
'some code
else

'
end sub


 
I don't know why you are getting the error, but I'd try passing a copy of the Err object and using early instead of late binding. See the red bits below:

Sub Whatever()
On Local Error GoTo ErrorHandler:
Err.Raise 1

ErrorHandler:
Dim MyErr As ErrObject
Set MyErr = Err
HandleErr MyErr

'.....
End Sub

Public Sub HandleErr(errObj As [red]ErrObject[/red])
If errObj.Number = 1 Then
'some code
Else
'some more code
End If
'.....
End Sub Chris Buckley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top