Extension development
Managed wrapper to extension interface

[quote user="ocoster"][quote user="idw"]

Just FYI: I'm currently trying to get David Harris involved here ...

[/quote]

Any news/update on this?

[/quote]

No, nothing. Maybe contacting him directly could yield a reply.

[quote user="ocoster"][quote user="idw"]<p>Just FYI: I'm currently trying to get David Harris involved here ... </p><p>[/quote]</p><p>Any news/update on this? </p><p>[/quote]</p><p>No, nothing. Maybe contacting him directly could yield a reply. </p>

			Michael

--
PGP Key ID (RSA 2048): 0xC45D831B
PGP Plugin for Pegasus Mail: <https:></https:>
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

Hi,

 I am a C# developer by trade and a longtime user of winpmail, and was wondering about the possibility of writing a managed (.NET) wrapper to the extensions interface.

 I would like to get opinions and advice from forum members - has anyone tried this before? Are there any reasons why this would not be possible?

 The first hurdle I am facing is finding the correct DllImport to use - what dll should I be importing? The winpm executable itself? It that where the interfaces live?

My intention it to write a calendar/reminder extension in C#.

Regards,

Oded Coster

&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;&amp;nbsp;I am a C# developer by trade and a longtime user of winpmail, and was wondering about the possibility of writing a managed (.NET) wrapper to the extensions interface.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I would like to get opinions and advice from forum members - has anyone tried this before? Are there any reasons why this would not be possible?&lt;/p&gt;&lt;p&gt;&amp;nbsp;The first hurdle I am facing is finding the correct &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx&quot; title=&quot;DllImport&quot; mce_href=&quot;http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx&quot;&gt;DllImport &lt;/a&gt;to use - what dll should I be importing? The winpm executable itself? It that where the interfaces live?&lt;/p&gt;&lt;p&gt;My intention it to write a calendar/reminder extension in C#. &lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;Oded Coster &lt;/p&gt;

[quote user="ocoster"]

Hi,

 I am a C# developer by trade and a longtime user of winpmail, and was wondering about the possibility of writing a managed (.NET) wrapper to the extensions interface.

 I would like to get opinions and advice from forum members - has anyone tried this before? Are there any reasons why this would not be possible?

 The first hurdle I am facing is finding the correct DllImport to use - what dll should I be importing? The winpm executable itself? It that where the interfaces live?[/quote]

Well, this isn't the way the interface works (aside from David Harris saying that it's deprecated anyway): You have to create a library exporting at least one function and you may send and receive messages like windows do. Another interface would be DDE based, but it provides less capabilities, see winpmdde.txt in Pegasus Mail's RESOURCE directory. The header files of the extension interface can be downloaded from the Pegasus Mail Add-Ons section.

[quote user=&quot;ocoster&quot;]&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;&amp;nbsp;I am a C# developer by trade and a longtime user of winpmail, and was wondering about the possibility of writing a managed (.NET) wrapper to the extensions interface.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I would like to get opinions and advice from forum members - has anyone tried this before? Are there any reasons why this would not be possible?&lt;/p&gt;&lt;p&gt;&amp;nbsp;The first hurdle I am facing is finding the correct &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx&quot; title=&quot;DllImport&quot; mce_href=&quot;http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx&quot;&gt;DllImport &lt;/a&gt;to use - what dll should I be importing? The winpm executable itself? It that where the interfaces live?[/quote]&lt;/p&gt;&lt;p&gt;Well, this isn&#039;t the way the interface works (aside from David Harris saying that it&#039;s deprecated anyway): You have to create a library exporting at least one function and you may send and receive messages like windows do. Another interface would be DDE based, but it provides less capabilities, see &lt;i&gt;winpmdde.txt&lt;/i&gt; in Pegasus Mail&#039;s RESOURCE directory. The header files of the extension interface can be downloaded from the &lt;a href=&quot;/files/folders/pegadd/entry1436.aspx&quot; target=&quot;_blank&quot; mce_href=&quot;/files/folders/pegadd/entry1436.aspx&quot;&gt;Pegasus Mail Add-Ons section&lt;/a&gt;. &lt;/p&gt;

			Michael

--
PGP Key ID (RSA 2048): 0xC45D831B
PGP Plugin for Pegasus Mail: <https:></https:>
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

Hi Michael,

 Thanks for the reply. Can you please explain what you mean by saying that this is not how the interface works? How does it work? Where has David Harris said it was deprecated?

 I was intending to create a .NET library with an entry point as per the SDK, using .NET interop (using the header files you have linked to - I already had them). Are you suggesting this will not work?

 Thanks,

