Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Accessing a .Net COM dll in javascript

Community Beginner ,
Feb 26, 2013 Feb 26, 2013

Hey Guys,

I'm having an issue trying to get access to local .Net Class Library I made in C#. and the methods within it. I have created it as COM visible and would like to use javascript to call it.
I'm not that familiar with javascript so I've searched around and have hit a roadblock, its that this is not going to be running through  a web browser.
So..:
var ObjFromDll  =  new ActiveXObject("mydll");
is not available
I eventually have plans to tie this Class Library into the Photoshop UI as I have done with other softwares.

Example C#/.Net

using System;

using System.Runtime.InteropServices;

namespace myDotNetLibrary

{

    [ComVisible(true)]

    [ClassInterface(ClassInterfaceType.None)]

    [System.Runtime.InteropServices.ProgId("myDotNetLibrary.DLL")]

    [System.Runtime.InteropServices.Guid("ccb48297-eac2-4c14-a37a-9acb653d82c2")]

    public interface ISVNLibrary

    {

        bool IsFileConflicted(string MyFilePath);

    }

    public class myLib : IMyLibrary

    {

        [ComVisible(true)]
    

        public bool IsFileConflicted(string MyFilePath)

        {

            bool fileConflict = false;

            return fileConflict;

        }

     }

}


Any advice would be appreciated.

TOPICS
Actions and scripting
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Valorous Hero ,
Feb 26, 2013 Feb 26, 2013

You would have to read the JavaScript Tools Guide, chapter 7 Integating External Libraries

There is also an example in the Bridge SDK

The Tools guide should be accesed via the help menu of ExtendScript Toolkit

and the Bridge SDK is available from http://www.adobe.com/devnet/bridge.html

This is all above me and I would be very interested if you get it to work with c#

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 06, 2013 Mar 06, 2013
LATEST

Ok, so I followed up with that extendscript "Intergrating External Libraries" and it seems to be what I am looking for, or at least close enough to work off of. It does look like I have to write it in C++ or C, C# doesnt seem supported. I'll have to dig around a bit more. Thanks for the tip.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines