Article View: borland.public.cppbuilder.nativeapi
Article #9184Re: Ras again
From: Bob Gonder
Date: Thu, 22 Jul 2004 16:56
Date: Thu, 22 Jul 2004 16:56
39 lines
2590 bytes
2590 bytes
Babak wrote: >Without Return Value , if we think its not important right now >what is the problem of the lines below , >because I cant see the Number (last line) although I already have it in >Phonebook !!! How to debug: Break down the problem into verifiable parts: First, verify that you are getting a phone number. Pop up a MessageBox() showing params.szPhoneNumber If that shows correct, then look above or below that point. For example: Comment out a line like the password line, to see if phone number starts showing. If it does, then the password line is bad. Verify that szPassword is a valid string_zero_terminated Then verify that "Password:\t"+AnsiString(params.szPassword) creates a valid (and displayable) parameter for Add() Might also want to check "passwordreturned" to see if it even gave you a password to display, before trying to display it. Keep going, verifying each line until you get to the point where things went wrong. And if all else fails, check the return value from RasGetEntryDialParams. (Should be doing that anyway, but a lot of us like to live dangerously) I like MessageBox for debugging. It is so simple to use, it eliminates a lot of potential debugging mistakes. And you can use it just about anywhere without having to change your dialogs (or create new ones) to display your debug results. > BOOL passwordreturned=TRUE;//FALSE?? what?? Doesn't matter. RasGetEntryDialParams will set it. Read the docs on it.
Technical Details
Message-ID:
<4hqvf095f567i11je2ibfh9778cbkrvm00@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40f805ab@newsgroups.borland.com> <40fce98c@newsgroups.borland.com> <mauqf0duur0e30qr9o304hbdd3t0iujkak@4ax.com> <40fe7c46@newsgroups.borland.com> <40ff5a56@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6d4b466cdd4c8652 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Ras again Date: Thu, 22 Jul 2004 09:56:09 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <4hqvf095f567i11je2ibfh9778cbkrvm00@4ax.com> References: <40f805ab@newsgroups.borland.com> <40fce98c@newsgroups.borland.com> <mauqf0duur0e30qr9o304hbdd3t0iujkak@4ax.com> <40fe7c46@newsgroups.borland.com> <40ff5a56@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 208.13.133.245 X-Trace: newsgroups.borland.com 1090515367 208.13.133.245 (22 Jul 2004 09:56:07 -0700) Lines: 41 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail