Click here to Skip to main content
15,878,708 members
Home / Discussions / COM
   

COM

 
AnswerRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
Stuart Dootson17-Sep-09 21:46
professionalStuart Dootson17-Sep-09 21:46 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag17-Sep-09 22:15
gtag17-Sep-09 22:15 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
Stuart Dootson17-Sep-09 22:28
professionalStuart Dootson17-Sep-09 22:28 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag17-Sep-09 22:42
gtag17-Sep-09 22:42 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
Stuart Dootson17-Sep-09 23:34
professionalStuart Dootson17-Sep-09 23:34 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag18-Sep-09 0:12
gtag18-Sep-09 0:12 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
Stuart Dootson18-Sep-09 0:16
professionalStuart Dootson18-Sep-09 0:16 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag18-Sep-09 0:54
gtag18-Sep-09 0: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 1:50
professionalStuart Dootson18-Sep-09 1:50 
GeneralRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag18-Sep-09 1:55
gtag18-Sep-09 1:55 
QuestionMessage Removed Pin
20-Sep-09 22:57
gtag20-Sep-09 22:57 
AnswerRe: expression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag30-Sep-09 1:19
gtag30-Sep-09 1:19 
QuestionUsing C# .dll in unmanaged C++ application Pin
mypicturefaded17-Sep-09 9:59
mypicturefaded17-Sep-09 9:59 
AnswerRe: Using C# .dll in unmanaged C++ application Pin
«_Superman_»18-Sep-09 0:00
professional«_Superman_»18-Sep-09 0:00 
GeneralRe: Using C# .dll in unmanaged C++ application Pin
mypicturefaded18-Sep-09 3:54
mypicturefaded18-Sep-09 3:54 
AnswerRe: Using C# .dll in unmanaged C++ application Pin
theCPkid25-Sep-09 22:18
theCPkid25-Sep-09 22:18 
GeneralRe: Using C# .dll in unmanaged C++ application Pin
mypicturefaded26-Sep-09 6:27
mypicturefaded26-Sep-09 6:27 
Questionloosing data in COM method Pin
shivako17-Sep-09 2:07
shivako17-Sep-09 2:07 
AnswerRe: loosing data in COM method Pin
Stuart Dootson17-Sep-09 2:48
professionalStuart Dootson17-Sep-09 2:48 
AnswerRe: loosing data in COM method Pin
Roger Stoltz17-Sep-09 2:57
Roger Stoltz17-Sep-09 2:57 
AnswerRe: loosing data in COM method Pin
CPallini17-Sep-09 11:14
mveCPallini17-Sep-09 11:14 
QuestionGetting link error Pin
gtag16-Sep-09 22:00
gtag16-Sep-09 22:00 
AnswerRe: Getting link error Pin
Stuart Dootson16-Sep-09 23:23
professionalStuart Dootson16-Sep-09 23:23 
GeneralRe: Getting link error Pin
gtag17-Sep-09 0:35
gtag17-Sep-09 0:35 
GeneralRe: Getting link error Pin
Stuart Dootson17-Sep-09 1:00
professionalStuart Dootson17-Sep-09 1:00 

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.