J
JoBless
Hi.
I've developed a com add-in for outlook, based on a microeye template. It
works great, and releases all objects, with no shutdown-problems.
Now i've tested it on a activesync environment, and I get the same problem
as everybody else, activesync initializes an instance of outlook, and my
buttons don't show up. I've then searched google, and found the
addinmon.exe, which i try to implement.
My AddinInstance_OnConnection:
Private Sub AddinInstance_OnConnection(ByVal Application As Object, _
ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
ByVal AddInInst As Object, custom() As Variant)
Dim lngPID As Long
Dim lngThreadID As Long
'On Error Resume Next
If Application.Explorers.Count > 0 Then 'Outlook launched with UI
'Create and Initialize a base class or write your Initialization
code here
UI = True
gBaseClass.InitHandler Application, AddInInst.ProgId
Else 'Outlook launched without UI
'Get Outlook ProcessID (same as current process ID since Add-In runs
in-process
lngPID = GetCurrentProcessId
lngThreadID = GetCurrentThreadId
If IsAddInMonProcess = False Then
'Launch AddInMonitor, supplying Add-In ProgID, Outlook PID,
ThreadID
Shell App.Path & "\AddInMon.exe /n " & AddInInst.ProgId _
& " /p " & lngPID & " /t " & lngThreadID
End If
End If
End Sub
When I start outlook without UI (rightclick a file, and select sendto
mail.....), it fires, and addinmon is executed.
I'm using the WriteDiagnostics, and get a logfile:
07-04-2004 11:21:04: AddInMon initialized name = G2Outlook.Connect interval
= 500 milliseconds; PID = 3352; ThreadID = 612; Version = 1.0.2104
07-04-2004 11:21:04: DisconnectAddin - G2Outlook.Connect
07-04-2004 11:21:11: Outlook process closed. PID = 3352
07-04-2004 11:21:11: AddInMon shutting down.
But here comes the problem:
When I've done this (executed outlook without UI), the com add-in gets
disabled inside outlook. It's not in the disabled items, but just disabled
like manually disabling the com add-in.
What have I done wrong here?
Regards
JoBless
I've developed a com add-in for outlook, based on a microeye template. It
works great, and releases all objects, with no shutdown-problems.
Now i've tested it on a activesync environment, and I get the same problem
as everybody else, activesync initializes an instance of outlook, and my
buttons don't show up. I've then searched google, and found the
addinmon.exe, which i try to implement.
My AddinInstance_OnConnection:
Private Sub AddinInstance_OnConnection(ByVal Application As Object, _
ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
ByVal AddInInst As Object, custom() As Variant)
Dim lngPID As Long
Dim lngThreadID As Long
'On Error Resume Next
If Application.Explorers.Count > 0 Then 'Outlook launched with UI
'Create and Initialize a base class or write your Initialization
code here
UI = True
gBaseClass.InitHandler Application, AddInInst.ProgId
Else 'Outlook launched without UI
'Get Outlook ProcessID (same as current process ID since Add-In runs
in-process
lngPID = GetCurrentProcessId
lngThreadID = GetCurrentThreadId
If IsAddInMonProcess = False Then
'Launch AddInMonitor, supplying Add-In ProgID, Outlook PID,
ThreadID
Shell App.Path & "\AddInMon.exe /n " & AddInInst.ProgId _
& " /p " & lngPID & " /t " & lngThreadID
End If
End If
End Sub
When I start outlook without UI (rightclick a file, and select sendto
mail.....), it fires, and addinmon is executed.
I'm using the WriteDiagnostics, and get a logfile:
07-04-2004 11:21:04: AddInMon initialized name = G2Outlook.Connect interval
= 500 milliseconds; PID = 3352; ThreadID = 612; Version = 1.0.2104
07-04-2004 11:21:04: DisconnectAddin - G2Outlook.Connect
07-04-2004 11:21:11: Outlook process closed. PID = 3352
07-04-2004 11:21:11: AddInMon shutting down.
But here comes the problem:
When I've done this (executed outlook without UI), the com add-in gets
disabled inside outlook. It's not in the disabled items, but just disabled
like manually disabling the com add-in.
What have I done wrong here?
Regards
JoBless