Re: Permission Denied error




"Ronald" <w@xxxxx> wrote in message
news:2275d$44e086b8$50398bef$24235@xxxxxxxxxxxxxxxxx
Hi there!

My story is a little complicated. I'll be as clear as I can.

I have two apps: App 1: VB Exe on the CLient, App 2: ActiveX dll on a remote
server.

This VB Exe-application connects to the ActiveX DLL though DCOM. This all
works very well. No problems at all. One method of the ActiveX-DLL returns a
string containing the contents of a file on the server. So the client-exe can
read the content of a file on the server.

Here starts the problem: in my client-app I have a user control added. (not by
clicking components!, just adding a default user control).

When I call the remote method 'GetBinaryDate(sFilename)' from a button on a
form of my VB Exe, everything works fine. But, when calling the same method
with the same sFilename from within the embeded user control, I get an error
'70 Permission Denied'.

As I've been finding out the problem I can only think of that Windows is
handeling the request from the user control different then directly from a
form. (different user).


I would guess that you are not calling GetBinaryDate with the same object as the
call on the form.
How are you creating an object from the remote ActiveX Dll? Where is this done?

I would put the call that your form is using (the one that works) in a module
somewhere, along with the instance of the remote object, and have a procedure
that wraps it all up. Then call the procedure from both the form and the user
control.



.


Loading