Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Knowing path of MFC executable Pin
Sakhalean28-Jun-11 19:20
Sakhalean28-Jun-11 19:20 
GeneralRe: Knowing path of MFC executable Pin
pix_programmer28-Jun-11 19:34
pix_programmer28-Jun-11 19:34 
GeneralRe: Knowing path of MFC executable Pin
Randor 29-Jun-11 1:33
professional Randor 29-Jun-11 1:33 
GeneralRe: Knowing path of MFC executable Pin
Albert Holguin29-Jun-11 9:17
professionalAlbert Holguin29-Jun-11 9:17 
AnswerRe: Knowing path of MFC executable Pin
Charles Oppermann4-Aug-11 13:02
Charles Oppermann4-Aug-11 13:02 
AnswerRe: Knowing path of MFC executable Pin
softwaremonkey28-Jun-11 20:10
softwaremonkey28-Jun-11 20:10 
AnswerRe: Knowing path of MFC executable Pin
Chuck O'Toole29-Jun-11 15:57
Chuck O'Toole29-Jun-11 15:57 
QuestionCall Invoke() fails [modified] Pin
yaxiya28-Jun-11 16:29
yaxiya28-Jun-11 16:29 
Hi All,
Program Execution to Invoke() and failes.
....
char buf[200]; 
 OLECHAR *MethodName=L"OpenCurrentDatabase";    
 OLECHAR *BstrPassword=L"";    
 HRESULT hret;.
 DISPPARAMS params;
 VARIANTARG args[3]; 
 BSTR DBLocation=SysAllocString(L"D:\\Example.mdb");
 memset(¶ms,0,sizeof(params));
 memset(args,0,sizeof(args));  
 args[2].vt=VT_BSTR;                
 args[2].bstrVal=DBLocation;
 args[1].vt=VT_BOOL;             
 args[1].boolVal=FALSE;
 args[0].vt=VT_BSTR;            
 args[0].bstrVal=BstrPassword;
 params.cArgs=3; 
 params.rgvarg=args; 
 hret=d->lpVtbl->Invoke(d,dispid,&IID_NULL,LOCALE_USER_DEFAULT,DISPATCH_METHOD,¶ms,NULL,NULL,NULL);
 if(FAILED(hret)) { 
    printf("Invoke Failed....\n"); 
    sprintf(buf,"Invoke(%08lx) failed w/err 0x%08lx",dispid,hret);
    MessageBox(NULL, buf, "Test", 0x10010);
 }
...

Debug and find hret's values is 0x80020009.I Inquiry typelibrary:
[id(0x0000094e), helpcontext(0x0000107a)]
     HRESULT OpenCurrentDatabase(
                     [in] BSTR filepath,
                     [in, optional, defaultvalue(0)] VARIANT_BOOL Exclusive,
                     [in, optional, defaultvalue("")] BSTR bstrPassword);

Do not know what the problem is. thanks

modified on Tuesday, June 28, 2011 10:36 PM

AnswerRe: Call Invoke() fails Pin
David Crow28-Jun-11 16:53
David Crow28-Jun-11 16:53 
GeneralRe: Call Invoke() fails Pin
yaxiya28-Jun-11 17:05
yaxiya28-Jun-11 17:05 
QuestionCButton::DrawItem not called when owner dialog is "Restored" Pin
Albert Holguin28-Jun-11 9:24
professionalAlbert Holguin28-Jun-11 9:24 
AnswerRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Code-o-mat28-Jun-11 22:12
Code-o-mat28-Jun-11 22:12 
GeneralRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Albert Holguin29-Jun-11 7:51
professionalAlbert Holguin29-Jun-11 7:51 
GeneralRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Albert Holguin29-Jun-11 7:52
professionalAlbert Holguin29-Jun-11 7:52 
GeneralRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Code-o-mat29-Jun-11 7:56
Code-o-mat29-Jun-11 7:56 
QuestionREAD or WRITE .XLS File Pin
svkhadilkar28-Jun-11 6:01
svkhadilkar28-Jun-11 6:01 
AnswerRe: READ or WRITE .XLS File Pin
Richard MacCutchan28-Jun-11 6:55
mveRichard MacCutchan28-Jun-11 6:55 
Questionmissing zero in ostringstream format [modified] Pin
ed welch28-Jun-11 3:58
ed welch28-Jun-11 3:58 
AnswerRe: missing zero in ostringstream format Pin
enhzflep28-Jun-11 5:24
enhzflep28-Jun-11 5:24 
GeneralRe: missing zero in ostringstream format Pin
ed welch28-Jun-11 5:31
ed welch28-Jun-11 5:31 
GeneralRe: missing zero in ostringstream format Pin
enhzflep28-Jun-11 5:56
enhzflep28-Jun-11 5:56 
Question_atoi64 in VS10 Pin
gomathylakshmanan28-Jun-11 3:43
gomathylakshmanan28-Jun-11 3:43 
AnswerRe: _atoi64 in VS10 PinPopular
Chuck O'Toole28-Jun-11 5:21
Chuck O'Toole28-Jun-11 5:21 
QuestionON_NOTIFY_REFLECT_EX called twice Pin
_Flaviu27-Jun-11 22:06
_Flaviu27-Jun-11 22:06 
QuestionRe: ON_NOTIFY_REFLECT_EX called twice Pin
David Crow28-Jun-11 3:27
David Crow28-Jun-11 3: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.