da bin ich wieder,
ich versuche jetzt das ganze mit Hilfe von RegisterXLL zu regiestieren.
Leider liefert die Funktion RegisterXLL 0 also ist falsch gelaufen
Da den cod
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
int nRetCode = 0;
// MFC initialisieren, Ausgabe und Fehlermeldung bei Fehlern
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
{
// ZU ERLEDIGEN: Fehlercode gemäß Ihren Anforderungen ändern
cerr << _T("Fatal Error: MFC initialization failed") << endl;
nRetCode = 1;
}
else
{
HRESULT hRes = CoInitialize(NULL);
if (FAILED(hRes))
return -1;
LPCSTR strfilename;
strfilename = "test.xll";
try
{
_Application app; // app is an _Application object.
_Workbook book; // More object declarations.
_Worksheet sheet;
Workbooks books;
Worksheets sheets;
Range range; // Used for Microsoft Excel 97 components.
LPDISPATCH lpDisp; // Often reused variable.
// Common OLE variants. Easy variants to use for calling arguments.
COleVariant
covTrue((short)TRUE),
covFalse((short)FALSE),
covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
// Start Microsoft Excel, get _Application object,
// and attach to app object.
if(!app.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Couldn't CreateDispatch() for Excel");
return -1;
}
// Set visible.
app.SetVisible(TRUE);
//app.SaveWorkspace(COleVariant(strfilename));
if(!app.RegisterXLL(strfilename))
AfxMessageBox("Didn't register the test.xll"); // Hier rutsche ich rein ;(
[/PHP]
Hiiiiiiiiiiiiilffffffffffe !!!