15
15
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
16
16
\***************************************************************************/
17
17
18
+ using System ;
18
19
using System . IO ;
20
+ using System . Diagnostics ;
19
21
20
22
namespace CSExeCOMServerTest
21
23
{
@@ -24,12 +26,19 @@ class Program
24
26
// The main entry point for the application.
25
27
static void Main ( string [ ] args )
26
28
{
29
+ //if (!EventLog.SourceExists("TraceListenerLogSource"))
30
+ //{
31
+ // EventLog.CreateEventSource("TraceListenerLogSource", OutlookPresenceProvider.PresenceProvider.COMAppExeName);
32
+ //}
33
+
27
34
// Comment below lines if the Unified Collaborations type library is already registered in the system.
28
35
string typeLibName = "UCCollaborationLib.tlb" ;
29
36
string currentDir = Directory . GetCurrentDirectory ( ) ;
30
37
string typeLibPath = $ "{ currentDir } \\ { typeLibName } ";
31
38
TypeLib . Register ( typeLibPath ) ;
32
-
39
+
40
+ //string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
41
+ //Console.WriteLine(userName);
33
42
CSExeCOMServer . ExeCOMServer . Instance . OnCOMReady += new CSExeCOMServer . ExeCOMServer . OnCOMHosted ( OnCOMReady ) ;
34
43
// Run the out-of-process COM server
35
44
CSExeCOMServer . ExeCOMServer . Instance . Run ( typeof ( OutlookPresenceProvider . PresenceProvider ) , true ) ;
@@ -39,7 +48,14 @@ static void Main(string[] args)
39
48
40
49
static void OnCOMReady ( )
41
50
{
42
- OutlookPresenceProvider . PresenceProvider . Started ( ) ;
51
+ //try
52
+ //{
53
+ OutlookPresenceProvider . PresenceProvider . Started ( ) ;
54
+ //} catch (Exception ex)
55
+ //{
56
+ // Trace.TraceError(ex.Message);
57
+ // Trace.TraceError(ex.StackTrace);
58
+ //}
43
59
}
44
60
}
45
61
}
0 commit comments