Upload
others
View
16
Download
0
Embed Size (px)
Citation preview
Overview
TheSmartCodeViewerXVNCcontrolgivesdevelopersfullaccesstotheVNCViewerfeaturesusingasetofintuitiveActiveXpropertiesandmethods.WithViewerXcontrol,developerscaneasilyprovidescreensharingandremotecontrolcapabilitiestotheirapplications.
Features
AllfeaturesthatcanbefoundinastandardUltraVNC,TightVNCandRealVNCviewers
CanworkbehindHTTP/SOCKS5proxyservers
UltraVNCNTLMWindowsauthenticationmodesupport
UltraVNCSecureVNCv2.3andMSCR4v1.2DSMencryptionpluginssupport
UltraVNCRepeaterproxysupport
UltraVNCSingleClickserversupport
UltraVNCchatsupport
TightVNCv1.3andUltraVNCfiletransferssupport
CanconnecttoVNCserverinasynchronousmode
Benefits
CanbeusedfromanydevelopmentenvironmentwhichsupportsActiveX.
Availableinboth32and64-bitversions.
SupportsInternetProtocolversion6(IPv6).
Noruntimelibrarydependencies
Runtimeroyaltyfree
Supportedon
WindowsXP,Vista,Windows7,Windows8.1,WindowsServer2003,WindowsServer2008,WindowsServer2008R2,WindowsServer2012,WindowsServer2012R2
©2003-2015SmartCodeSolutions.Allrightsreserved.
Examples
GuidetoExamples
C#demonstratesusingViewerXcontrolina.NetWinFormsapplication.
VCdemonstratesusingViewerXcontrolinaMFCbasedapplication.HTMLdemonstratesusingViewerXcontrolfromwithinanHTMLpage.
©2003-2015SmartCodeSolutions.Allrightsreserved.
FrequentlyAskedQuestions
1.Whatdependenciesarethere?WhatversionoftheruntimedoIneed?
ViewerXcontrolfiledoesn'trequireanyVisualC++runtimelibraries.
2.Whatplatformsaresupported?
TheSmartCodeViewerXcontrolmaybeusedunderanyWindowsplatform,namelyWindowsXP,Vista,Windows7,WindowsServer2003,WindowsServer2008.
2.HowtodeployViewerXtomyWebserver?
YourwebpagehostingViewerXmightlooklikethesamplebelow:
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;>
<scriptlanguage="Javascript">
functionOnConnect(){
window.ViewerX.Connect()
}
</script>
</head>
<bodyonload="OnConnect()">
<objectCLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331"VIEWASTEXT>
<PARAMNAME="LPKPath"VALUE="scvncctrl.lpk">
</object>
<objectid="ViewerX"height="328"width="662"classid="CLSID:62FA83F7-20EC-4D62-AC86-BAB705EE1CCD"
CODEBASE="viewerx.cab">
<paramname="HostIP"value="192.168.1.139">
<paramname="Password"value="123">
</object>
</body>
</html>
Notefirst<object>tagentry.Donotdeleteit.ThisisMicrosoft'slicensemanager,whichprovidessupportforalicensedViewerXcontrol.Itusesscvncctrl.lpkfiletoreadinformationaboutViewerX
Support
Forfurtherinformation,visitusathttp://www.s-code.comorsendemailtosupport@s-code.com.Wearealwayshappytoansweryourquestions.
Ifyou'rehavingtroubleusingthecontrol,haveabugtoreport,orwishtosuggestanenhancementforafuturereleasesendemailtosupport@s-code.com.
©2003-2015SmartCodeSolutions.Allrightsreserved.
VersionHistory
SmartCodeViewerXVNCViewerversionhistory.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ViewerXControlRun-TimeLicenseTheSmartCodeViewerXVNCcontrolisprotectedwithadesignandrun-timelicensingsupport.Inordertousethecontrolinyourapplication,youmustinitializeitwiththefollowingrun-timelicensekeyvalue:scviewxlickey
©2003-2015SmartCodeSolutions.Allrightsreserved.
AutoReconnectContinueStateEnumeration
enumAutoReconnectContinueState
{
//Thereconnectionprocessisoccurringautomatically.
//ThisisthedefaultvalueoftheAutoReconnectContinueStateenumeration.
ARCS_CONTINUE=0,
//Thereconnectionprocesshasbeenstopped.
ARCS_STOP=1
};
©2003-2015SmartCodeSolutions.Allrightsreserved.
ColorDepthEnumeration
enumColorDepth
{
COLOR_FULL=0,
COLOR_256=1,//256colors
COLOR_64=2,//64colors
COLOR_8=3//8colors
};
©2003-2015SmartCodeSolutions.Allrightsreserved.
ConnectionProxyTypeEnumeration
enumConnectionProxyType
{
VPT_NONE=0,//Directconnection
VPT_SOCKS5=1,//SOCKS5(nopassword)
VPT_HTTP=2,//HTTPproxy(nopassword)
VPT_ULTRA_REPEATER=3//UltraVNCrepeater
VPT_SOCKS5_USRPWD=4,//SOCKS5(withpassword)
VPT_HTTP_BASIC=5//HTTPproxy(withpassword)
};
©2003-2015SmartCodeSolutions.Allrightsreserved.
CursorTrackingModeEnumeration
enumCursorMode
{
CM_TRACK_LOCALY=0,//Trackremotecursorlocally
CM_REMOTE_DEAL=1,//Letremoteserverdealwithmousecursor
CM_DONT_SHOW_REM=2//Don'tshowremotecursor
};
©2003-2015SmartCodeSolutions.Allrightsreserved.
CursorTrackingModeEnumeration
enumCursorTrackingMode
{
VCT_NO_CURSOR=0,
VCT_DOT_CURSOR=1,
VCT_NORMAL_CURSOR=2,
VCT_SMALL_CURSOR=3
};
©2003-2015SmartCodeSolutions.Allrightsreserved.
EncryptionPluginTypeEnumeration
enumEncryptionPluginType
{
EPT_NONE,//Plainconnection,noencryption
EPT_MSRC4,//UseMSRC4DSMplug-in
EPT_SECUREVNC//UseSecureVNCDSMplug-in
};
©2003-2015SmartCodeSolutions.Allrightsreserved.
ScreenStretchModeEnumeration
enumScreenStretchMode
{
SSM_NONE=0, //Screenstretchdisabled
SSM_FREE=1, //ResizetheremotescreenimagetofillViewerXcontroldimension,nomatterwhattheactualaspectratiois
SSM_ASPECT=2 //Scaletoaslargeanimageaspossible,butmaintainthecorrectaspectratio
};
©2003-2015SmartCodeSolutions.Allrightsreserved.
ScreenStretchRenderingQualityEnumeration
enumScreenStretchRenderingQuality
{
//ViewerXusesGDI(StretchBlt)todrawscaledscreenbitmap
SSQ_GDI=0,
//ViewerXusesGDI+todrawscaledscreenbitmap
//SetInterpolationMode(InterpolationModeHighQuality);
//SetSmoothingMode(SmoothingModeHighQuality);
SSQ_GDIPLUS_HIGH=1,
//ViewerXusesGDI+todrawscaledscreenbitmap
//SetInterpolationMode(InterpolationModeLowQuality);
//SetSmoothingMode(SmoothingModeHighSpeed);
SSQ_GDIPLUS_LOW=2,
};
©2003-2015SmartCodeSolutions.Allrightsreserved.
VNCEncodingEnumeration
enumVNCEncoding
{
RFB_RAW =0,
RFB_RRE =2,
RFB_CORRE =4,
RFB_HEXTILE=5,
RFB_ZLIB =6,
RFB_TIGHT =7,
RFB_ZLIBHEX =8,
RFB_ULTRA =9,
RFB_ZRLE =16,
RFB_ZYWRLE =17
};
©2003-2015SmartCodeSolutions.Allrightsreserved.
VncConnectionStateEnumeration
enumVncConnectionState
{
VCS_DISCONNECTED=0,
VCS_CONNECTED=1,
VCS_CONNECTING=2,
};
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer2::AltKeyPressedPropertySetsorretrievesthevalueindicatingwhetherAltkeyispressedattheVNCserverside.
Syntax
HRESULTISmartCodeVNCViewer2::get_AltKeyPressed(VARIANT_BOOL*pbPressed
HRESULTISmartCodeVNCViewer2::put_AltKeyPressed(VARIANT_BOOLbPressed
Parameters
pbAllowPointertoavariableoftypeVARIANT_BOOLthatreceivesAltkeystatus.
bAllowVARIANT_BOOLthatpressesordepressesAltkeyattheVNCserverside.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::AdvancedSettingsPropertyRetrievesaninstanceoftheIScVxAdvancedSettingsinterface.
Syntax
HRESULTISmartCodeVNCViewer::get_AdvancedSettings(IScVxAdvancedSettings**
Parameters
ppAdvSettingsAddressofthecurrentcontrol'sIScVxAdvancedSettingsinterface.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer3::CacheEncodingPropertySetsorretrievesthevalueindicatingwhetherCacheencodingisenabled.
Syntax
HRESULTISmartCodeVNCViewer3::get_CacheEncoding(VARIANT_BOOL*pbAllow
HRESULTISmartCodeVNCViewer3::put_CacheEncoding(VARIANT_BOOLbAllow
Parameters
pbAllowPointertoavariableoftypeVARIANT_BOOLthatreceivesCacheencodingstatus.
bAllowVARIANT_BOOLthatenablesordisablesCacheencoding.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ConnectedPropertyReturnsavalueindicatingwhetheraVNCcontrolisconnected.
Syntax
HRESULTISmartCodeVNCViewer::get_Connected(VARIANT_BOOL*pbConnected
Parameters
pbConnectedPointertoavariableoftypeVARIANT_BOOLthatpresentswhetheraVNCcontrolisconnected.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer3::ColorDepthPropertySetsorgetsthecolordepthofthescreenimage.
Syntax
HRESULTISmartCodeVNCViewer3::get_ColorDepth(ColorDepth*pnColorDepth
HRESULTISmartCodeVNCViewer3::put_ColorDepth(ColorDepthnColorDepth
Parameters
pnColorDepthPointertoavariableoftypeColorDepththatreceivesacolordepthofthescreenimage.
nColorDepthColorDepththatspecifiesacolordepththatshouldbeusedtodrawthescreenimage.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::CopyRectPropertySetsorretrievesthevalueindicatingwhetherCopyRectencodingisenabled.
Syntax
HRESULTISmartCodeVNCViewer::get_CopyRect(VARIANT_BOOL*pbAllow);
HRESULTISmartCodeVNCViewer::put_CopyRect(VARIANT_BOOLbAllow);
Parameters
pbAllowPointertoavariableoftypeVARIANT_BOOLthatreceivesCopyRectencodingstatus.
bAllowVARIANT_BOOLthatenablesordisablesCopyRectencoding.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ConnectingTextPropertyThismethodsetsorgetsthevalueoftheConnectingTextproperty,thetextthatappearscenteredinthecontrolwhilethecontrolisconnecting.
Syntax
HRESULTISmartCodeVNCViewer::get_ConnectingText(BSTR*pstrText);
HRESULTISmartCodeVNCViewer::put_ConnectingText(BSTRstrText);
Parameters
pstrTextPointertothevalueoftheConnectingTextproperty.
strTextBSTRthatspecifiesthestringvaluetheConnectingTextpropertyistobesetto.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
Remarks
Anexampleofconnectiontextis"Connectingtoserver...".Youcanuse%scombinationinyourtext.Itwillbereplacedwiththecurrentserveraddress.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::CustomCompressionPropertySetsorretrievesthevalueindicatingwhetherCustomCompressionisenabled.
Syntax
HRESULTISmartCodeVNCViewer::get_CustomCompression(VARIANT_BOOL*pbAllow
HRESULTISmartCodeVNCViewer::put_CustomCompression(VARIANT_BOOLbAllow
Parameters
pbAllowPointertoavariableoftypeVARIANT_BOOLthatreceivesCustomCompressionstatus.
bAllowVARIANT_BOOLthatenablesordisablesCustomCompressionencoding.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::CustomCompressionLevelPropertySetsorretrievescustomcompressionlevelusedduringconnectiontoVNCserver.
Syntax
HRESULTISmartCodeVNCViewer::get_CustomCompressionLevel(long*pnLevel
HRESULTISmartCodeVNCViewer::put_CustomCompressionLevel(longnLevel
Parameters
pnLevelPointertoavariableoftypelongthatreceivescustomcompressionlevel.
nLevellongthatspecifiescustomcompressionlevelusedduringconnectiontoVNCserver.Thevaluemustbeinrangefrom1to9.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer2::CtrlKeyPressedPropertySetsorretrievesthevalueindicatingwhetherCtrlkeyispressedattheVNCserverside.
Syntax
HRESULTISmartCodeVNCViewer2::get_CtrlKeyPressed(VARIANT_BOOL*pbPressed
HRESULTISmartCodeVNCViewer2::put_CtrlKeyPressed(VARIANT_BOOLbPressed
Parameters
pbAllowPointertoavariableoftypeVARIANT_BOOLthatreceivesCtrlkeystatus.
bAllowVARIANT_BOOLthatpressesordepressesCtrlkeyattheVNCserverside.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::DisableClipboardPropertySetsorreturnsavalueindicatingwhetherclipboard.
Syntax
HRESULTISmartCodeVNCViewer::get_DisableClipboard(VARIANT_BOOL*pbClip
HRESULTISmartCodeVNCViewer::put_DisableClipboard(VARIANT_BOOLbClip
Parameters
pbClipPointertoavariableoftypeVARIANT_BOOLthatreceivesclipboardtransferstatus.
bClipVARIANT_BOOLthatenablesordisablesclipboardtransfer.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::DisconnectedTextPropertyThismethodsetsorgetsthevalueoftheDisconnectedTextproperty,thetextthatappearscenteredinthecontrolwhilethecontrolisindisconnected.
Syntax
HRESULTISmartCodeVNCViewer::get_DisconnectedText(BSTR*pstrText);
HRESULTISmartCodeVNCViewer::put_DisconnectedText(BSTRstrText);
Parameters
pstrTextPointertothevalueoftheDisconnectedTextproperty.
strTextBSTRthatspecifiesthestringvaluetheDisconnectedTextpropertyistobesetto.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
Remarks
Anexampleofconnectiontextis"SmartCodeVNCViewer-Disconnected".
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::EmulateThreeButtonPropertySetsorretrievesthevalueindicatingwhether3mousebuttonemulationisenabled.
Syntax
HRESULTISmartCodeVNCViewer::get_EmulateThreeButton(VARIANT_BOOL*
HRESULTISmartCodeVNCViewer::put_EmulateThreeButton(VARIANT_BOOLbEmulate
Parameters
pbEmulatePointertoavariableoftypeVARIANT_BOOLthatreceives3mousebuttonemulationstatus.
bEmulateVARIANT_BOOLthatenablesordisables3mousebuttonemulation.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer3::EnableAutoReconnectPropertySpecifieswhethertoenabletheclientcontroltoreconnectautomaticallytoasessionintheeventofanetworkdisconnection.
Syntax
HRESULTISmartCodeVNCViewer2::get_EnableAutoReconnect(VARIANT_BOOL*
HRESULTISmartCodeVNCViewer2::put_EnableAutoReconnect(VARIANT_BOOL
Parameters
pbEnablePointertoavariableoftypeVARIANT_BOOLthatreceivestheautomaticreconnectionstatus:VARIANT_TRUEtoenableandVARIANT_FALSEotherwise.
bEnableSettoVARIANT_TRUEtoenableautomaticreconnection,andtoVARIANT_FALSEtodisableit.ThedefaultisVARIANT_TRUE.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::EncodingPropertySetsorreturnsanencodingusedtoconnecttoserver.
Syntax
HRESULTISmartCodeVNCViewer::get_Encoding(VNCEncoding*pnEncoding);
HRESULTISmartCodeVNCViewer::put_Encoding(VNCEncodingnEncoding);
Parameters
pnEncodingPointertoavariableoftypeVNCEncodingthatreceivesanencodingusedtoconnecttoserver.
nEncodingVNCEncodingthatspecifiesconnectionencoding.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer3::EncryptionPluginProperty
Thispropertyallowsyoutospecifytheencryptionalgorithm(yourchoicesincludenoencryption,MSRC4,orSecureVNCDSMplug-ins).
SyntaxHRESULTISmartCodeVNCViewer3::get_EncryptionPlugin(EncryptionPluginType*
HRESULTISmartCodeVNCViewer3::put_EncryptionPlugin(EncryptionPluginType
SeeAlsoEncryptionPluginType
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::FullScreenPropertySetsorretrievesavalueindicatingwhetherthecontrolisinfull-screenmode.
Syntax
HRESULTISmartCodeVNCViewer::get_FullScreen(VARIANT_BOOL*pbFull);
HRESULTISmartCodeVNCViewer::put_FullScreen(VARIANT_BOOLbFull);
Parameters
pbFullPointertoavariableoftypeVARIANT_BOOLthatreceivesfullscreenattribute.
bFullVARIANT_BOOLthatenablesordisablesafullscreenmode.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::HostIPPropertySetsorretrievestheremoteVNCserveraddress.
Syntax
HRESULTISmartCodeVNCViewer::get_HostIP(BSTR*pstrHostIP);
HRESULTISmartCodeVNCViewer::put_HostIP(BSTRstrHostIP);
Parameters
pstrHostIPPointertoavariableoftypeBSTRthatreceivestheaddressoftargetVNCserver.
strHostIPBSTRthatspecifiestheaddressoftargetVNCserver.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::JPEGCompressionPropertySetsorretrievesthevalueindicatingwhetherJPEGcompressionisenabled.
Syntax
HRESULTISmartCodeVNCViewer::get_JPEGCompression(VARIANT_BOOL*pbAllow
HRESULTISmartCodeVNCViewer::put_JPEGCompression(VARIANT_BOOLbAllow
Parameters
pbAllowPointertoavariableoftypeVARIANT_BOOLthatreceivesJPEGcompressionstatus.
bAllowVARIANT_BOOLthatenablesordisablesJPEGcompressionencoding.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::JPEGCompressionLevelPropertySetsorretrievescustomcompressionlevelusedduringconnectiontoVNCserver.
Syntax
HRESULTISmartCodeVNCViewer::get_JPEGCompressionLevel(long*pnLevel
HRESULTISmartCodeVNCViewer::put_JPEGCompressionLevel(longnLevel);
Parameters
pnLevelPointertoavariableoftypelongthatreceivesJPEGcompressionlevel.
nLevellongthatspecifiesJPEGcompressionlevelusedduringconnectiontoVNCserver.Thevaluemustbeinrangefrom0to9.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ListeningPropertyReturnsavalueindicatingwhetheraVNCcontrolislisteningforincomingVNCserverconnections.
Syntax
HRESULTISmartCodeVNCViewer::get_Listening(VARIANT_BOOL*pbListening
Parameters
pbConnectedPointertoavariableoftypeVARIANT_BOOLthatрrepresentswhetheraVNCcontrolislisteningforconnections.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ListeningTextPropertyThismethodsetsorgetsthevalueoftheListeningTextproperty,thetextthatappearscenteredinthecontrolwhilethecontrolislisteningforserverconnections.
Syntax
HRESULTISmartCodeVNCViewer::get_ListeningText(BSTR*pstrText);
HRESULTISmartCodeVNCViewer::put_ListeningText(BSTRstrText);
Parameters
pstrTextPointertothevalueoftheListeningTextproperty.
strTextBSTRthatspecifiesthestringvaluetheListeningTextpropertyistobesetto.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
Remarks
Anexampleofconnectiontextis"Listeningforincomingconnections...".Youcanuse%icombinationinyourtext.Itwillbereplacedwiththecurrentlisteningportvalue.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ListenPortPropertyGetsorsetstheporttousewhenViewerXislisteningforincomingVNCserverconnections.
Syntax
HRESULTISmartCodeVNCViewer::get_ListenPort(long*pnPort);
HRESULTISmartCodeVNCViewer::put_ListenPort(longnPort);
Parameters
pnPortPointertoavariableoftypelongthatreceivestheportViewerXislistensforincomingconnections.
nPortlongthatspecifiestheporttolistenforincomingconnections.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::LocalCursorPropertySetsorretrievesmousecursorhandlingmode.
Syntax
HRESULTISmartCodeVNCViewer::get_LocalCursor(CursorTrackingMode*pnTrack
HRESULTISmartCodeVNCViewer::put_LocalCursor(CursorTrackingModenTrack
Parameters
pnTrackPointertoavariableoftypeCursorTrackingModethatreceivesmousecursorhandlingmode.
nTrackCursorTrackingModethatspecifiesmousecursorhandlingmode.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::MessageBoxesPropertySetsorretrievesavalueindicatingwhetherthecontrolwouldshowanymessageboxes.
Syntax
HRESULTISmartCodeVNCViewer::get_MessageBoxes(VARIANT_BOOL*pbMsg);
HRESULTISmartCodeVNCViewer::put_MessageBoxes(VARIANT_BOOLbMsg);
Parameters
pbMsgPointertoavariableoftypeVARIANT_BOOLthatreceivesmessageboxesmodeattribute.
bMsgVARIANT_BOOLthatenablesordisablesmessageboxesmode.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::MouseCursorModePropertySetsorretrievesmousecursorhandlingmode.
Syntax
HRESULTISmartCodeVNCViewer::get_MouseCursorMode(CursorMode*pnMode
HRESULTISmartCodeVNCViewer::put_MouseCursorMode(CursorModenMode);
Parameters
pnModePointertoavariableoftypeCursorModethatreceivesmousecursorhandlingmode.
nModeCursorModethatspecifiesmousecursorhandlingmode.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::MsDomainPropertySetsorretrievesdomainnameusedforWindowsNTLMauthentication.
Syntax
HRESULTISmartCodeVNCViewer::get_MsDomain(BSTR*pstrDomain);
HRESULTISmartCodeVNCViewer::put_MsDomain(BSTRstrDomain);
Parameters
pstrDomainPointertoavariableoftypeBSTRthatreceivesdomainname.
strDomainBSTRthatspecifiesdomainname.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::MsPasswordPropertySetsorretrievesuserpasswordusedforWindowsNTLMauthentication.
Syntax
HRESULTISmartCodeVNCViewer::get_MsPassword(BSTR*pstrPassword);
HRESULTISmartCodeVNCViewer::put_MsPassword(BSTRstrPassword);
Parameters
pstrPasswordPointertoavariableoftypeBSTRthatreceivesWindowsuserpassword.
strPasswordBSTRthatspecifiesWindowsuserpassword.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::MsUserPropertySetsorretrievesusernameusedforWindowsNTLMauthentication.
Syntax
HRESULTISmartCodeVNCViewer::get_MsUser(BSTR*pstrUser);
HRESULTISmartCodeVNCViewer::put_MsUser(BSTRstrUser);
Parameters
pstrUserPointertoavariableoftypeBSTRthatreceivesWindowsusername.
strUserBSTRthatspecifiesWindowsusername.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer3::OuterBackgroundColorPropertySetstheouterbackgroundcolor.ThisbackgroundcolorisusedtopaintthebackgroundwhentheViewerXsizeislargerthantheremotescreen.BydefaulttheCOLOR_APPWORKSPACEsystemcolorisusedtopainttheouterbackground.
Syntax
HHRESULTISmartCodeVNCViewer3::get_OuterBackgroundColor(COLORREF*
HHRESULTISmartCodeVNCViewer3::put_OuterBackgroundColor(COLORREFcrColor
Parameters
pcrColorPointertoavariableoftypelongthatreceivesRGBcolorvalueusedtopainttheouterbackgroundarea.
crColorlongthatspecifiestheRGBcolortousepainttheouterbackgroundarea.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::PasswordPropertyGetsorsetsthepasswordtousewhenauthenticatingtheclientagainstVNCserver.
Syntax
HRESULTISmartCodeVNCViewer::get_Password(BSTR*pstrPassword);
HRESULTISmartCodeVNCViewer::put_Password(BSTRstrPassword);
Parameters
pstrPasswordPointertoavariableoftypeBSTRthatreceivesthepassword.
strPasswordBSTRthatspecifiesthepasswordtousewhenauthenticatingtheclient.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::PortPropertyGetsorsetstheporttousewhenconnectingtoVNCserver.
Syntax
HRESULTISmartCodeVNCViewer::get_Port(long*pnPort);
HRESULTISmartCodeVNCViewer::put_Port(longnPort);
Parameters
pnPortPointertoavariableoftypelongthatreceivestheportoftargetVNCserver.
nPortlongthatspecifiestheportofVNCserver.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ProxyIPPropertySetsorretrievestheproxyserveraddresstousewhenconnectingtoaVNCserver.
Syntax
HRESULTISmartCodeVNCViewer::get_ProxyIP(BSTR*pstrProxyIP);
HRESULTISmartCodeVNCViewer::put_ProxyIP(BSTRstrProxylIP);
Parameters
pstrProxyIPPointertoavariableoftypeBSTRthatreceivestheaddressofaproxyserver.
strProxyIPBSTRthatspecifiestheaddressofaproxyserver.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ProxyPasswordPropertyGetsorsetsthepasswordtousewhenauthenticatingtheclientagainstproxyserver.
Syntax
HRESULTISmartCodeVNCViewer::get_ProxyPassword(BSTR*pstrPassword);
HRESULTISmartCodeVNCViewer::put_ProxyPassword(BSTRstrPassword);
Parameters
pstrPasswordPointertoavariableoftypeBSTRthatreceivesthepassword.
strPasswordBSTRthatspecifiesthepasswordtousewhenauthenticatingtheclient.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ProxyTypePropertySetsorreturnsantypeofproxyserver.
Syntax
HRESULTISmartCodeVNCViewer::get_ProxyType(ConnectionProxyType*pType
HRESULTISmartCodeVNCViewer::put_ProxyType(ConnectionProxyTypetype
Parameters
ptypePointertoavariableoftypeConnectionProxyTypethatreceivesthetypeofproxyserver.
typeConnectionProxyTypethatspecifiesproxyservertype.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ProxyUserPropertySetsorretrievesusernameusedtoauthenticateagainstproxyserver.
Syntax
HRESULTISmartCodeVNCViewer::get_ProxyUser(BSTR*pstrUser);
HRESULTISmartCodeVNCViewer::put_ProxyUser(BSTRstrUser);
Parameters
pstrUserPointertoavariableoftypeBSTRthatreceivesusername.
strUserBSTRthatspecifiesproxyserverusername.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::RequestSharedSessionPropertySetsorretrievesthevalueindicatingwhether"requestsharedsession"modeisenabled.
Syntax
HRESULTISmartCodeVNCViewer::get_RequestSharedSession(VARIANT_BOOL*
HRESULTISmartCodeVNCViewer::put_RequestSharedSession(VARIANT_BOOL
Parameters
pbSharedPointertoavariableoftypeVARIANT_BOOLthatreceives"requestsharedsession"modestatus.
bSharedVARIANT_BOOLthatenablesordisables"requestsharedsession"mode.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer2::RemoteInputEnabledPropertyEnablesordisablesremoteinput.UltraVNCserverspecificfeature.
Syntax
HRESULTISmartCodeVNCViewer2::get_RemoteInputEnabled(VARIANT_BOOL*
HRESULTISmartCodeVNCViewer2::put_RemoteInputEnabled(VARIANT_BOOL
Parameters
pbEnablePointertoavariableoftypeVARIANT_BOOLthatreceivesremoteinputstatus.
bEnableVARIANT_BOOLthatenablesordisablesremoteinput.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::RestrictPixelPropertyDeprected:UsetheColorDepthpropertyinstead!
Setsorretrievesthevalueindicatingwhether"restrictpixel",inotherwords8-bitcolormodeisenabled.
Syntax
HRESULTISmartCodeVNCViewer::get_RestrictPixel(VARIANT_BOOL*pbRestrict
HRESULTISmartCodeVNCViewer::put_RestrictPixel(VARIANT_BOOLbRestrict
Parameters
pbRestrictPointertoavariableoftypeVARIANT_BOOLthatreceives8-bitcolormodestatus.
bRestrictVARIANT_BOOLthatenablesordisables8-bitcolormode.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ScaleDenPropertySetsorretrievesscaledenumeratorvalue.
Syntax
HRESULTISmartCodeVNCViewer::get_ScaleDen(long*pnScale);
HRESULTISmartCodeVNCViewer::put_ScaleDen(longnScale);
Parameters
pnScalePointertoavariableoftypelongthatreceivesthescaledenumeratorvalue.
nScalelongthatspecifiesthescaledenumeratorvalue.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ScaleEnablePropertySetsorretrievesstatusofthestandardVNCviewerscreenscalingmode.
Syntax
HRESULTISmartCodeVNCViewer::get_ScaleEnable(VARIANT_BOOL*pbScale
HRESULTISmartCodeVNCViewer::put_ScaleEnable(VARIANT_BOOLbScale);
Parameters
pbScalePointertoavariableoftypeVARIANT_BOOLthatscreenscalingstatus.
bScaleVARIANT_BOOLthatenablesordisablesscreenscaling.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ScaleNumPropertySetsorretrievesscalenumeratorvalue.
Syntax
HRESULTISmartCodeVNCViewer::get_ScaleNum(long*pnScale);
HRESULTISmartCodeVNCViewer::put_ScaleNum(longnScale);
Parameters
pnScalePointertoavariableoftypelongthatreceivesthescalenumeratorvalue.
nScalelongthatspecifiesthescalenumeratorvalue.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ScreenBitmapPropertyReturnsHBITMAPhandleofthescreenbitmap.
Syntax
HRESULTISmartCodeVNCViewer::get_ScreenBitmap(long*pnScreenBitmapHandle
Parameters
pnScreenBitmapHandlePointertoavariableoftypelongthatreceivesHBITMAPhandleofthescreenbitmap.
Remarks
YoumustnotdeletethebitmaphandlereturnedbytheScreenBitmapproperty.ThishandleisusedbyViewerXandmustn'tbemodifiedbythehostingapplication.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ScreenHeightPropertyRetrievesheightofremotescreen.
Syntax
HRESULTISmartCodeVNCViewer::get_ScreenHeight(long*pnScreenHeight
Parameters
pnScreenHeightPointertoavariableoftypelongthatreceivesheightofremotescreen.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ScreenWidthPropertyRetrieveswidthofremotescreen.
Syntax
HRESULTISmartCodeVNCViewer::get_ScreenWidth(long*pnScreenWidth);
Parameters
pnScreenWidthPointertoavariableoftypelongthatreceiveswidthofremotescreen.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::StretchModePropertySetsorreturnsaclientsidescreenstretchingmode.
Syntax
HRESULTISmartCodeVNCViewer::get_StretchMode(ScreenStretchMode*pmode
HRESULTISmartCodeVNCViewer::put_StretchMode(ScreenStretchModemode
Parameters
pmodePointertoavariableoftypeScreenStretchModethatreceivesscreenstretchingmode.
modeScreenSrtetchModethatspecifiesscreenstretchingmode.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer3::ScreenStretchRenderingQualityPropertySetsorreturnsaclientsidescreenstretchingmode.
Syntax
HRESULTISmartCodeVNCViewer3::get_ScreenStretchRenderingQuality(ScreenStretchRenderingQuality
HRESULTISmartCodeVNCViewer3::put_ScreenStretchRenderingQuality(ScreenStretchRenderingQuality
Parameters
qualityScreenStretchRenderingQualitythatspecifiesscreenstretchingrenderingengineusedtoscaletheremotescreenbitmap.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::SwapMouseButtonsPropertySetsorretrievesthevalueindicatingwhethermousebuttonsswappingisenabled.
Syntax
HRESULTISmartCodeVNCViewer::get_SwapMouseButtons(VARIANT_BOOL*pbSwap
HRESULTISmartCodeVNCViewer::put_SwapMouseButtons(VARIANT_BOOLbSwap
Parameters
pbSwapPointertoavariableoftypeVARIANT_BOOLthatreceivesmousebuttonswappingstatus.
bSwapVARIANT_BOOLthatenablesordisablesmousebuttonswapping.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::TopLevelParentPropertySetsorretrievesHWNDhandleuseasaparentwindowforViewerXmessageboxesanddialogs.
Syntax
HRESULTISmartCodeVNCViewer::get_TopLevelParent(long*phParent);
HRESULTISmartCodeVNCViewer::put_TopLevelParent(longhParent);
Parameters
phParentPointertoavariableoftypelongthatreceivestheaddressoftargetVNCserver.
hParentlongthatspecifiestheaddressoftargetVNCserver.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer3::UltraVNCSecurity_MSRC4PropertyRetrievesaninstanceoftheIScVxUltraSecurity_MSRC4interface.TheinterfaceallowsdeveloperstocontrolUltraVNCMSRC4DSMencryptionplug-inrelatedsettings.
Syntax
HRESULTISmartCodeVNCViewer3::get_UltraVNCSecurity_MSRC4(IScVxUltraSecurity_MSRC4**
Parameters
ppSecurityAddressofthecurrentcontrol'sIScVxUltraSecurity_MSRC4interface.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer3::UltraVNCSecurity_SecureVNCPropertyRetrievesaninstanceoftheIScVxUltraSecurity_SecureVNCinterface.TheinterfaceallowsdeveloperstocontrolUltraVNCSecureVNCDSMencryptionplug-inrelatedsettings.
Syntax
HRESULTISmartCodeVNCViewer3::get_UltraVNCSecurity_SecureVNC(IScVxUltraSecurity_SecureVNC**
Parameters
ppSecurityAddressofthecurrentcontrol'sIScVxUltraSecurity_SecureVNCinterface.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ViewOnlyPropertySetsorretrievesthevalueindicatingwhether"viewmode"modeisenabled.
Syntax
HRESULTISmartCodeVNCViewer::get_ViewOnly(VARIANT_BOOL*pbViewOnly
HRESULTISmartCodeVNCViewer::put_ViewOnly(VARIANT_BOOLbViewOnly);
Parameters
pbViewOnlyPointertoavariableoftypeVARIANT_BOOLthatreceives"viewmode"modestatus.
bViewOnlyVARIANT_BOOLthatenablesordisables"viewmode"mode.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ConnectFunctionInitiatesaconnectionusingthepropertiescurrentlysetonthecontrol.
Syntax
HRESULTISmartCodeVNCViewer::Connect();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
Remarks
Theonlyrequiredpropertyistheserveraddress.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ConnectExFunctionInitiatesaconnectiontotheVNCserver.
Syntax
HRESULTISmartCodeVNCViewer::ConnectEx(BSTRstrIP,longnPort,BSTR
Parameters
strIPVNCserverIPaddressorhostname.
nPortConnectionport.
strPasswordPasswordusedforVNCserverauthentication.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ConnectAsyncFunctionInitiatesanasynchronousconnectionusingthepropertiescurrentlysetonthecontrol.
Syntax
HRESULTISmartCodeVNCViewer::ConnectAsync();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
Remarks
Theonlyrequiredpropertyistheserveraddress.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ConnectAsyncExFunctionInitiatesanasynchronousconnectiontotheVNCserver.
Syntax
HRESULTISmartCodeVNCViewer::ConnectAsyncEx(BSTRstrIP,longnPort,
Parameters
strIPVNCserverIPaddressorhostname.
nPortConnectionport.
strPasswordPasswordusedforVNCserverauthentication.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::DisconnectFunctionDisconnectstheactiveconnection.
Syntax
HRESULTISmartCodeVNCViewer::Disconnect();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::GetConnectionStateFunctionReturnsstateofactiveconnection.
Syntax
HRESULTISmartCodeVNCViewer::GetConnectionState(VncConnectionState
Parameters
pConStatePointertoavariableoftypeVncConnectionStatethatreceivesactiveconnectionstate.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::GetScreenBitmapScaledFunction
ResizesthescreenimagetothespecifiedwidthandheightandreturnsHBITMAPhandleofthescaledbitmap.
SyntaxHRESULTISmartCodeVNCViewer::GetScreenBitmapScaled(long
ParametersnWigth
Widthofthescalledbitmapinpixels.nHeight
Heightofthescalledbitmapinpixels.phBitmapHandle
PointertoavariableoftypelongthatreceivesHBITMAPhandleofthescalledbitmap.
RemarksYouareresponsiblefordeletingtheHBITMAPhandlereturnedbytheGetScreenBitmapScaledmethod.YoumustreleasethishandleusingtheGDIDeleteObjectmethod.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ListenFunctionTellsViewerXtostartlistenforincomingVNCserverconnections.
Syntax
HRESULTISmartCodeVNCViewer::Listen();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
Remarks
TheonlyrequiredpropertyisalisteningVNCport.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ListenExFunctionTellsViewerXtostartlistenforincomingVNCserverconnections.
Syntax
HRESULTISmartCodeVNCViewer::ListenEx(longnListeingPort);
Parameters
nPortPorttolistenforincomingconnections.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer2::OpenChatFunctionOpensVNCchatwindow.AtthemomentonlyUltraVNCchatissupported.
Syntax
HRESULTISmartCodeVNCViewer2::OpenChat();
Remarks
YoucanuseIScVxCapabilities::ChatpropertytocheckiftheremoteVNCserversupportsVNCchatfeature.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer2::OpenFileTransferFunctionOpensVNCfiletransferwindow.ThisfeatureworkswithTightVNCv1.3andUltraVNCbasedserversonly.
Syntax
HRESULTISmartCodeVNCViewer2::OpenFileTransfer();
Remarks
YoucanuseIScVxCapabilities::FileTransferpropertytocheckiftheremoteVNCserversupportsVNCfiletransferfeature.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::RequestRefreshFunctionRequestsfullscreenrefresh.
Syntax
HRESULTISmartCodeVNCViewer::RequestRefresh();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::SendCADFunctionSendCtrl+Alt+DelkeystroketotheVNCserver.
Syntax
HRESULTISmartCodeVNCViewer::SendCAD();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer2::SelectSingleWindowFunctionSelectssinglewindowforbroadcastingbyaremoteUltraVNCserver.
Syntax
HRESULTISmartCodeVNCViewer2::SelectSingleWindow(VARIANT_BOOLbSelect
Parameters
bSelectIfbSelectequalsTRUE,ViewerXchangesto'selectsinglewindowmode'andswitchsbacktonormalmodeafteruserselectawindow.IfbSelectequalsFALSE,thenthewholeremotedesktopwillbeshown.
Remarks
YoucanuseIScVxCapabilities::SelectSingleWindowpropertytocheckiftheremoteVNCserversupportsswitchingbetweenmonitors.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer2::SendCtrlEsqFunctionSendCtrl+EsqkeystroketotheVNCserver.
Syntax
HRESULTISmartCodeVNCViewer2::SendCtrlEsq();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer2::SendCustomKeyFunctionSendsakeycodetoaremoteserver.
Syntax
HRESULTISmartCodeVNCViewer2::SendCustomKey(longlKeyCode);
Parameters
lKeyCodeKeycodeofakeycombination,whichwillbesenttoserver.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer2::SendCustomKeyExFunctionSendskeyuporkeydownnotificationstoaremoteVNCserver.
Syntax
HRESULTISmartCodeVNCViewer2::SendCustomKeyEx(longlKeyCode,VARIANT_BOOL
Parameters
lKeyCodeSpecifiesthescancodeofthekey,whichwillbesenttoserver.
bKeyDownEventVARIANT_TRUE-keydownevent,VARIANT_FALSE-keyupevent.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
Remarks
ThetablebelowliststhescancodessupportedbyWindowsVNCservers.NOTE:Thislistmaybeincomplete.PleaserefertothefollowingdocumentformoreinformationaboutWindowskeyboardscancodes:http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc
XK_VoidSymbol 0xFFFFFFXK_space 0x020XK_BackSpace 0xFF08XK_Tab 0xFF09XK_Linefeed 0xFF0A
XK_Clear 0xFF0BXK_Return 0xFF0DXK_Pause 0xFF13XK_Scroll_Lock 0xFF14XK_Sys_Req 0xFF15XK_Escape 0xFF1BXK_Delete 0xFFFFXK_Print 0xFF61XK_dead_grave 0xFE50XK_dead_acute 0xFE51XK_dead_circumflex 0xFE52XK_dead_tilde 0xFE53XK_dead_diaeresis 0xFE57XK_Home 0xFF50XK_Left 0xFF51XK_Up 0xFF52XK_Right 0xFF53XK_Down 0xFF54XK_Page_Up 0xFF55XK_Page_Down 0xFF56XK_End 0xFF57XK_Begin 0xFF58XK_Select 0xFF60XK_Print 0xFF61XK_Execute 0xFF62XK_Insert 0xFF63XK_Cancel 0xFF69XK_Help 0xFF6AXK_Break 0xFF6BXK_Num_Lock 0xFF7FXK_KP_Space 0xFF80XK_KP_Tab 0xFF89
XK_KP_Enter 0xFF8DXK_KP_Home 0xFF95XK_KP_Left 0xFF96XK_KP_Up 0xFF97XK_KP_Right 0xFF98XK_KP_Down 0xFF99XK_KP_Prior 0xFF9AXK_KP_Page_Up 0xFF9AXK_KP_Next 0xFF9BXK_KP_Page_Down 0xFF9BXK_KP_End 0xFF9CXK_KP_Begin 0xFF9DXK_KP_Insert 0xFF9EXK_KP_Delete 0xFF9FXK_KP_Equal 0xFFBDXK_KP_Multiply 0xFFAAXK_KP_Add 0xFFABXK_KP_Separator 0xFFACXK_KP_Subtract 0xFFADXK_KP_Decimal 0xFFAEXK_KP_Divide 0xFFAFXK_KP_0 0xFFB0XK_KP_1 0xFFB1XK_KP_2 0xFFB2XK_KP_3 0xFFB3XK_KP_4 0xFFB4XK_KP_5 0xFFB5XK_KP_6 0xFFB6XK_KP_7 0xFFB7XK_KP_8 0xFFB8XK_KP_9 0xFFB9XK_F1 0xFFBE
XK_F2 0xFFBFXK_F3 0xFFC0XK_F4 0xFFC1XK_F5 0xFFC2XK_F6 0xFFC3XK_F7 0xFFC4XK_F8 0xFFC5XK_F9 0xFFC6XK_F10 0xFFC7XK_F11 0xFFC8XK_F12 0xFFC9XK_F13 0xFFCAXK_F14 0xFFCBXK_F15 0xFFCCXK_F16 0xFFCDXK_F17 0xFFCEXK_F18 0xFFCFXK_F19 0xFFD0XK_F20 0xFFD1XK_F21 0xFFD2XK_F22 0xFFD3XK_F23 0xFFD4XK_F24 0xFFD5XK_Shift_L 0xFFE1XK_Shift_R 0xFFE2XK_Control_L 0xFFE3XK_Control_R 0xFFE4XK_Caps_Lock 0xFFE5XK_Shift_Lock 0xFFE6XK_Meta_L 0xFFE7XK_Meta_R 0xFFE8XK_Alt_L 0xFFE9
XK_Alt_R 0xFFEA
Example
TheexamplebelowshowshowtosendCtrl+Alt+DelcombinationtoaremoteVNCserver:viewerX.SendCustomKeyEx(65507,true);
viewerX.SendCustomKeyEx(65513,true);
viewerX.SendCustomKeyEx(65535,true);
viewerX.SendCustomKeyEx(65535,false);
viewerX.SendCustomKeyEx(65513,false);
viewerX.SendCustomKeyEx(65507,false);
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::SetDormantFunctionSetsadormantmode.Whenthecontrolisinadormantmode,noscreenupdateswillbesendfromserver.
Syntax
HRESULTISmartCodeVNCViewer::SetDormant(VARIANT_BOOLbDormant);
Parameters
bDormantEnablesordisablesdormantmode.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ShowConnectionInfoFunctionShowsadialogboxwithaninformationaboutactiveconnection.
Syntax
HRESULTISmartCodeVNCViewer::ShowConnectionInfo();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::StopListenFunctionCancelslisteningVNCviewermode.
Syntax
HRESULTISmartCodeVNCViewer::StopListen();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer2::SwitchMultiMonitorFunctionAllowstoswitchbetweenmonitorsiftheremoteUltraVNCserverrunsonacomputerswithmultiplemonitorsattached.
Syntax
HRESULTISmartCodeVNCViewer2::SwitchMultiMonitor();
Remarks
YoucanuseIScVxCapabilities::SwitchMultiMonitorpropertytocheckiftheremoteVNCserversupportsswitchingbetweenmonitors.
ReturnValue
ReturnValuernsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::AuthenticationFailedEventFiredincaseifViewerXhasfailedtoauthenticatewithVNCserver.Thecallercanusethiseventosuppressthedefaultpasswordpromptdialogboxaswellasthe"authenticationfailed"messagebox.
Syntax
HRESULTAuthenticationFailed(VARIANT_BOOL*pbCancelAndDontPromptForPassword
Parameters
pbCancelAndDontPromptForPasswordPointertoavariableoftypeVARIANT_BOOL*thatallowsthecancellationofthedefaultpasswordpromptdialog.IfVARIANT_TRUE,thepassworddialogandthe"authenticationfailed"messageboxesaresuppressed;VARIANT_FALSEallowsthosedialogboxestobedisplayed.Defaultvalue:VARIANT_FALSE
Remarks
IfattempttoestablishconnectionwasperformedusingasynchronousconnectionwitheitherConnectAsync()orConnectAsyncEx()methods,thentheeventsinkcallbackfunctionwillbeexecutedinthenon-GUIthread.
Donotattempttore-establishaconnectioninsidetheAuthenticationFailedeventsinkcallbackfunctionbody.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ConnectedEventFiredwhenconnectionwithserverhasbeenestablished.
Syntax
HRESULTConnected();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ConnectingEventCalledwhentheclientcontrolbeginsconnectingtoaserverinresponsetoacalltoISmartCodeVNCViewer::ConnectAsyncorISmartCodeVNCViewer::ConnectAsyncEx.
Syntax
HRESULTConnecting();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ConnectionAcceptedEventFiredwhenlisteningviewerhasacceptedconnectionfromaVNCserver.
Syntax
HRESULTConnectionAccepted(BSTRstrServerAddress);
Parameters
strServerAddressBSTRthatspecifiesaddressofremoteVNCserverconnectedtotheVNCcontrol.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::DisconnectedEventCalledwhentheclientcontrolhasbeendisconnectedfromtheVNCserver.
Syntax
HRESULTDisconnected();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::OnAutoReconnectingEventFiredwhenaclientisintheprocessofautomaticallyreconnectingtoaVNCserver.
Syntax
HRESULTOnAutoReconnecting(longattemptCount,enumAutoReconnectContinueState*
Parameters
attemptCountNumberofattemptsthathavebeenmadeinthecurrentautomaticreconnectionprocess.Thiscountincreasesbyoneforeachattemptmade.
pArcContinueStatusPointertoareturnedcodeoftypeAutoReconnectContinueStatespecifyingthestateoftheautomaticreconnectionprocess.Thiscodecanberesettochangethestateofthecurrentautomaticreconnectionprocess.
Value
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
Remarks
ImplementthismethodinyoureventsinktoreceivenotificationthatthecontrolisreestablishingaconnectionwithaVNCserver.
WhenthestateoftheautomaticreconnectionprocessischangedbysettingthevalueofthepArcContinueStatusparametertoARCS_CONTINUE,thismethodfunctionsinapurelyadvisorymode.Containerscanlistentothiseventfornotificationsthattheautomaticreconnectionprocessisproceeding.Thecontrolwillautomatically
keeptryingtore-establishaconnectionbasedonitsowninternaltimingandattemptcounts.Thismethodiscalledduringeachautomaticreconnectionattemptinordertonotifythecontainer.
WhenthestateoftheautomaticreconnectionprocessischangedbysettingthevalueofthepArcContinueStatusparametertoARCS_STOP,thecurrentautomaticreconnectionattemptwillbeterminated,adisconnectnotificationwillbesenttothecontainer,andnofurtherautomaticreconnectnotificationswillbeissued.
NoteUsetheEnableAutoReconnectpropertytoenableordisableautomaticreconnection.
©2003-2014SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::OnChatMessageSendEventFiredwhenViewerXsendsachatmessage.
Syntax
HRESULTOnChatMessageSend(BSTRmessageText);
Parameters
messageTextThemessagetext.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::OnChatMessageReceivedEventFiredwhenViewerXreceivesachatmessage.
Syntax
HRESULTOnChatMessageReceived(BSTRmessageText);
Parameters
messageTextThemessagetext.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::OnChatSessionEndedEventFiredafterachatsessionhasbeenclosed.
Syntax
HRESULTOnChatSessionEnded();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::OnChatSessionStartedEventFiredafterachatsessionhasbeeninitiated.
Syntax
HRESULTOnChatSessionStarted();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::OnDisableRemoteInputChangedEventFiredwhenViewerXreceives"DisableRemoteInput"statefromVNCserver.
Syntax
HRESULTOnDisableRemoteInputChanged(VARIANT_BOOLremoteInputEnabled
Parameters
remoteInputEnabledEqualstoVARIANT_TRUEif"remoteinput"isenabledandVARIANT_FALSEif"remoteinput"isdisabled.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::OnMouseMoveEventFiredwhentheserver-sidecursormoves.Forperformancereasons,thiseventisnotfiredbydefault.UseEnableMouseMoveEventpropertytoenablethisevent.
Syntax
HRESULTOnMouseMove(longx,longy);
Parameters
xSpecifiesthex-coordinateofthecursor.
ySpecifiesthey-coordinateofthecursor.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ScreenUpdatedEventFiredwhenascreenupdatehasbeenreceivedfromaremoteserver.Forperformancereasons,thiseventisnotfiredbydefault.UseEnableScreenUpdatedEventpropertytoenablethisevent.
Syntax
HRESULTScreenUpdated();
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
ISmartCodeVNCViewer::ServerDimensionEventFiredwhencontrolhasreceivedadimensionofremoteserverscreen.
Syntax
HRESULTServerDimension(longnWidth,longnHeight);
Parameters
nWidthlongthatspecifieswidthofremoteserverscreen.
nHeightlongthatspecifiesheightofremoteserverscreen.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxAdvancedSettings::EnableHotKeyCtrlAltDelProperty
Thispropertysets/getsavaluethatindicateswhethertheCTRL+ALT+DEL(HOME)shortcutcanbeusedduringaremotesession.
SyntaxHRESULTIScVxAdvancedSettings::get_EnableHotKeyCtrlAltDel(VARIANT_BOOL*
HRESULTIScVxAdvancedSettings::put_EnableHotKeyCtrlAltDel(VARIANT_BOOL
SeeAlsoIScVxAdvancedSettings::HotKeyCtrlAltDel
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxAdvancedSettings::EnableScreenUpdatedEventPropertyEnables/DisablesfiringofScreenUpdatedevent.Forperformancereasons,thispropertyissettoFalsebydefault.
Syntax
HRESULTIScVxAdvancedSettings::get_EnableScreenUpdatedEvent(VARIANT_BOOL*
HRESULTIScVxAdvancedSettings::put_EnableScreenUpdatedEvent(VARIANT_BOOL
Parameters
pbEnablePointertoavariableoftypeVARIANT_BOOLthatreceivesScreenUpdatedeventstatus.
bEnableVARIANT_BOOLthatenablesordisablesScreenUpdatedevent.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxAdvancedSettings::EnableMouseMoveEventPropertyEnables/DisablesfiringofOnMouseMoveEventevent.Forperformancereasons,thispropertyissettoFalsebydefault.
Syntax
HRESULTIScVxAdvancedSettings::get_EnableServerMouseMoveEvent(VARIANT_BOOL*
HRESULTIScVxAdvancedSettings::put_EnableServerMouseMoveEvent(VARIANT_BOOL
Parameters
pbEnablePointertoavariableoftypeVARIANT_BOOLthatreceivesEnableMouseMoveEventeventstatus.
bEnableVARIANT_BOOLthatenablesordisablesEnableMouseMoveEventevent.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxAdvancedSettings::HotKeyCtrlAltDelProperty
Specifiesthevirtual-keycodetoaddtoCTRL+ALTtodeterminethehotkeyreplacementforsendingCTRL+ALT+DELcommand.
SyntaxHRESULTIScVxAdvancedSettings::get_HotKeyCtrlAltDel(LONG*
HRESULTIScVxAdvancedSettings::put_HotKeyCtrlAltDel(LONG
PropertyValueThenewvirtual-keycode.VK_ENDisthedefaultvalue.
SeeAlsoIScVxAdvancedSettings::EnableHotKeyCtrlAltDel
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxCapabilities::ChatPropertyReturnsavalueindicatingwhethertheremoteVNCserversupportsVNCchat.Youshouldcallthismethodonlywhenconnectionhasbeenestablishedalready.
Syntax
HRESULTIScVxCapabilities::get_Chat(VARIANT_BOOL*pbSupport);
Parameters
pbSupportPointertoavariableoftypeVARIANT_BOOLthatpresentswhethertheVNCserversupportsVNCchat.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxCapabilities::FileTransferPropertyReturnsavalueindicatingwhethertheremoteVNCserversupportsVNCfiletransfers.Youshouldcallthismethodonlywhenconnectionhasbeenestablishedalready.
Syntax
HRESULTIScVxCapabilities::get_FileTransfer(VARIANT_BOOL*pbSupport
Parameters
pbSupportPointertoavariableoftypeVARIANT_BOOLthatpresentswhethertheVNCserversupportsVNCfiletransfers.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxCapabilities::EnableRemoteInputFunctionReturnsTRUEiftheremoteserversupportsenable/disableremoteinputfeature.SupportedbyUltraVNCserveronly.
Syntax
HRESULTIScVxCapabilities::get_EnableRemoteInput(VARIANT_BOOL*pbSupport
Parameters
pbSupportPointertoavariableoftypeVARIANT_BOOLthatpresentswhethertheVNCserversupportsmouseandkeyboardinputenabling/disabling.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxCapabilities::RfbProtocolVersionMajorPropertyReturnsthemajorversionnumberoftheRFBprotocolversionusedtocommunicatewiththeVNCserver.Youshouldcallthismethodonlywhenconnectionhasbeenestablishedalready.
Syntax
HRESULTIScVxCapabilities::get_RfbProtocolVersionMajor(int*pnMajorVersion
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxCapabilities::RfbProtocolVersionMinorPropertyReturnstheminorversionnumberoftheRFBprotocolversionusedtocommunicatewiththeVNCserver.Youshouldcallthismethodonlywhenconnectionhasbeenestablishedalready.
Syntax
HRESULTIScVxCapabilities::get_RfbProtocolVersionMinor(int*pnMajorVersion
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxCapabilities::SelectSingleWindowFunctionReturnsTRUEiftheremoteserversupportssinglewindowselection.SupportedbyUltraVNCserveronly.
Syntax
HRESULTIScVxCapabilities::get_SelectSingleWindow(VARIANT_BOOL*pbSupport
Parameters
pbSupportPointertoavariableoftypeVARIANT_BOOLthatpresentswhethertheVNCserversupportssinglewindowselection.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxCapabilities::SwitchMultiMonitorFunctionReturnsTRUEiftheremoteserversupportsswitchingbetweenmonitors.SupportedbyUltraVNCserveronly.
Syntax
HRESULTIScVxCapabilities::get_SwitchMultiMonitor(VARIANT_BOOL*pbSupport
Parameters
pbSupportPointertoavariableoftypeVARIANT_BOOLthatpresentswhethertheVNCserversupportsmonitorsswitching.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxUltraSecurity_MSRC4::KeyDataPropertySetsUltraVNCMSRC4DSMplug-inRC4encryptionkeybypassingaSAFEARRAYofbytes.
Syntax
HRESULTIScVxUltraSecurity_MSRC4::put_KeyData(VARIANTarrDsmKeyData
Parameters
arrDsmKeyDataVARIANTthatholdsSAFEARRAYofbyteswithRC4keyfilecontent.
Remarks
InorderforViewerXtoreadRC4keyfromamemorybuffer,youmustsetIScVxUltraSecurity_MSRC4::KeyStoragepropertyvaluetoDKS_MEMORY.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxUltraSecurity_MSRC4::KeyDataAsHexStrPropertySetsMSRC4RC4keyinformofHEXstring.Eachbytemustberepresentedbytwohexadecimalcharacters.Ifthebytevaluecanberepresentedbyasinglehexcharacteritmustbepaddedwithzerovalue.Forexample,0F
Syntax
HRESULTIScVxUltraSecurity_MSRC4::put_KeyDataAsHexStr(BSTRstrDsmKeyData
Parameters
strKeyPathBSTRthatholdsabsolutepathtoencryptionkeyfile.Thepathcanbeanabsolutepathorarelativeone.
Remarks
InorderforViewerXtoreadRC4keyfromamemorybuffer,youmustsetIScVxUltraSecurity_MSRC4::KeyStoragepropertyvaluetoDKS_MEMORY.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.otherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxUltraSecurity_MSRC4::KeyFilePathPropertyGetsorsetsfilepathtoUltraVNCMSRC4DSMplug-inencryptionkey.
Syntax
HRESULTIScVxUltraSecurity_MSRC4::get_KeyFilePath(BSTR*pstrKeyPath
HRESULTIScVxUltraSecurity_MSRC4::put_KeyFilePath(BSTRstrKeyPath);
Parameters
pstrKeyPathPointertoavariableoftypeBSTRthatreceivespathtotheencryptionkey.
strKeyPathBSTRthatholdsabsolutepathtoencryptionkeyfile.Thepathcanbeanabsolutepathorarelativeone.
Remarks
InorderforViewerXtoreadRC4keyfromanexternalfile,youmustsetIScVxUltraSecurity_MSRC4::KeyStoragepropertyvaluetoDKS_FILE.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxUltraSecurity_MSRC4::KeyStoragePropertySpecifieswhichkeystorageViewerXmustusetoreadRC4keydata.
Syntax
HRESULTIScVxUltraSecurity_MSRC4::get_KeyStorage(DsmKeyStorage*pnStorage
HRESULTIScVxUltraSecurity_MSRC4::put_KeyStorage(DsmKeyStoragenStorage
Parameters
pnStoragePointertoavariableoftypeDsmKeyStoragethatreceivesakeystorageusedtostoreRC4key.
nStorageDsmKeyStoragethatspecifieskeystorageusedtostoreRC4key.
Remarks
Defaultvalue:DKS_FILE
YoucanuseoneofthefollowingpropertiestopassRC4keytoViewerX:KeyFilePath,KeyData,orKeyDataAsHexStr.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxUltraSecurity_SecureVNC::PrivateKeyDataPropertySetsUltraVNCSecureVNCDSMplug-inclientauthenticationkeybypassingaSAFEARRAYofbytes.
Syntax
HRESULTIScVxUltraSecurity_SecureVNC::put_PrivateKeyData(VARIANTarrDsmKeyData
Parameters
arrDsmKeyDataVARIANTthatholdsSAFEARRAYofbyteswithclientauthenticationkeyfilecontent.
Remarks
InorderforViewerXtoreadSecureVNCclientauthenticationkeyfromamemorybuffer,youmustsetIScVxUltraSecurity_SecureVNC::KeyStoragepropertyvaluetoDKS_MEMORY.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxUltraSecurity_SecureVNC::PrivateKeyDataAsHexStrPropertySetsSecureVNCclientkeyinformofHEXstring.Eachbytemustberepresentedbytwohexadecimalcharacters.Ifthebytevaluecanberepresentedbyasinglehexcharacteritmustbepaddedwithzerovalue.Forexample,0F
Syntax
HRESULTIScVxUltraSecurity_SecureVNC::put_PrivateKeyDataAsHexStr(BSTR
Parameters
strKeyPathBSTRthatholdsabsolutepathtoclientauthenticationkeyfile.Thepathcanbeanabsolutepathorarelativeone.
Remarks
InorderforViewerXtoreadSecureVNCclientauthenticationkeyfromamemorybuffer,youmustsetIScVxUltraSecurity_SecureVNC::KeyStoragepropertyvaluetoDKS_MEMORY.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.otherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxUltraSecurity_SecureVNC::PrivateKeyFilePathPropertyGetsorsetsfilepathtoUltraVNCSecureVNCDSMplug-inencryptionkey(Viewer_ClientAuth.pkey).
Syntax
HRESULTIScVxUltraSecurity_SecureVNC::get_PrivateKeyFilePath(BSTR*
HRESULTIScVxUltraSecurity_SecureVNC::put_PrivateKeyFilePath(BSTR
Parameters
pstrKeyPathPointertoavariableoftypeBSTRthatreceivespathtotheclientauthenticationkey.
strKeyPathBSTRthatholdsabsolutepathtoclientauthenticationkeyfile.Thepathcanbeanabsolutepathorarelativeone.
Remarks
InorderforViewerXtoreadSecureVNCclientauthenticationkeyfromanexternalfile,youmustsetIScVxUltraSecurity_SecureVNC::KeyStoragepropertyvaluetoDKS_FILE.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxUltraSecurity_SecureVNC::KeyStoragePropertySpecifieswhichkeystorageViewerXmustusetoreadSecureVNCclientauthenticationkeydata.
Syntax
HRESULTIScVxUltraSecurity_SecureVNC::get_KeyStorage(DsmKeyStorage*
HRESULTIScVxUltraSecurity_SecureVNC::put_KeyStorage(DsmKeyStorage
Parameters
pnStoragePointertoavariableoftypeDsmKeyStoragethatreceivesakeystorageusedtostoreSecureVNCclientauthenticationkey.
nStorageDsmKeyStoragethatspecifieskeystorageusedtostoreclientauthenticationkey.
Remarks
Defaultvalue:DKS_FILE
YoucanuseoneofthefollowingpropertiestopassSecureVNCclientauthenticationkeytoViewerX:PrivateKeyFilePath,PrivateKeyData,orPrivateKeyDataAsHexStr.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
IScVxUltraSecurity_SecureVNC::PassphrasePropertySetsapassphrasetodecrypttheprivateclientkey.
Syntax
HRESULTIScVxUltraSecurity_SecureVNC::put_Passphrase(BSTRstrPassphrase
Parameters
strPassphrasePassphraseoftheprivatekeyfile.
ReturnValue
ReturnsS_OKifsuccessful,oranerrorvalueotherwise.
©2003-2015SmartCodeSolutions.Allrightsreserved.
DsmKeyStorageEnumeration
enumDsmKeyStorage
{
DKS_FILE=0,
DKS_MEMORY=1
};
©2003-2015SmartCodeSolutions.Allrightsreserved.