Oded

&lt;p&gt;Hi Michael, &lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks for the reply. Can you please explain what you mean by saying that this is not how the interface works? How &lt;span style=&quot;font-style: italic;&quot;&gt;does &lt;/span&gt;it work? Where has David Harris said it was deprecated?&lt;/p&gt;&lt;p&gt;&amp;nbsp;I was intending to create a .NET library with an entry point as per the SDK, using .NET interop (using the header files you have linked to - I already had them). Are you suggesting this will not work?&lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks,&lt;/p&gt;&lt;p&gt;Oded &lt;/p&gt;

[quote user="ocoster"]How does it work?[/quote]

Everything you need to know about the interface is included with the header files. I don't know what else to say?

[quote user="ocoster"]Where has David Harris said it was deprecated?[/quote]

In a message to the beta testers, the exact quote reads ... the current extension interface is both obsolete and deprecated ...

[quote user="ocoster"]I was intending to create a .NET library with an entry point as per the SDK, using .NET interop (using the header files you have linked to - I already had them). Are you suggesting this will not work?[/quote]

I'm not a C# developer, but if I understand the linked DllImport reference from your initial post correctly it expects to be used for a ... function exported from an unmanaged DLL ...: Neither Pegasus Mail's executable nor any of its libraries exports any interface functions, so there simply isn't anything to import. Instead you (as an extension developer) are supposed to create a library exporting at least one interface function that will be imported by Pegasus Mail as indicated by an accompanying script file called form fact file. All this is explained in detail in WPMFORMS.TXT from the above mentioned header file package.

&lt;p&gt;[quote user=&quot;ocoster&quot;]How &lt;span style=&quot;font-style: italic;&quot;&gt;does &lt;/span&gt;it work?[/quote]&lt;/p&gt;&lt;p&gt;Everything you need to know about the interface is included with the header files. I don&#039;t know what else to say? &lt;/p&gt;&lt;p&gt;[quote user=&quot;ocoster&quot;]Where has David Harris said it was deprecated?[/quote]&lt;/p&gt;&lt;p&gt;In a message to the beta testers, the exact quote reads ... &lt;i&gt;the current extension interface is both obsolete and deprecated&lt;/i&gt; ... &lt;/p&gt;&lt;p&gt;[quote user=&quot;ocoster&quot;]I was intending to create a .NET library with an entry point as per the SDK, using .NET interop (using the header files you have linked to - I already had them). Are you suggesting this will not work?[/quote]&lt;/p&gt;&lt;p&gt;I&#039;m not a C# developer, but if I understand the linked &lt;i&gt;DllImport&lt;/i&gt; reference from your initial post correctly it expects to be used for a &lt;i&gt;... function exported from an unmanaged DLL&lt;/i&gt; ...: Neither Pegasus Mail&#039;s executable nor any of its libraries &lt;i&gt;exports&lt;/i&gt; any interface functions, so there simply isn&#039;t anything to &lt;i&gt;import&lt;/i&gt;. Instead &lt;i&gt;you&lt;/i&gt; (as an extension developer) are supposed to &lt;i&gt;create a library exporting at least one interface function &lt;/i&gt;&lt;i&gt;that will be imported by Pegasus Mail &lt;/i&gt;as indicated by an accompanying script file called &lt;i&gt;form fact file&lt;/i&gt;. All this is explained in detail in WPMFORMS.TXT from the above mentioned header file package. &lt;/p&gt;

			Michael

--
PGP Key ID (RSA 2048): 0xC45D831B
PGP Plugin for Pegasus Mail: <https:></https:>
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

[quote user="idw"]

[quote user="ocoster"]How does it work?[/quote]

Everything you need to know about the interface is included with the header files. I don't know what else to say?

[/quote]

Fair enough. I will see if I can go further with this, not sure if .NET interop will be enough. Any idea if pegasus will be able to load a .NET dll if it has the correct callbacks? I am not that savvy with C and windows calls, which is one reason I am asking for help here.

[quote user="idw"]

[quote user="ocoster"]Where has David Harris said it was deprecated?[/quote]

In a message to the beta testers, the exact quote reads ... the current extension interface is both obsolete and deprecated ...

[/quote]

Fine. Is there going to be a replacement? Is there any documentation for one?

