Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Server Developers
Viewing all articles
Browse latest Browse all 20709

How do I get the Application object for a running instance of InDesign Server from VBScript and C++

$
0
0

I have a running instance of InDesign Server CS6 which I launched using the following command:

"C:\Program Files\Adobe\Adobe InDesign CS6 Server x64\InDesignServer.com" -port 12345

 

I tried running the following VBScript file to access this running instance:

Set myApp = WScript.GetObject("configuration_12345")

myApp.ConsoleOut("Foo")

Set myApp = Nothing

 

But I get this error (launched using 64-bit wscript.exe):

---------------------------

Windows Script Host

---------------------------

Line:          1

Char:          1

Error:          File name or class name not found during Automation operation

Code:          800A01B0

Source:           Microsoft VBScript runtime error

 

I also tried to access this instance using C++ COM:

int _tmain(int argc, _TCHAR* argv[])

{

          HRESULT hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);

          if (FAILED(hr))

          {

                    printf("COM init failed\n");

                    return 0;

          }

 

          IDispatch* pUnk = NULL;

          hr = ::CoGetObject(L"configuration_12345", NULL, __uuidof(IDispatch), (void**)&pUnk);

          if (SUCCEEDED(hr))

          {

                    pUnk->Release();

                    pUnk = NULL;

          }

          ::CoUninitialize();

          return 0;

}

 

But, CoGetObject returns 0x800401e4 (MK_E_SYNTAX).

 

However, if I use the "helloworld-csharp-com" sample, using "configuration_12345" as the config, it works fine. Why is it not working with VBScript and C++?

 

I'm running Windows 8, 64-bit, IDS CS6 8.0


Viewing all articles
Browse latest Browse all 20709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>