Results 1 to 1 of 1

Thread: Accessing a Com server from an extern app made with visual studio

  1. #1
    Join Date
    Apr 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Accessing a Com server from an extern app made with visual studio

    Hi everybody, I'm so happy to be one of QT's programmers & share with u this space.

    so, I'm working on an application (client) which is supposed to communicate via com technology with a server made with qt ( qaxserver).

    image.png
    In ATL projects we have to include a file that contains the declaration of the interfaces. so that we can use them in our methods,


    #include "../SimpleCOM/SimpleCOM_i.h"
    #include "../SimpleCOM/SimpleCOM_i.c"

    int _tmain(int argc, _TCHAR* argv[])
    {
    BSTR* message; //used to accept return value from server.
    HRESULT hr; //COM error code;
    ISimpleChatServer *chat; //pointer to the interface

    hr = CoInitialize(0);
    if(SUCCEEDED(hr))
    {

    hr = CoCreateInstance(CLSID_SimpleChatServer,NULL,CLSCT X_INPROC_SERVER,IID_ISimpleChatServer,(void**) &chat);

    if(SUCCEEDED(hr))
    {
    hr = chat -> CallMe(_T("Zhiwei"), &message);
    }
    }
    }




    My questions are the following:
    how can i access the interfaces defined in qt COM servers ???
    IS there a way to generate that header file that defines those interfaces??




    Thx for your time.
    Last edited by drisstb; 26th April 2016 at 17:20.

Similar Threads

  1. Using Qt 5.4.1 Visual Studio 2013 libs in Visual Studio 2010
    By ^NyAw^ in forum Installation and Deployment
    Replies: 0
    Last Post: 6th March 2015, 11:20
  2. ms visual c++ compile without ms visual studio
    By zzz9 in forum General Programming
    Replies: 2
    Last Post: 12th August 2012, 21:29
  3. Accessing Microsoft SQL server 2005
    By yuvarajragupathi in forum Qt Programming
    Replies: 1
    Last Post: 28th October 2010, 13:20
  4. Visual Studio Plugin (1.1.6) crashes Visual Studio (2010)
    By mboeni in forum Installation and Deployment
    Replies: 0
    Last Post: 11th October 2010, 17:46
  5. Qt Visual Studio Add-in for Visual Studio 2010??
    By jiapei100 in forum Installation and Deployment
    Replies: 3
    Last Post: 5th July 2010, 14:14

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.