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
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
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

<p>Hi,</p><p> 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.</p><p> 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?</p><p> The first hurdle I am facing is finding the correct <a href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx" title="DllImport" mce_href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx">DllImport </a>to use - what dll should I be importing? The winpm executable itself? It that where the interfaces live?</p><p>My intention it to write a calendar/reminder extension in C#. </p><p>Regards,</p><p>Oded Coster </p>

[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="ocoster"]<p>Hi,</p><p> 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.</p><p> 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?</p><p> The first hurdle I am facing is finding the correct <a href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx" title="DllImport" mce_href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx">DllImport </a>to use - what dll should I be importing? The winpm executable itself? It that where the interfaces live?[/quote]</p><p>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 <i>winpmdde.txt</i> in Pegasus Mail's RESOURCE directory. The header files of the extension interface can be downloaded from the <a href="/files/folders/pegadd/entry1436.aspx" target="_blank" mce_href="/files/folders/pegadd/entry1436.aspx">Pegasus Mail Add-Ons section</a>. </p>
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
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

<p>Hi Michael, </p><p> Thanks for the reply. Can you please explain what you mean by saying that this is not how the interface works? How <span style="font-style: italic;">does </span>it work? Where has David Harris said it was deprecated?</p><p> 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?</p><p> Thanks,</p><p>Oded </p>

[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.

<p>[quote user="ocoster"]How <span style="font-style: italic;">does </span>it work?[/quote]</p><p>Everything you need to know about the interface is included with the header files. I don't know what else to say? </p><p>[quote user="ocoster"]Where has David Harris said it was deprecated?[/quote]</p><p>In a message to the beta testers, the exact quote reads ... <i>the current extension interface is both obsolete and deprecated</i> ... </p><p>[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]</p><p>I'm not a C# developer, but if I understand the linked <i>DllImport</i> reference from your initial post correctly it expects to be used for a <i>... function exported from an unmanaged DLL</i> ...: Neither Pegasus Mail's executable nor any of its libraries <i>exports</i> any interface functions, so there simply isn't anything to <i>import</i>. Instead <i>you</i> (as an extension developer) are supposed to <i>create a library exporting at least one interface function </i><i>that will be imported by Pegasus Mail </i>as indicated by an accompanying script file called <i>form fact file</i>. All this is explained in detail in WPMFORMS.TXT from the above mentioned header file package. </p>
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
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="idw"]<p>[quote user="ocoster"]How <span style="font-style: italic;">does </span>it work?[/quote]</p><p>Everything you need to know about the interface is included with the header files. I don't know what else to say?</p><p>[/quote]</p><p>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. </p><p>[quote user="idw"] </p><p>[quote user="ocoster"]Where has David Harris said it was deprecated?[/quote]</p><p>In a message to the beta testers, the exact quote reads ... <i>the current extension interface is both obsolete and deprecated</i> ... </p><p>[/quote]</p><p>Fine. Is there going to be a replacement? Is there any documentation for one? </p>

[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.

<p>[quote user="ocoster"]Any idea if pegasus will be able to load a .NET dll if it has the correct callbacks?[/quote]</p><p>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. </p><p>[quote user="ocoster"]Fine. Is there going to be a replacement? Is there any documentation for one?[/quote]</p><p>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. </p>
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
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 ...

<p>[quote user="ocoster"]Fine. Is there going to be a replacement? Is there any documentation for one?[/quote]</p><p>Just FYI: I'm currently trying to get David Harris involved here ... </p>
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
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="idw"]<p>Just FYI: I'm currently trying to get David Harris involved here ... </p><p>[/quote]</p><p> 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. </p>

[quote user="idw"]

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

[/quote]

Any news/update on this?

[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>
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