Plug In Development

Plug-ins, add-ons, skins, icons, templates and other downloads. Contributions are welcome.

Moderators: helmut, XnTriq, xnview

Plug In Development

Postby Rattenhirn » Fri Oct 10, 2008 8:31 am

Hi,

I have tried and failed to create a plug in for XnView, maybe one of you can help me out.

I've downloaded the XnView Plug In SDK from this site and compiled it.
Then I've put the result ("Xuser.dll") into the "PlugIns" directory of my XnView installation.

However, it doesn't show up in the "Plug-Ins Information..." dialog.

In order to diagnose the problem, I've added some OutputDebugStrings to the Xuser.dll code. DllMain gets called with DLL_PROCESS_ATTACH and with DLL_PROCESS_DETACH, but no other methods.

Also, I checked the exports of the plugins available for download here and none of those have exports that even remotely match those of the plugin created by the SDK...

So, what am I missing?

Thanks in advance,
dIdl
Rattenhirn
 
Posts: 4
Joined: Fri Oct 10, 2008 8:15 am

Re: Plug In Development

Postby xnview » Fri Oct 10, 2008 8:55 am

Rename the Xuser.dll as Xuser.usr
Pierre.
User avatar
xnview
Author of XnView
 
Posts: 26778
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Postby Rattenhirn » Fri Oct 10, 2008 9:26 am

I tried that. Now not even DllMain gets called.

I'm using XnView 1.94.2 btw.
Rattenhirn
 
Posts: 4
Joined: Fri Oct 10, 2008 8:15 am

Postby xnview » Fri Oct 10, 2008 1:17 pm

It works for me, please send me your dll
Pierre.
User avatar
xnview
Author of XnView
 
Posts: 26778
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Postby Rattenhirn » Tue Oct 14, 2008 2:30 pm

I've got it to work now.

Some info that may be interesting to some:

* .usr PlugIns don't show up in the "Plug-Ins Information..." dialog.
* If they are not registered in XnView.ini, they'll get loaded the first time you try to view an unknown picture.
* The exported function need to be pure C. C++ functions with 'extern "C"' seem to crash XnView. (At least when using VC 2003)
Rattenhirn
 
Posts: 4
Joined: Fri Oct 10, 2008 8:15 am

Postby xnview » Wed Oct 15, 2008 6:45 am

Rattenhirn wrote:* .usr PlugIns don't show up in the "Plug-Ins Information..." dialog.

Yes, only in formats

* The exported function need to be pure C. C++ functions with 'extern "C"' seem to crash XnView. (At least when using VC 2003)

Strange
Pierre.
User avatar
xnview
Author of XnView
 
Posts: 26778
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Postby Rattenhirn » Wed Oct 15, 2008 7:01 am

* The exported function need to be pure C. C++ functions with 'extern "C"' seem to crash XnView. (At least when using VC 2003)

Strange


I've tried it again and it didn't crash XnView this time. So most likely something else caused the crash. I'll drop you a line when it happens again and I can isolate the cause.
Rattenhirn
 
Posts: 4
Joined: Fri Oct 10, 2008 8:15 am


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest