General information
Category:
COM/DCOM and OLE Automation
Title:
Using exposed code in a Desktop app
I'm working on a desktop app right now, and I'm gonna expose some functionality in a COM object. What's the best way to do this?
If I were to use the exact same class in the desktop and the COM object, I think there's more to do than just make it OLEPUBLIC. Like security. In the local version, you know you've got a user logged into the system, but in the COM you don't want anyone to just fire it up.
Thats not such a big deal, what I can't figure out is how error handling would work smoothly. Would I use _vfp.StartMode to conditionally handle my errors (so I can do COMRETURNERROR() or not)? For seem reason that just doesn't seem right.
Or is it a better idea to simply leave my object the way it is, and right a new class that will be the COM and wrapps to it?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only