Results 1 to 12 of 12

Thread: using com dll

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2011
    Posts
    4
    Qt products
    Qt4

    Default using com dll

    in vs2010 c++ i used the following code to use some functions in a dll file that i don't have its header

    Qt Code:
    1. #import "dll path"
    2. HRESULT hr = CoInitialize(NULL);
    3. if (hr==S_OK)
    4. {cout<<"INITIALIZED\n";}
    5.  
    6. Trans_ATLLib::ITransCriptPtr Trans;
    7. hr = Trans.CreateInstance(__uuidof(Trans_ATLLib::TransCript));
    8. if (hr==S_OK)
    9. {cout<<"INSTANCE CREATED\n";}
    10.  
    11. hr =Trans->EnableLastCharTashkeel(true);
    12. if (hr==S_OK)
    13. {cout<<"EnableLastCharTashkeel DONE\n";}
    14.  
    15. hr =Trans->EnableEmphaticLAM_RAA(true);
    16. if (hr==S_OK)
    17. {cout<<"EnableEmphaticLAM_RAA DONE\n";}
    18.  
    19. VARIANT_BOOL test;
    20. test = Trans->SetText(arabic_string);
    21. if (test==0)
    22. {cout<<"error in setting the arabic sting\n";}
    23.  
    24. string result;
    25. result = Trans->GetResult();
    26.  
    27. istringstream iss(result);
    28. vector<string> phonemes;
    29. copy(istream_iterator<string>(iss),istream_iterator<string>(),back_inserter<vector<string> >(phonemes));
    30. return phonemes;
    31.  
    32. }
    To copy to clipboard, switch view to plain text mode 

    but i found that qt doesn't use the same method

    can any one help me in calling these functions in qt

    thanks in advance
    Last edited by wysota; 24th September 2011 at 22:13. Reason: missing [code] tags

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.