Differences
This shows you the differences between the selected revisions of the page.
2015-12-14 | 2016-01-22 | ||
library_session_synchronizedirectories#jscript (martin) | library_sessionoptions#protocol (martin) | ||
Line 10: | Line 10: | ||
==== [[enums]] Accessing Enumeration Values ==== | ==== [[enums]] Accessing Enumeration Values ==== | ||
- | As JScript and VBScript access COM classes via ''IDispatch'', they do not make use of type library, hence they do not have direct access to constants defined there, like ''[[library_sessionoptions#properties|Protocol.Sftp]]'' for instance. To use these, you have to instruct WSH to import the type library into the script namespace. | + | As JScript and VBScript access COM classes via ''IDispatch'', they do not make use of type library, hence they do not have direct access to constants defined there, like ''[[library_sessionoptions#protocol|Protocol.Sftp]]'' for instance. To use these, you have to instruct WSH to import the type library into the script namespace. |
You can use [[wp>Windows_Script_File|Windows Script File]] (WSF) and its ''<reference>'' tag for that. It makes WSH import all //enums// from the assembly type library into constants in script namespace with name like ''<type>_<member>'', e.g. ''Protocol.Sftp'' becomes ''Protocol_Sftp''. | You can use [[wp>Windows_Script_File|Windows Script File]] (WSF) and its ''<reference>'' tag for that. It makes WSH import all //enums// from the assembly type library into constants in script namespace with name like ''<type>_<member>'', e.g. ''Protocol.Sftp'' becomes ''Protocol_Sftp''. |