Click here to Skip to main content
15,559,665 members
Home / Discussions / COM
   

COM

 
AnswerRe: Rendering html pages wth mshtml alone (no webbrowser object or shdocvw!) Pin
«_Superman_»23-Sep-09 21:38
professional«_Superman_»23-Sep-09 21:38 
GeneralRe: Rendering html pages wth mshtml alone (no webbrowser object or shdocvw!) Pin
gxie24-Sep-09 4:03
gxie24-Sep-09 4:03 
GeneralRe: Rendering html pages wth mshtml alone (no webbrowser object or shdocvw!) Pin
«_Superman_»24-Sep-09 22:25
professional«_Superman_»24-Sep-09 22:25 
QuestionHow to use Mysql Database in ATLCOM project. Pin
Rits11038923-Sep-09 2:22
Rits11038923-Sep-09 2:22 
AnswerRe: How to use Mysql Database in ATLCOM project. Pin
Rits11038915-Oct-09 21:54
Rits11038915-Oct-09 21:54 
Questioncorba application from java to java Pin
jayshree1822-Sep-09 3:50
jayshree1822-Sep-09 3:50 
AnswerRe: corba application from java to java Pin
Richard MacCutchan22-Sep-09 5:45
mveRichard MacCutchan22-Sep-09 5:45 
Questionexpression cannot be evaluated:0x0046d5b0 _com_error Pin
gtag17-Sep-09 22:06
gtag17-Sep-09 22:06 
Hi,

Again I am here with new one.

Following is the code , I am attaching the instance of excel to active excel.

Excel::_ApplicationPtr XL;
     Excel::_WorkbookPtr book;
     string XLWBName;
try
     {
     CoInitialize(NULL);
     HRESULT hr = XL.GetActiveObject(_T("Excel.Application"));
    
          book = XL->;Workbooks->;Item[1];
          XLWBName = book->Name;
                    return true;
     }
     catch(_com_error &error)
     {
          cout << "COM error"<< endl;  
          return false;
     }

I implemented this in two applications:

In 1st application it is working perfectly , after coinitialize i kept the breakpoint then it is called 2 methods from comip.h

1st is:HRESULT GetActiveObject(const CLSID&amp; rclsid) throw()
2nd is: HRESULT GetActiveObject(LPCWSTR clsidString) throw()

In 2nd application it is not working and checked the sequence of methods calling from comip.h, its calling only one method that is :
HRESULT GetActiveObject(LPCWSTR clsidString) throw()

Checked the value of book and other instances:

((*(IUnknown*)(&amp;(*(IDispatch*)(&amp;*((book).m_pInterface)))))).__vfptr
__vfptr = CXX0030: Error: expression cannot be evaluated


[0] = 0x0046d5b0 _com_error::`scalar deleting destructor'(unsigned int)
__vfptr = 0x004f5af4 const _com_error::`vftable'

please give me clue where I am doing wrong or something need to be added?

Regards,
Gtag
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 
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 

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.