Click here to Skip to main content
15,884,177 members
Home / Discussions / COM
   

COM

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

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.