|
From: Slava P. <sl...@ba...> - 2001-05-18 14:37:34
|
I see several tasks that we need to solve to successfully code the project:
1) typelibrary generation is based on Far headers. I did convertion from .H
to .IDL manually and used 1702 headers. We can write perl script to
automate the process. Also some constants are taken from "winuser.h" and
"winnt.h"
2) We can wrap all dispatch method implementations in custom file format.
Consider AutoGen toolkit for unix systems. I thought we could do C macros
wrappers but it might not solve all problems. E.g.:
GET(FileName)
EditorInfo ei;
if (!g_Info.EditorControl(ECTL_GETINFO, &ei))
return E_FAIL;
*pRetVal = SysAllocString(CHAR_TO_OLE(ei.FileName));
expands to
STDMETHODIMP CEditor::get_FileName(BSTR *pRetVal)
{
PTR(pRetVal);
EditorInfo ei;
if (!g_Info.EditorControl(ECTL_GETINFO, &ei))
return E_FAIL;
*Val = SysAllocString(CHAR_TO_OLE(ei.FileName));
return S_OK;
};
The file format is negotiable. We do our own precompiler!
This prevents us from dealing with IDispatch and other interfaces
implementation routine.
3) Error handling is implemented ugly. No strategy. There is no useful
logging in debug build. ISupportErrorInfo is not implemented - we need this
feature to report detailed descriptions of errors to script (appears in VBS
as "Err" object).
4) The compile time and run-time script errors can be and must be
distinguished - but they do not. E.g. compile error results in dialog to
allow user edit the script. Run-time error additinally may offer
"ignore"/"ignore all" option.
5) Why the resulting image is so big? (even with startup code)
|