views:

89

answers:

1

We have an existing small key hook win32 dll program to lock (for example alt+ctrl+space) and unlock (for example ctrl+del+end) some resource. I was asked to add a dialog to ask user input user name and password when try to unlock with ctrl+del+end. We are using VC++ under .Net 2003.

Did some VC++ project but not involve MFC before. Anybody can provide some useful links for article, quick tutorial or sample code will be appreciated.

thanks,

A: 

Adding dialogs to VC++ apps is a pain (I'm sure a VC++ veteran will be along shortly to correct me on this). If this app is small, I would just port the code into a C# DLL. It would be a trivial matter to add a dialog like this to a C# application.

MusiGenesis
C# dll can be used as VC++ dll? my dll is used by another VC++ executable. i don't want to break them.
5YrsLaterDBA
Oh, never mind then. I think it is possible to call a C# dll from a VC++ app, but not without recompiling your VC++ application. And anyway, I think the technique would be more complicated then figuring out how to just add a dialog window to your DLL. There may be a Win32 API call that you can make from your C++ DLL to handle authentication, so you don't have to add a dialog at all.
MusiGenesis