Erreur Nombre de paramètre non valide
Bonjour,
J'ai une application où j'essaie d'appeller 'grapher7' (Grapher 7 est équivalent excel) sous C++ par MFC.
J'ai une fenêtre qui s'affiche mais j'ai une erreur qui s'affiche 'Nombre de paramètre non valide' ci-joint le code correspondant.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| void CMfcAutoDlg::OnRun()
{
Application Grapher;
Documents docs;
Document doc1;
//get its dispatch interface. This will start Grapher
if(!Grapher.CreateDispatch(_T("Grapher.Application")))
{
AfxMessageBox(_T("Call to CreateDispatch on server failed"));
return;
}
//make the program visible
Grapher.SetVisible(TRUE);
//get a pointer to the Documents object
docs = Grapher.GetDocuments();
//add a new plot window
doc1 = docs.Add(COleVariant(),COleVariant(),COleVariant());
// LPDISPATCH Add(const VARIANT & type, const VARIANT &templateFile, const VARIANT &wksFile)
} |
Pourriez-vous me donner des infos pour corriger cette erreur.
Merci d'avance.