Use in C# application

322 views
Skip to first unread message

adam

unread,
Mar 2, 2010, 12:52:21 PM3/2/10
to WinSparkle
I am trying to use WinSparkle in my C# application. When I attempt to
add a reference to WinSparkle.dll, I get the following message:

A reference to WinSparkle.dll could not be added. Please make sure
that the file is accessible, and that it is a valid assembly or COM
component.

Is it possible to use WinSparkle from a .NET application?

Adam

Vaclav Slavik

unread,
Mar 2, 2010, 1:12:29 PM3/2/10
to winsp...@googlegroups.com
Hi,

On Tue, 2010-03-02 at 09:52 -0800, adam wrote:
> Is it possible to use WinSparkle from a .NET application?

Yes, although so far in theory only. WinSparkle.dll itself is not an
assembly (yet -- see http://winsparkle.org/ticket/7), you have to use it
through P/Invoke. The API is still very simple, so you shouldn't have
any trouble here.

BTW, any C# bindings code, or even hearing back from you about how it
went, would be most welcome...

Regards,
Vaclav

signature.asc

adam

unread,
Mar 9, 2010, 1:40:42 PM3/9/10
to WinSparkle
Hi Vaclav, I ended up just rolling my own update mini-framework
for .NET, which is a shame. Would have really loved to use WinSparkle.
Adam

On Mar 2, 1:12 pm, Vaclav Slavik <vsla...@fastmail.fm> wrote:
> Hi,
>
> On Tue, 2010-03-02 at 09:52 -0800, adam wrote:
> > Is it possible to use WinSparkle from a .NET application?
>
> Yes, although so far in theory only. WinSparkle.dll itself is not an

> assembly (yet -- seehttp://winsparkle.org/ticket/7), you have to use it


> through P/Invoke. The API is still very simple, so you shouldn't have
> any trouble here.
>
> BTW, any C# bindings code, or even hearing back from you about how it
> went, would be most welcome...
>
> Regards,
> Vaclav
>

>  signature.asc
> < 1KViewDownload

Vaclav Slavik

unread,
Mar 9, 2010, 1:50:48 PM3/9/10
to winsp...@googlegroups.com
On Tue, 2010-03-09 at 10:40 -0800, adam wrote:
> Hi Vaclav, I ended up just rolling my own update mini-framework
> for .NET, which is a shame. Would have really loved to use
> WinSparkle.

Curious: So why didn't you?

thanks,
Vaclav

Adam Duston

unread,
Mar 9, 2010, 1:56:50 PM3/9/10
to Vaclav Slavik, winsp...@googlegroups.com
> Curious: So why didn't you?

Because there was no immediate way to get started with .NET, and my
quick cost-benefit analysis told me that it would be faster to throw
together my own code rather than learn how to use P/Invoke on the
WinSparkle dll. I believe my analysis was correct, though I think I
would have gotten a nicer solution with WinSparkle.

Adam

--
Founder, langolab.com
ad...@langolab.com
312-375-9879
Skype: aduston

Vaclav Slavik

unread,
Mar 10, 2010, 2:04:57 AM3/10/10
to Adam Duston, winsp...@googlegroups.com
Hi,

On Tue, 2010-03-09 at 13:56 -0500, Adam Duston wrote:
> Because there was no immediate way to get started with .NET, and my
> quick cost-benefit analysis told me that it would be faster to throw
> together my own code rather than learn how to use P/Invoke on the
> WinSparkle dll.

I see. Sorry, I assumed it's simple enough, otherwise I'd have given you
an example:

using System;
using System.Runtime.InteropServices;

class WinSparkle
{
[DllImport("WinSparkle.dll")]
public static extern void win_sparkle_init();
[DllImport("WinSparkle.dll")]
public static extern void win_sparkle_cleanup();
}

Anyway, there will be proper .NET wrapper in 0.2.

Regards,
Vaclav

signature.asc

adam

unread,
Mar 14, 2010, 2:00:53 PM3/14/10
to WinSparkle
> Anyway, there will be proper .NET wrapper in 0.2.

Please send a notification when this is out and I'll take a look and
possibly switch over to it.

Adam

>  signature.asc
> < 1KViewDownload

svil...@gmail.com

unread,
Sep 12, 2013, 6:48:43 AM9/12/13
to winsp...@googlegroups.com


Den tisdagen den 2:e mars 2010 kl. 18:52:21 UTC+1 skrev adam:

Is it possible to use WinSparkle from a .NET application?

Yes, there are just a few calls to the DLL.
There is also the option to use http://netsparkle.codeplex.com/
Reply all
Reply to author
Forward
0 new messages