Link to home
Start Free TrialLog in
Avatar of velcrow
velcrow

asked on

ActiveX component can't create object

In and Access 2010 database application, the following line of code runs fine when the application is opened from a full remote desktop session on a server 2008 r2, but when it is opened as a RemoteApp this line of code produces run-time error 429 "ActiveX component can't create object"

Set openApps = CreateObject("Shell.Application").Windows
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

I have no possibility to hands-on test out this scenario, but from the very definition of remoteapp it looks like this is exactly what should be expected - because it's very hard to tell whose shell it is, yours, or remote, and consequently, when this object will be dealing with its various features, such as special directories, registry etc., whose special directories etc. to look at.
...this post kind of confirms my guess:

http://social.technet.microsoft.com/Forums/en/winserverTS/thread/845ac56d-a8c2-4188-96b2-6ae310b84011#47adfdec-5492-443a-bd8a-25d02ba87b42:

"The seamless shell lacks some of the functionality that the full-blown Explorer shell has - for obvious reasons as there is no need for all the full desktop stuff."
Avatar of velcrow
velcrow

ASKER

so, can you think of a workaround?  What the application is attempting to do is loop through the list of open windows to find any that are internet explorer and find the internet explorer window that matches a given url and do something with that internet explorer object.  In other words, is there another way that I can evaluate the open windows/applications (or at least internet explorer windows)  so I can get this working as a remote app?
When you say "the list of open windows" - you mean open windows on your local desktop (to which remotapp, which runs on remote machine, has no access), or on the remote desktop (which the local user does not see)?

Remoteapp is similar to a character on the TV screen - he is displayed, but he is not really here; can't talk to him.
Avatar of velcrow

ASKER

i mean open windows on the server (remote desktop).  The Access application launches other programs such as Outlook and Internet Explorer.  When these other programs are launched by Access running as a remote app they too open as a remote app.
Even if you manage to make it seeing other applications on the same remote machine, whatever it would launch, it would launch at the same remote machine, and it wouldn't know to make it visible to you through yet another remoteapp. When you run the "full" remote desktop, you see the whole remote screen, so whatever gets launched there, you see it. Here you see only one piece, and new remote piece can't make itself visible to you by its own initiative.

Again, I have to admit that all I say is just speculations, but I don't see how an application on remote computer would force on you new remote desktop session to itself.
Avatar of velcrow

ASKER

I'm not sure I follow you completely here, but other programs that are launched as remote apps by my access application are visible to it and it does interact with them
ASKER CERTIFIED SOLUTION
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of velcrow

ASKER

apparently there is no way of doing what I want to do, but you offered no work around
sorry - missed that part.

I would probably try to do something by using FindWindowX, which has been the way to find other windows for decades. There are some examples specifically for Access at at http://www.utteraccess.com/forum/APIs-FindWindow-FindWin-t1945724.html , but it would be the same in any vb-based code.
Avatar of velcrow

ASKER

thanks for the suggestion,  I'll look into it.