Daniel15 / Sharpamp

Sharpamp allows you to easily write Winamp plugins in C# - Migrated from Google Code
26 stars 9 forks source link

How the heck #3

Open XceSx6 opened 8 years ago

XceSx6 commented 8 years ago

Can't get it to work like.. at all.. TestForm wont run, made own API, gave the dll teh Winamp Window Handle, still no Life key file was missing though.. matters? What am i doing wrong? I'd love to get this working, as it seems to have everything i need

jamesdube commented 8 years ago

what is not working, be specific , show some code sample or something. Its been a while but i still intend to use this for my personal project.

XceSx6 commented 8 years ago

Well, First i have to Build the “Sharpamp” solution to get the dll, but here it says

Severity

Code

Description

Project

File

Line

Suppression State

Error

Unable to get MD5 checksum for the key file "key.pfx". Could not find file 'E:\Downloads\Winamp\Sharpamp-master\Sharpamp-master\Sharpamp\key.pfx'.

Sharpamp

Wouldn’t build without the key.pfx, so had to delete it and build. (don’t know if that creates problems?) Then add the reference again in the “HelloWorldGUI” to the Daniel15.Sharpamp.dll.

Then trying to run HelloWorldGUI failed, it’s a Class Library, so set it to Windows Forms application, added a Main to the HelloWorldGui.cs in which i run the Initialize function

But on trying to run it displays “Winamp” as being null at:

          private void frmTest_Load(object sender, EventArgs e)

          {

                 Winamp.SongChanged += Winamp_SongChanged;

So i tried:

              var x = new Winamp();

                 Application.EnableVisualStyles();

                 Application.SetCompatibleTextRenderingDefault(false);

                 (new frmTest(x)).Show();

But this pops up a winow:

And then it stops running

So, i don’t know yet what I’m doing wrong, I really, really want to get your code running and implemented in my project.

Your project is the cleanest most complete I found anywhere, even has the songchanged events hooked and everything.

If you could enlighten me in how to get this working I’d be very grateful.

Thank you for your time :)

Kind regards,

Dirk Bourgeois

From: James Dube [mailto:notifications@github.com] Sent: Wednesday, 17 August, 2016 15:24 To: Daniel15/Sharpamp Sharpamp@noreply.github.com Cc: XceSx6 x6.crapbox@gmail.com; Author author@noreply.github.com Subject: Re: [Daniel15/Sharpamp] How the heck (#3)

what is not working, be specific , show some code sample or something. Its been a while but i still intend to use this for my personal project.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Daniel15/Sharpamp/issues/3#issuecomment-240409257 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQQ2YzRFboxsKCc-_erWTZODoxUSNiaHks5qgwtugaJpZM4JiFEY . https://github.com/notifications/beacon/AQQ2Y7GyNXpC6t3k7ScXoIXrqc226rYiks5qgwtugaJpZM4JiFEY.gif

Daniel15 commented 8 years ago

Sorry, it's been a looooong time since I've touched this code.

First i have to Build the “Sharpamp” solution to get the dll,

Try downloading the installer (https://github.com/Daniel15/Sharpamp/releases/download/release-0.1.0/Sharpamp.0.1.Beta.exe) and using that instead. The DLLs included with the installer should already be signed. If you don't want to actually run the installer, you should be able to use something like Universal Extractor to extract the DLL files from it.

Daniel15 commented 8 years ago

Alternatively, use the sn tool from a Visual Studio command prompt to generate a new strong-naming key, and use that. I think the command is sn -k key.pfx

XceSx6 commented 8 years ago

Dear Daniel,

I’ve got the application running to where i can send Play/Pause/Stop/Next/Previous track. But the SongChanged and StatusChanged events never seem to fire.

I did change the following in HelloWorldGUI to get it running, perhaps i’m doing something wrong?

As thus far I haven’t been able to discover why these events don’t fire. I’ll keep looking. Should you be able to point me in the right direction, I’d appreciate the help.

Kind regards, Dirk Bourgeois

FYI: keep up the good work, clean code :)

From: Daniel Lo Nigro [mailto:notifications@github.com] Sent: Wednesday, 17 August, 2016 20:24 To: Daniel15/Sharpamp Sharpamp@noreply.github.com Cc: XceSx6 x6.crapbox@gmail.com; Author author@noreply.github.com Subject: Re: [Daniel15/Sharpamp] How the heck (#3)

Alternatively, use the sn tool from a Visual Studio command prompt to generate a new strong-naming key, and use that. I think the command is sn -k key.pfx

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Daniel15/Sharpamp/issues/3#issuecomment-240501863, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQQ2Y495PHzSDtvRqHqqEB3AePtP-yHyks5qg1GigaJpZM4JiFEY.

XceSx6 commented 8 years ago

I think i found the problem: Check Image: https://drive.google.com/open?id=0B7aT7VfknWHaVWVXQjlQWnhLaFU

From: Bourgeois.Dirk@Outlook.com Sent: Saturday, 17 September, 2016 09:01 Subject: RE: [Daniel15/Sharpamp] How the heck (#3)

Dear Daniel,

I’ve got the application running to where i can send Play/Pause/Stop/Next/Previous track. But the SongChanged and StatusChanged events never seem to fire.

I did change the following in HelloWorldGUI to get it running, perhaps i’m doing something wrong?

As thus far I haven’t been able to discover why these events don’t fire. I’ll keep looking. Should you be able to point me in the right direction, I’d appreciate the help.

Kind regards, Dirk Bourgeois

FYI: keep up the good work, clean code :)

From: Daniel Lo Nigro [mailto:notifications@github.com] Sent: Wednesday, 17 August, 2016 20:24 To: Daniel15/Sharpamp Sharpamp@noreply.github.com Cc: XceSx6 x6.crapbox@gmail.com; Author author@noreply.github.com Subject: Re: [Daniel15/Sharpamp] How the heck (#3)

Alternatively, use the sn tool from a Visual Studio command prompt to generate a new strong-naming key, and use that. I think the command is sn -k key.pfx

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Daniel15/Sharpamp/issues/3#issuecomment-240501863, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQQ2Y495PHzSDtvRqHqqEB3AePtP-yHyks5qg1GigaJpZM4JiFEY.

Daniel15 commented 8 years ago

If I remember correctly, you need to run it as a Winamp plugin for most functionality to work. If you run it as a regular Windows executable, it won't be able to hook in the same way. A C++ wrapper is required for that - It's part of the template (Templates/GeneralPluginTemplate/PluginWrapper is the template for the C++ wrapper)