Hi
I have a situation where in I need to reference a C# library in my Cold Fusion code. Any suggestions or links would be really useful.
cheers
Hi
I have a situation where in I need to reference a C# library in my Cold Fusion code. Any suggestions or links would be really useful.
cheers
You'll have to make your .Net library COM visible first. In Visual Studio 2008 you can do this by going into your project's properties, Selecting the Application tab, select Assembly Information, and select the checkbox to make assembly COM visible. Make sure that your class is public and not static because I found that the calling programs can't see the static classes. This may not be what you're asking but hope it helps.
If this is a step in what you need then I would suggest searching for using C# .Net libraries in MS Access for info on making your assemblies COM accessible. Although MS Access isn't what you're using there's a lot of info on the topic of assemblies to COM.
<cfobject type=".NET" name="png" class="blabla" assembly="C:\inetpub\wwwroot\xxx.dll">
<cfset png.init(181,258)>
<cfset png.ConvertFile(inputfile1, outputfile1) >
The init is the same as when you do a new in C# for example:
PNG png = new PNG(181,258);
Then you can execute your methods inside the class like so:
png.ConvertFile(inputfile1, outputfile1)