Setting COM (RDPEncomAPI) property in Delphi -


i've used delphi time, trying com programming , having trouble. apologize if newbie issue, after searching trying lots of things have not been able or set properties of rdpencom rdpsession object. code (including several naive attemps) below. if remove line attempting read properties, remaining code works fine.

how can , set portid property of rdpsession.properties ?

uses rdpencomapi_tlb;  // jwapi  ...  myrdpsession := cordpsession.create(); if varisnull(myrdpsession) begin   application.messagebox('msrdpsession creation failed.', 'error');   result := false;   exit; end; try   didshare := myrdpsession.open; except   showmessage('unable share desktop !');   exit; end; theproperty := 'portid'; activexprop := myrdpsession.properties; //lvalues := activexprop.property_(theproperty); // method not supported //lvalues := activexprop.property(theproperty); // member not found myrdpsession.properties.getproperty(lvalues, myrdpsession.properties.property, theproperty); {  return invalid number of parameters..     activexprop.getproperty(lvalues, activexprop.property, 'portid');     activexprop.property.getproperty(activexprop.property, lvalues, 'portid');     activexprop.property.getproperty(lvalues, activexprop, 'portid');     activexprop.property.get_prop_('portid', activexprop);     activexprop.property.setproperty('portid', activexprop);     activexprop.property.set_prop_('portid', activexprop); } activexinvite := myrdpsession.invitations.createinvitation('remotesupport', 'wepresent', '12345', 75);  ... 

ken,

your comment put me onto something.. regenerated tlb file own machine , found did have property not in tlb used (from jedi project). 1 has single property called 'property' allowed me needed. missing com interface point. got work after updating tlb way (with no error checking yet):

// properties interface myrdpsessionprop := myrdpsession.properties; // set listening port myrdpsessionprop.property['portid'] := 59000; // set color depth myrdpsession.colordepth := 8; didshare := myrdpsession.open; 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -