{"size": 1534, "ext": "js", "max_stars_repo_path": "Official Windows Platform Sample/Windows 8 app samples/[JavaScript]-Windows 8 app samples/JavaScript/Windows 8 app samples/RemoteApp and Desktop Connections workspace API sample (Windows 8)/JavaScript/js/workspaceActiveX.js", "max_stars_repo_name": "zzgchina888/msdn-code-gallery-microsoft", "max_stars_repo_stars_event_min_datetime": "2022-01-21T01:40:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-21T01:41:10.000Z", "max_issues_repo_path": "Official Windows Platform Sample/Windows 8 app samples/[JavaScript]-Windows 8 app samples/JavaScript/Windows 8 app samples/RemoteApp and Desktop Connections workspace API sample (Windows 8)/JavaScript/js/workspaceActiveX.js", "max_issues_repo_name": "zzgchina888/msdn-code-gallery-microsoft", "max_issues_repo_issues_event_min_datetime": "2022-03-15T04:21:41.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-15T04:21:41.000Z", "max_forks_repo_path": "Official Windows Platform Sample/Windows 8 app samples/[JavaScript]-Windows 8 app samples/JavaScript/Windows 8 app samples/RemoteApp and Desktop Connections workspace API sample (Windows 8)/JavaScript/js/workspaceActiveX.js", "max_forks_repo_name": "zzgchina888/msdn-code-gallery-microsoft", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 38.35, "max_line_length": 175, "alphanum_fraction": 0.5704041721}
﻿//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//// PARTICULAR PURPOSE.
////
//// Copyright (c) Microsoft Corporation. All rights reserved

(function () {
    "use strict";
    WinJS.Namespace.define("Microsoft.Sample.WorkspaceBrokerApi", {
        
        WorkspaceActiveX: {

            createInstance: function () {
                var wkspObj = document.createElement("object");
                var wkspRegion = document.getElementById("wkspAxControlRegion");
                wkspRegion.appendChild(wkspObj);

                // Register for standard ActiveX events
                wkspObj.addEventListener("readystatechange", function (e) {
                    if (wkspObj.readyState !== 4) {
                        WinJS.log && WinJS.log("Error: the ActiveX control readyStateChange fired, but readyState != 4. ReadyState: " + wkspObj.readyState, "sample", "error");
                    }
                }, false);
                wkspObj.addEventListener("error", function (e) {
                    WinJS.log && WinJS.log("Error loading the ActiveX control", "sample", "error");
                }, false);

                // Hook up the ActiveX control
                wkspObj.id = "wkspAxControl";
                wkspObj.classid = "CLSID:CD70A734-B6DB-4588-9813-FF2E37A4661F";

                return wkspObj;
            },

        }
   
    });
})();
