Click here to Skip to main content
15,907,000 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Registering application Pin
Bob Flynn11-Jan-06 7:11
Bob Flynn11-Jan-06 7:11 
QuestionHow can a dialog be Modeless when invoked with DoModal Pin
Wolfram Steinke11-Jan-06 6:42
Wolfram Steinke11-Jan-06 6:42 
AnswerRe: How can a dialog be Modeless when invoked with DoModal Pin
Nish Nishant11-Jan-06 6:48
sitebuilderNish Nishant11-Jan-06 6:48 
QuestionHow do I Register an OCX as Part Of a Deployment Project? Pin
jerry1211a11-Jan-06 6:06
jerry1211a11-Jan-06 6:06 
AnswerRe: How do I Register an OCX as Part Of a Deployment Project? Pin
Sarvan AL11-Jan-06 22:15
Sarvan AL11-Jan-06 22:15 
QuestionConverting text file to xml Pin
c0711-Jan-06 5:45
c0711-Jan-06 5:45 
AnswerRe: Converting text file to xml Pin
LCI11-Jan-06 8:52
LCI11-Jan-06 8:52 
GeneralRe: Converting text file to xml Pin
Maximilien11-Jan-06 8:57
Maximilien11-Jan-06 8:57 
AnswerRe: Converting text file to xml Pin
Maximilien11-Jan-06 9:43
Maximilien11-Jan-06 9:43 
GeneralRe: Converting text file to xml Pin
c0711-Jan-06 13:59
c0711-Jan-06 13:59 
AnswerRe: Converting text file to xml Pin
Stephen Hewitt11-Jan-06 20:41
Stephen Hewitt11-Jan-06 20:41 
AnswerRe: Converting text file to xml Pin
FarPointer12-Jan-06 4:11
FarPointer12-Jan-06 4:11 
AnswerRe: Converting text file to xml Pin
c0712-Jan-06 16:14
c0712-Jan-06 16:14 
QuestionHow to dynamically retrieve ODBC parameters through code? Pin
Priya..k11-Jan-06 5:08
Priya..k11-Jan-06 5:08 
AnswerRe: How to dynamically retrieve ODBC parameters through code? Pin
Koushik Biswas11-Jan-06 16:10
Koushik Biswas11-Jan-06 16:10 
GeneralRe: How to dynamically retrieve ODBC parameters through code? Pin
Priya..k11-Jan-06 22:23
Priya..k11-Jan-06 22:23 
AnswerRe: How to dynamically retrieve ODBC parameters through code? Pin
Koushik Biswas12-Jan-06 5:48
Koushik Biswas12-Jan-06 5:48 
Aha! So you are trying to retrieve username and password for one or more DSN-s programmatically. I do not know your purpose, but providing you with a way of doing that is like providing a mechanism by which anybody can hack into a database and wreck havoc with privacy! Suspicious | :suss: How can you expect that the password will just be stored somwhere where you can go and pick it up from? If it is easy like that, it beats the purpose of a "password" doesn't it?

Now here is what you can do: DSN entries are all stored in the registry under either HKCU\ Software\ ODBC\ ODBC.INI or HKLM\ Software\ ODBC\ ODBC.INI (depending on whether they're User or System DSNs). You just have to read the correct registry key (key name = DSN Name). If you run regedit and drill down to that location, you will see all your DSN-s listed. For any DSN, the values listed are all or some of these:

Database, Driver, LastUser, Server, Trusted_Connection...

But Password is not stored in the registry. You cannot get the password. As I told you, Microsoft won't be in business long if they provided you a way of getting to that! I am sure the password is stored somewhere encrypted - even if you knew the location, you probably have to retrieve the encryption key to decrypt it. And on top of that, your executable would probably need to set administrative privileges for itself to do any of that.





Koushik Biswas
QuestionSerial Presence Detect Pin
André Ziegler11-Jan-06 4:46
André Ziegler11-Jan-06 4:46 
QuestionIStream class Pin
LCI11-Jan-06 4:17
LCI11-Jan-06 4:17 
AnswerRe: IStream class Pin
Stephen Hewitt11-Jan-06 15:28
Stephen Hewitt11-Jan-06 15:28 
QuestionDigital I/O and ActiveX Pin
sweep12311-Jan-06 3:57
sweep12311-Jan-06 3:57 
AnswerRe: Digital I/O and ActiveX Pin
James R. Twine11-Jan-06 5:15
James R. Twine11-Jan-06 5:15 
QuestionSinh Calculator Pin
Dylan06038811-Jan-06 3:42
Dylan06038811-Jan-06 3:42 
AnswerRe: Sinh Calculator Pin
Russell'11-Jan-06 4:17
Russell'11-Jan-06 4:17 
GeneralRe: Sinh Calculator Pin
Russell'11-Jan-06 4:38
Russell'11-Jan-06 4:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.