How to use .win.dll C# wrapper (FatSecret API Wrapper) - c#

I've delved into trying to use the FatSecret REST API directly from code, but getting it to work correctly has been pretty difficult. On my quest to get it working I ran into a FatSecret C# wrapper that looked appealing, found here:
https://fatsecretsharp.codeplex.com/
When I downloaded the folder from that site I found two files:
- FatSecretSharp.Win.dll
- FatSecretSharp.Win
What I wonder is how to actually include these files in a C# project and start using the wrapper.

Looks like I just needed to go to solution references and add the win.dll.

Related

How to create RDFS based on RDF/XML file?

For my project, I need to get the RDFS from CIM RDF/XML (IEC 61970). .NET Framework does not have standard tools for working with RDF. Please help me solve my problem.
Does it have to be with C#?. I use JAVA + JENA to process the CIM/XML files to extract it data. (It works fine with the CIM 16 schema version "http://iec.ch/TC57/2013/CIM-schema-cim16#").
Maybe you can create the JAVA code and call it from C# or use any native .NET library for parsing XML. In this post How match JAXB elements in CIM/RDF? seems they are working with JAXB.

Can PHP Extensions be written using C#

Is it possible to create a PHP Extension using C#?
We have a need to connect PHP to in house libraries we have written in C#.NET 4.6 targeting Windows and would like to be as close as possible to PHP without needing to have a serivce we can call external to php, thus the idea of making an extension in house.
I've looked at a couple options:
Use PHP DOTNET extension to call C# assembly.
As far as I can tell this extension does not work with .NET 4+ and the C# code requires 4.6 sadly.
Write a PHP extension.
So far I have only seen examples for Windows using Win32 and C++, idealy it would be nice if the extension could be written in C#. I have thoughts on making a lib using the C# code we need, then utilizing that inside the Win32/C++ extension and trying that if I absolutly have to.
Call the C# code as an external service.
As a very last option this would be viable and I can see this being more flexible for other sources to use (i.e. PHP, Java, C#, etc)
It would be interesting to be able to write a PHP Extension using C# assuming this is possible. I can see how this may not be the "best" option if it is possible though.
Thanks for reading and advice!!!
Coming off of #SevaAlekseyev idea I was able to get PHP to call C# using COM.
<?php
$object = new COM('ComClassExample.ComClassExample');
echo '1 and 1 added: ' . $object->AddTheseUp(1,1);
?>
Using the following site I was able to make a C# dll that exposed itself like a COM object. https://whoisburiedhere.wordpress.com/2011/07/12/creating-a-com-object-from-scratch-with-c/
And with a little tweak to the Post-build event I was able to get the new version to load for PHP (had to copy because PHP was getting an access denied message)
iisreset /stop
copy /Y "$(TargetPath)" C:\com\$(TargetFileName)
$(frameworkdir)\$(frameworkversion)\regasm.exe C:\com\$(TargetFileName) /codebase /tlb /nologo
iisreset /start
#JuanDelaCruz Peachpie looks like an interesting tool to keep in mind but it looks like it is meant to be compiled before deployment which wont work in our shop for the moment.
Thanks all!

C# Windows Search: how to detect that a location is in search index without interop library?

We use Windows Search in our application and need a way to detect is folder indexed.
I know 2 ways to do it:
1. Using Microsoft.Search.Interop.dll library.
2. Using Windows Search Sample Code (maybe a bit changed) as an .exe file called from C# application.
These two solutions need using an external file (.dll or .exe) but I need a simpler solution because it will be simple new optional SEARCH feature to a WebDAV server generated by wizard for our clients. Besides Microsoft.Search.Interop.dll is for .NET 2.0 and there can be a problem using it from IIS under .NET 4.0 pool (depending on pool settings).
Is there any way to use ISearchCrawlScopeManager interface without linking to any .dll (just to COM) like it was made in Crawl Scope Command Line C++ example?
UPDATE1: Looks like ISearchCrawlScopeManager interface is located in Search Interface Type Library. It isn't done yet, but I'm close. Thanks to Hans Passant.

Unable to get WPF Sound Visualization Library working

I've recently begun work on an audio application using C#.NET. I've begun some basic implementation of the NAudio library which I intend to use throughout the project. While looking at NAudio's documentation on CodePlex I found a link to the WPF Sound Visualization Library, I was attracted by one of its features in particular which I knew I would require in my app.
So I downloaded and added it to my project References.
I've copied how it is referenced within a window's XAML document, like so:
xmlns:svl="clr-namespace:WPFSoundVisualizationLib;assembly=WPFSoundVisualizationLib"
and then tried to add a control within the library using:
<svl:WaveformTimeline x:Name="testWaveformTimeline"/>
The problem is that the designer/XMAL editor claims: "svl:WaveformTimeline" does not exist in namespace "clr-namespace:WPFSoundVisualizationLib;assembly=WPFSoundVisualizationLib".
Now I know that it does exist. I can make reference to the WaveformTimeline object in the class file, and the object shows up in Visual Studio's Object Browser.
I'm not at all sure why this is the case. If anyone knows any possible solutions to this, or things I should check any help would be appreciated.
I had the same issue and I just found the solution:
By right-clicking on the WPFSoundVisualizationLib .dll I had to 'unblock' the file which had been marked as 'unsafe' by windows because the file were coming from a WebSite. Weird but it was obviously the reason I couldn't use the WaveformTimeLine in my project. A bit late but maybe still worths to post it.
More info here: https://msdn.microsoft.com/en-us/library/dd409252(VS.100).aspx

SlickGrid C# Wrapper

I found this tease of a code snippet:
http://codepaste.net/m6xsdi
slickGrid.AddColumn(
Column.ForId("riga")
.Named("Riga")
.ForField("id")
.WithEditorFunction("TextCellEditor")
.WithSetValueHandler("updateItem")
.WithBehavior(Column.Behavior.selectAndMove)
).AddColumn(
Column.ForId("codice")
.Named("Codice")
.ForField("code")
.WithEditorFunction("TextCellEditor")
.WithSetValueHandler("updateItem")
.WithBehavior(Column.Behavior.selectAndMove)
);
It would be seriously terrific if there was a C# wrapper for SlickGrid that uses this fluent syntax, but I can't seem to find one. Google comes up blank. Is this some proprietary wrapper or am I just not looking in the right places?
Was a working prototype (written at night ;) for a demo. Give me few days and I'll try to share the code on Codeplex or GitHub
Update: published http://lucilla.codeplex.com/SourceControl/changeset/changes/7a72573dc846
You'll find a sample mvc app and the helper prototype.. hope to publish the whole framework by the end of the year (if you wonder what the lib folder is for..)

Categories

Resources