[quote user=&quot;idw&quot;]&lt;p&gt;[quote user=&quot;ocoster&quot;]How &lt;span style=&quot;font-style: italic;&quot;&gt;does &lt;/span&gt;it work?[/quote]&lt;/p&gt;&lt;p&gt;Everything you need to know about the interface is included with the header files. I don&#039;t know what else to say?&lt;/p&gt;&lt;p&gt;[/quote]&lt;/p&gt;&lt;p&gt;Fair enough. I will see if I can go further with this, not sure if .NET interop will be enough. Any idea if pegasus will be able to load a .NET dll if it has the correct callbacks? I am not that savvy with C and windows calls, which is one reason I am asking for help here. &lt;/p&gt;&lt;p&gt;[quote user=&quot;idw&quot;] &lt;/p&gt;&lt;p&gt;[quote user=&quot;ocoster&quot;]Where has David Harris said it was deprecated?[/quote]&lt;/p&gt;&lt;p&gt;In a message to the beta testers, the exact quote reads ... &lt;i&gt;the current extension interface is both obsolete and deprecated&lt;/i&gt; ... &lt;/p&gt;&lt;p&gt;[/quote]&lt;/p&gt;&lt;p&gt;Fine. Is there going to be a replacement? Is there any documentation for one? &lt;/p&gt;

[quote user="ocoster"]Any idea if pegasus will be able to load a .NET dll if it has the correct callbacks?[/quote]

I don't see a reason why it wouldn't as long as you export a plain function and not an object method. There are plain C samples included with the header files.

[quote user="ocoster"]Fine. Is there going to be a replacement? Is there any documentation for one?[/quote]

I've been supporting David Harris working on a replacement a while ago but he didn't publish it yet although I know he's using it internally already, i.e nobody else could test it so far and I have no idea whether he's going to make it publicly available anytime soon.

&lt;p&gt;[quote user=&quot;ocoster&quot;]Any idea if pegasus will be able to load a .NET dll if it has the correct callbacks?[/quote]&lt;/p&gt;&lt;p&gt;I don&#039;t see a reason why it wouldn&#039;t as long as you export a plain function and not an object method. There are plain C samples included with the header files. &lt;/p&gt;&lt;p&gt;[quote user=&quot;ocoster&quot;]Fine. Is there going to be a replacement? Is there any documentation for one?[/quote]&lt;/p&gt;&lt;p&gt;I&#039;ve been supporting David Harris working on a replacement a while ago but he didn&#039;t publish it yet although I know he&#039;s using it internally already, i.e nobody else could test it so far and I have no idea whether he&#039;s going to make it publicly available anytime soon. &lt;/p&gt;

			Michael

--
PGP Key ID (RSA 2048): 0xC45D831B
PGP Plugin for Pegasus Mail: <https:></https:>
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

[quote user="ocoster"]Fine. Is there going to be a replacement? Is there any documentation for one?[/quote]

Just FYI: I'm currently trying to get David Harris involved here ...

&lt;p&gt;[quote user=&quot;ocoster&quot;]Fine. Is there going to be a replacement? Is there any documentation for one?[/quote]&lt;/p&gt;&lt;p&gt;Just FYI: I&#039;m currently trying to get David Harris involved here ... &lt;/p&gt;

			Michael

--
PGP Key ID (RSA 2048): 0xC45D831B
PGP Plugin for Pegasus Mail: <https:></https:>
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

[quote user="idw"]

Just FYI: I'm currently trying to get David Harris involved here ...

[/quote]

 Much appreciated. If the .NET family of languages can become easily extend Pegasus, there is a huge number of programmers out there that will be able to write extensions.

[quote user=&quot;idw&quot;]&lt;p&gt;Just FYI: I&#039;m currently trying to get David Harris involved here ... &lt;/p&gt;&lt;p&gt;[/quote]&lt;/p&gt;&lt;p&gt;&amp;nbsp;Much appreciated. If the .NET family of languages can become easily extend Pegasus, there is a huge number of programmers out there that will be able to write extensions. &lt;/p&gt;

[quote user="idw"]

Just FYI: I'm currently trying to get David Harris involved here ...

[/quote]

Any news/update on this?

[quote user=&quot;idw&quot;]&lt;p&gt;Just FYI: I&#039;m currently trying to get David Harris involved here ... &lt;/p&gt;&lt;p&gt;[/quote]&lt;/p&gt;&lt;p&gt;Any news/update on this? &lt;/p&gt;
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft