Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COM Automation on a Remote User
Message
De
08/09/2011 07:25:28
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01522969
Message ID:
01522983
Vues:
36
I see. This will be much more difficult than initially thought since clients will have all sorts of firewall issues as I am thinking of a remote server under our control and users connecting to it via their own computers / laptops using RDP or Citrix or similar platforms. Thanks for the info so far.


>Jos,
>
>Remoting is possible, but...
>
>It works IF there's a direct network connection between the two machines and if security is configured properly. In Vista/Windows 7 remote access to DCOM components (like Office) is not allowed by default so you will have to set the machine level DCOM permissions to even allow access. Whether the server machine then finds your client is yet another story :-) Most likely you have to do this by IP address and it's very likely somewhere along the way a firewall (either outgoing from the TS machine or inbound for your client machine) will not allow the DCOM request through.
>
>DCOM is pretty finicky and getting connections to work is very tricky. If you work with known machines in a known environment then this can be overcome. But when you're dealing with external logons then things get a lot more tricky as each machine will have a different config.
>
>Further you need to figure out what machine you're actually connecting to - SYS(0) will not give you the right machine - that's the server. You need that information - IP address most likely - from the local machine which is not easily available (there might be an API call in the TS API for that though) and then the server needs to be able to tunnel back to that IP address and have access using hte various DCOM ports.
>
>DCOM is possible but it usually is a lot more difficult than it should be in my experience.
>
>Good luck,
>
>+++ Rick ---
>
>>Hi All,
>>
>>We have an application running on a server to which we allow users remote access via terminal services / remote desktop. Our application has a facility where it automate Excel to create and populate a spreadsheet with data. This is done via
>>
>>
>>  TOBJ_XLS = CREATEOBJECT( "Excel.Application" )
>>
>>
>>However, under terminal services / remote desktop this would instantiate Excel on the server and we obviously don't want that. We want the Excel to be instantiated on the client machine. Under VFP help I find this command:
>>
>>
>>  CREATEOBJECTEX(cCLSID | cPROGID, cComputerName [, cIID])
>>
>>
>>and, if I understand this correctly, it appears that this command can be used to instantiate an object reference to Excel on the user's machine. Is that right? If so, how do I determine the value of the parameters required? Does SYS(0) help me? Any advice very welcome.
>>
>>TIA
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform