Click here to Skip to main content
15,567,448 members
Home / Discussions / COM
   

COM

 
AnswerRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
Stuart Dootson17-Sep-09 22:46
professionalStuart Dootson17-Sep-09 22:46 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag17-Sep-09 23:15
gtag17-Sep-09 23:15 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
Stuart Dootson17-Sep-09 23:28
professionalStuart Dootson17-Sep-09 23:28 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag17-Sep-09 23:42
gtag17-Sep-09 23:42 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
Stuart Dootson18-Sep-09 0:34
professionalStuart Dootson18-Sep-09 0:34 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag18-Sep-09 1:12
gtag18-Sep-09 1:12 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
Stuart Dootson18-Sep-09 1:16
professionalStuart Dootson18-Sep-09 1:16 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag18-Sep-09 1:54
gtag18-Sep-09 1:54 
Surely I will check out the blog u mentioned.

After doing little analysis on both the applications I have got few inputs for not getting attached to active object, but solution I couldn't?

Following are the functions called from comip.h
HRESULT GetActiveObject(const CLSID& rclsid) throw()
      {
          _Release();

            IUnknown* pIUnknown;

            HRESULT hr = ::GetActiveObject(rclsid, NULL, &pIUnknown);

            if (SUCCEEDED(hr)) {
                  hr = pIUnknown->QueryInterface(GetIID(), reinterpret_cast<void**>(&m_pInterface));

                  pIUnknown->Release();
            }

            if (FAILED(hr)) {
                  // just in case refcount = 0 and dtor gets called
                  m_pInterface = NULL;
            }

            return hr;
      }

      // Attach to the active object specified by clsidString.
      // First convert the LPCWSTR to a CLSID.
      //
      HRESULT GetActiveObject(LPCWSTR clsidString) throw()
      {
            if (clsidString == NULL) {
                  return E_INVALIDARG;
            }

            CLSID clsid;
            HRESULT hr;

            if (clsidString[0] == '{') {
                  hr = CLSIDFromString(const_cast<LPWSTR> (clsidString), &clsid);
            }
            else {
                  hr = CLSIDFromProgID(const_cast<LPWSTR> (clsidString), &clsid);
            }

            if (FAILED(hr)) {
                  return hr;
            }

            return GetActiveObject(clsid);
      }

Of these functions one func is having "_Release();" . This is not getting called in one of my application and error is which i mentioned in previous post.

I wonder that same code works perfectly in one application on same pc and in other it's not.

Anyway I will check the workaround thing which u mentioned.

Thank you

Regards,
Gtag.
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
Stuart Dootson18-Sep-09 2:50
professionalStuart Dootson18-Sep-09 2:50 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag18-Sep-09 2:55
gtag18-Sep-09 2:55 
AnswerRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag30-Sep-09 2:19
gtag30-Sep-09 2:19 
QuestionUsing C# .dll in unmanaged C++ application Pin
mypicturefaded17-Sep-09 10:59
mypicturefaded17-Sep-09 10:59 
AnswerRe: Using C# .dll in unmanaged C++ application Pin
«_Superman_»18-Sep-09 1:00
professional«_Superman_»18-Sep-09 1:00 
GeneralRe: Using C# .dll in unmanaged C++ application Pin
mypicturefaded18-Sep-09 4:54
mypicturefaded18-Sep-09 4:54 
AnswerRe: Using C# .dll in unmanaged C++ application Pin
theCPkid25-Sep-09 23:18
theCPkid25-Sep-09 23:18 
GeneralRe: Using C# .dll in unmanaged C++ application Pin
mypicturefaded26-Sep-09 7:27
mypicturefaded26-Sep-09 7:27 
Questionloosing data in COM method Pin
shivako17-Sep-09 3:07
shivako17-Sep-09 3:07 
AnswerRe: loosing data in COM method Pin
Stuart Dootson17-Sep-09 3:48
professionalStuart Dootson17-Sep-09 3:48 
AnswerRe: loosing data in COM method Pin
Roger Stoltz17-Sep-09 3:57
Roger Stoltz17-Sep-09 3:57 
AnswerRe: loosing data in COM method Pin
CPallini17-Sep-09 12:14
mveCPallini17-Sep-09 12:14 
QuestionGetting link error Pin
gtag16-Sep-09 23:00
gtag16-Sep-09 23:00 
AnswerRe: Getting link error Pin
Stuart Dootson17-Sep-09 0:23
professionalStuart Dootson17-Sep-09 0:23 
GeneralRe: Getting link error Pin
gtag17-Sep-09 1:35
gtag17-Sep-09 1:35 
GeneralRe: Getting link error Pin
Stuart Dootson17-Sep-09 2:00
professionalStuart Dootson17-Sep-09 2:00 
GeneralRe: Getting link error Pin
gtag17-Sep-09 2:29
gtag17-Sep-09 2:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.