[Setacl-devel] COM and SetACL
Brought to you by:
helgeklein
From: Howard W W. <hwo...@ms...> - 2003-01-23 19:10:29
|
>> COM control: Howard, would you like to start with the control? sure >> When I started to work on the main class CSetACL I implemented the interface to the outside world first - it should be complete enough by now to be able to build a control (and a console EXE) around it. My plan was to expose the public funtions in the control which are all input functions to pass data to the class. There is, of course, the need to pass strings back to the calling class/function/EXE, like detailed error/success/status messages which might be needed by the caller. I used a callback function for that purpose to be able to send any message in realtime while the program is still working. Example: someone uses the OCX to build a GUI around SetACL. The user of this GUI wants to create a permission listing of a large partition which might take a while. Via the callback function the GUI can display in real time the permissions that currently processed by SetACL. Is a callback function a viable way to do it and does it work with COM? Hum ho. (1) where are the current classes there are no files to download on the site. Are we working from a clean sheet ? (2) what kind(s) of COM objects do you want to implement. It is not possible to have one ATL COM object which will run as a console app, a COM server and as an ActiveX control, though of course there are common elements. It looks to me that the wish list consist of a. a classic ATL COM application that does pretty much the same as the current setACL b. a COM server that can be called from any C++ application; a version that supports VB6 is a little different cos of the wacky VB6 strings c. a console version of (a) d. an OCX control for scripters / VB6 My suggestion is to implement (a) amd (c) first. (b) can be derived from that fairly easily. (d) is a different bag of tricks - an ActiveX OCX control runs in the thread of the app that invokes it remember, and VB6 cannot do free threading except by black arts. Getting back to the COM object generally with COM u define the interfaces and methods and then build a UI to express them rather than developinf downwards from the UI VisualC++ wizard style. Do u have the resource files for the dialogs anyway ? It would help a lot if u can post the souce for the original SetACL so i can get my head aorund your thinking, plus anything for the new one u have apart from specs. which I have. Howard If an ActiveX control for VB6/vbscript were available, it would help to server is other additional applications, i.e. ASP-based web applications and VBA. |