Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
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?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement