c# - Dot Net Offer Remote Assistance -
i have been attempting utilize unsolicited offer remote assistance function built windows within application months no success.
to clear, thesame functionality msra /offerra computername. expert can offer remote assistance novice without novice having create ticketstring manually. far aware accomplished using dcom communicate info using raserver , msra takes on actual connection. have confirmed can utilize msra /offerra computername functionlity there.
i have tried many api/dll's , still cannot figure out how offer remote assistence in offerra
i have trie next modules. axrdpcomapilib rdpcomapilib raserverlib rendezvoussessionlib
i have tried many different variations of code not possible post them here. need help know how utilize offerra functionality using windows remote assistance. not want crate peer peer application. application connect remote assistance on client computer using msra installed on computer microsoft.
any help appreciated.
attempted code1:
axrdpviewer viewer = new axrdpviewer(); viewer.begininit(); viewer.suspendlayout(); remoteassistancewindow.child = viewer; viewer.resumelayout(); viewer.endinit(); ((axrdpviewer)remoteassistancewindow.child).connect("dz0006", "mysecretusername", "mysecretpassword"); results:
a first chance exception of type 'system.argumentexception' occurred in axrdpcomapilib.dll
the programme '[4936] enterprise.vshost.exe: programme trace' has exited code 0 (0x0).
the programme '[4936] enterprise.vshost.exe' has exited code -1073741819 (0xc0000005) 'access violation'.
update 2:
rdpviewer viewer = new rdpviewer(); imrequestra request = new imrequestra(); request.setrendezvoussession(viewer); the thread 0x1c60 has exited code 259 (0x103).
the programme '[7520] enterprise.vshost.exe: programme trace' has exited code 0 (0x0).
the programme '[7520] enterprise.vshost.exe' has exited code -1073741819 (0xc0000005) 'access violation'.
remote assistance using msra exe , arguments.
here have designed class , form, , gives next functionalities,
offer remote assistance machine ask remote help. (invite help you)design form next controls,
textbox taking ip or computer name connect button 1. connect remote machine offering remote assistance button 2. inquire or invite help.code behind in form:
using system; using system.collections.generic; using system.componentmodel; using system.drawing; using system.text; using system.windows.forms; namespace remoteassist { public partial class frmconnect : form { public frmconnect() { initializecomponent(); } private void btnconnect_click(object sender, eventargs e) { remoteconnect remoteconnect = new remoteconnect(); boolean status = remoteconnect.startremoteassistance(txtcomputername.text.tostring(), true,false); if (status == false) { system.windows.forms.messagebox.show("unable connect remote machine.please seek 1 time again later."); } } private void btninvite_click(object sender, eventargs e) { remoteconnect remoteconnect = new remoteconnect(); boolean status; status = remoteconnect.startremoteassistance(txtcomputername.text.tostring(), false, true); if (status == false) { system.windows.forms.messagebox.show("unable found connection, please seek 1 time again later."); } } private void frmconnect_load(object sender, eventargs e) { } private void txtcomputername_textchanged(object sender, eventargs e) { txtcomputername.charactercasing = charactercasing.upper; } } } we have 2 buttons here , sending boolean variable class function differentiating between offer help , asking help.
code under class file : remoteconnect
using system; using system.collections.generic; using system.linq; using system.text; namespace remoteassist { class remoteconnect { public boolean startremoteassistance(string strmachinename, boolean offerhelp, boolean askforhelp) { system.diagnostics.process process = new system.diagnostics.process(); system.diagnostics.processstartinfo startinfo = new system.diagnostics.processstartinfo(); startinfo.windowstyle = system.diagnostics.processwindowstyle.maximized; startinfo.filename = "msra.exe"; // offer remote assitance if (offerhelp == true) { startinfo.arguments = "/offerra " + strmachinename; } //ask remote assistance if (askforhelp == true) { startinfo.arguments = "novice"; } seek { process.startinfo = startinfo; process.start(); homecoming true; } grab (exception ex) { //system.windows.forms.messagebox.show("error occured while trying connect" + ex.message); homecoming false; } } } } c# .net remote-desktop
No comments:
Post a Comment