Invoking Function from Watch Window

Hello All
    I have a question about VC++ debuging.
    VS debugger provides that you can execute certain type of function
function from the watch window for debugging purpose. I am having problem
with executing a function from any module other than the module containg the
function.

For e.g.

class Test
{
    int test() {
    return 10;
    }
};

void main()
{
    Test myTest;
}

Now if i add the watch t.test() it works fine. but when the class test is
plcaed in a different DLL module the watch can not find the code. According
to MSDN module can be specified as {,,ModuleName}expression.
But the problem here is that myTest is in the exe module but the Test::test
function is in DLL module. I tried various combination like
{,,DLLModule}myTest.test(),  myTest{,,DLLModule}.test() etc.

If any one knows the solution please reply.
Thanks
Faisal Mansoor

now


0
fmansoor (11)
6/21/2005 9:35:56 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
588 Views

Similar Articles

[PageSpeed] 11

> class Test
> {
>     int test() {
>     return 10;
>     }
> };
>
> void main()
> {
>     Test myTest;
> }
>
> Now if i add the watch t.test() it works fine. but when the class test is
> plcaed in a different DLL module the watch can not find the code. According
> to MSDN module can be specified as {,,ModuleName}expression.
> But the problem here is that myTest is in the exe module but the Test::test
> function is in DLL module. I tried various combination like
> {,,DLLModule}myTest.test(),  myTest{,,DLLModule}.test() etc.
>
> If any one knows the solution please reply.

This problem exists only for non-static member functions.
If you need to call such function from Watch window, the only solution known
to me is to wrap it into a static member function and pass it the pointer to the object,
and the static function will call the non-static one internally.

Something like:
{,,yourdll.dll}Test::statictest({main,,yourapp.exe}&myTest)

Regards,
Oleg
[VC++ MVP]



0
Oleg
6/21/2005 2:35:13 PM
Reply:

Similar Artilces:

Planning Lead time-Item Vendors Maintenance window
Previously used manufacturing and MRP in v9 and the Planning Lead time on the Item Vendors Maintenance window (bottom left corner), we used to enter 7 for the number of days in 1 week. MRP then suggested to place PO's using these 7 days as one week. Now when we enter 35 for example ( V9 calculated 5 weeks for placing the PO) Now since V10 it looks like it is calculating 7 weeks lead time (35 days divided by 5 days) Did something change with V10 on this field and how MRP uses it with the Request Resolution window? thanks! -- Doug The system now looks at calendars and can conside...

Error message in windows mail 12-21-09
I just set up my account and the existing messages imported fine, but when I try to send mail I get the following error: Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Subject 'new e-mail', Account: 'mail.td-wm.com', Server: 'mail.td-wm.com', Protocol: SMTP, Port: 25, Secure(SSL): No, Socket Error: 10053, Error Number: 0x800CCC0F Please help. Double check that all your account settings are correct. If they are, then e-mail scanning is a likely...

Will Publisher 97 work with later versions of windows?
just wondering if publisher 97 will work with later versions of windows such as XP or ME and suchlike? Jon Yes... -- Mary Sauer MS MVP http://dgl.microsoft.com/ http://mvps.org/msauer/ "belly483" <belly483@hotmail.com> wrote in message news:00a801c34c73$dd061820$a101280a@phx.gbl... > just wondering if publisher 97 will work with later > versions of windows such as XP or ME and suchlike? > > Jon Whilst attempting to develop brick-based storage technology, Ed reads a message from belly483 <belly483@hotmail.com> > just wondering if publisher 97 will wo...

Want Input boxes to accept unicode strings on Standard Windows XP
I have a MFC application that is currently built with MBCS mode. If I run the program on a Chinese OS (Windows XP), the input boxes (Edit Controls) can accept Chinese chars and display correctly. If I run it on a standard English XP, the input boxes won't accept Chinese chars (display as "????") -- please note that I have already installed CKJ on the system and IE and Outlook can display Chinese correctly. Is this just because of different MFC libraries used for the application? Can I force the application running on Standard XP to use the unicode libraries so ...

Excel 2000 running on Windows XP SP2 does not properly open CSV fi
The same file opened in using Excel 2000 running in Windows 2000 Pro open properly. The rows and columns are formatted properly. The same Excel 2000 opening the same CSV file but on Windows XP SP2 will not properly format the rows and columns. Hi check your regionals ettings in Windows ('Start - Control Panel') I'd suspect you have different column delimiters specified (comas versus semicolons for example) -- Regards Frank Kabel Frankfurt, Germany "Oscar" <Oscar@discussions.microsoft.com> schrieb im Newsbeitrag news:4985F8F5-5D33-425E-989C-65529CE63D05@mic...

Setting up OWA with Windows Certificate
Hi everyone, I need to configure my OWA to make use of a certificate generated by a Windows 2003 server for an Exchnage 2003 server. I know how to do this using third party (Verisign) certs but I need to find a free solution. If you could point me to the correct documentation it would be very much appreciated. Many thanks, Jose One of your options would be to use your own Certificate Authority. You can install this from the Win2k3 Server CD. With that you can generate your own certificate just like verisign. -- This posting is provided "AS IS" with no warranties, and confers...

Seeking Improvement on excel function
Dear sir, I have one question regarding an "index" formular together with "match". I used to set the following excel function to pick the data from the database: =INDEX("database",MATCH("column argument","column range",0),"target column range"). One of key thing of this excel funation is "target column range", which only allow to cover ONE column only. My question: Is there any way to improve or change the above excel function in order to make "target column range" can cover more column ranges. I have also...

Formatting multiple object types in output from a function?
I'm stumped on this one, and have searched and searched for a solution or how-to with no luck. Perhaps it just can't be done. I have a function that may or may not return objects of multiple types. I've setup the type and formatting information for each of the individual types in format.ps1xml files, and when only 1 type is returned by the function the formatting works as I would expect. However, if two or more types are returned by the function, only the formatting for the first object type is applied and then the other types are displayed however PoSH deems ap...

Discrete functions: max and min relatives
Hy guys: here is the thing, let=B4s say column A has a list of 500 values (discrete function). Is there a way to identify max and min relatives in that list ? (of course, I=B4m not interested in max and min absolutes!!!) . I guess some type of criteria need to be done. The result could be something like: Colum A, Column B,,,,,, A1 A2 I'm a max rel. .. A40 I=B4m a max rel. .. .. A105 I'm a min rel. .. .. A500 One way, if there are no local duplications: in B2: =CHOOSE(2-(A2>A1)*(A2>A3)+(A2<A1)*(A2<A3),"rel max","","rel min...

Watch these important pack
--xfjwqznj Content-Type: multipart/related; boundary="mxkczvlngqn"; type="multipart/alternative" --mxkczvlngqn Content-Type: multipart/alternative; boundary="oorghxqer" --oorghxqer Content-Type: text/plain Content-Transfer-Encoding: quoted-printable MS Client this is the latest version of security update, the "October 2003, Cumulative Patch" update which eliminates all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express as well as three new vulnerabilities. Install now to maintain the security of your com...

Windows Mail
I have recently got Windows Mail. I keep getting a message saying to create an association for the program I am trying to open, (Microsoft Powerpoint). Windows Vista. I can get into Set Associations, but dont know what to do after that. Help You really should have opened your own thread . . . . . Go to Start - Default Programs - Set Your Default Programs - see list of programs on left - select Windows Mail - on right, just below the "pane", you should see "This program has all its defaults". If not, select the second green arrow at bottom, "Choose d...

Routines or functions to do conversions
I do a lot of conversions of different types most frequently involving measurements, for example from square meters to square feet, gallons to cubic feet, etc (sometimes involving unusual measures such as Chinese mu, a measure of area). Are there any functions or routines to do conversions? Also, if I keep constants such as SFPerM2 (square feet per square meter), is there an easy way to make them quickly accessible to all my spreadsheets or new spreadsheets? Thanks for any help Huck Excel has a Convert Function in the Analysis Toolpak. I use a handy utility called Converter, f...

LOOKUP Function #6
I discovered LOOKUP today and it worked fine until I made changes to the table of data. Now it's returning incorrect figures. Any suggestions? AC Sales wrote: > I discovered LOOKUP today and it worked fine until I made changes to the > table of data. Now it's returning incorrect figures. Any suggestions? --------- For LOOKUP() to work properly the data all has to be sorted into order first. Did you perhaps put an out of sequence value into the table? Bill ...

keeping footer from resizing when using the fit to page function
How do I keep the footer from shrinking in excel when i use the "fit to page" option for my worksheets. I'd like it to stay the same size no matter what the font of the worksheet is. ...

Windows 7 x64 msnmsgr.exe crash
When Windows Live Messenger starts up when I log in, I very often get an application crash. Details are: Source Windows Live Messenger Summary Stopped working Date ‎3/‎31/‎2010 19:53 Status Report sent Description Faulting Application Path: C:\Program Files (x86)\Windows Live\Messenger\msnmsgr.exe Problem signature Problem Event Name: BEX Application Name: msnmsgr.exe Application Version: 14.0.8089.726 Application Timestamp: 4a6ce533 Fault Module Name: unknown Fault Module Version: 0.0.0.0 Fault Module Timestamp: 00000000 Exception Offset: 10100002 Exceptio...

Center Access2007 Form in the middle of access Main Window
Thank You Is there any easy way to center access 2007 forms in the middle of the screen (Monitor) or access main window. and give me good result Hello, I think there is no built in feature to achieve this goal. You may need to create a new form and configure it as the main window. You could enumerate forms and create buttons etc to open forms from this main form. For example, you could use hte following code enumerate forms in your database: Dim db As Database Set db = CurrentDb Set cntContainer = db.Containers("Forms") For Each doc In cntContainer.Documents Str...

Macro to open print window and set to print entire workbook
I need help getitng a macro created to open the print window, then se it to 'print the entire workbook'. Then the macro would stop. At whic the user would then specify additional specs for printing. I.E. # o pages, paper size etc. I am trying to default the 'print entire work book option' withou restricting the user from other print specs. I have a macro that will print once a button is clicked on th spreadsheet but it goes directly to print and does not let the user se other specs. I.E. # of pages, etc. Thanks in advanc -- retseor ---------------------------------------...

Windows 7 slow LAN connectivity
It's really annoying that when you connect two computers to a WiFi AP and try to copy files between them it takes ages to copy anything and is slow beyond any reason. Even when I connected one of them via wire it's still terribly slow and even freezes from time to time. One of the PCs is XP the other runs 7 Ultimate. I already disabled that thing that checks for connection errors or something but still no joy. yaro yaro137 wrote: > It's really annoying that when you connect two computers to a WiFi > AP and try to copy files between them it takes ages to copy > a...

CRM 4 Advance Finds with Windows 7
I have for some time been using CRM4 with windows 7 (RC and RTM) and have found one problem. Just wondering if anyone else has seen this and found a resolution yet. When in an advance find it will hang when selecting a pick list. For example. Open advanced find, Select Activities and use saved view [new] In the details select ActivityStatus as the Field, select equals and then click the three dots to chose the values. Select any values then click OK. At this point the page still says 'enter value' and alot of the page can not be clicked on. This will always happen on a new adv...

Missing Function in Excel 2003
Dear All In Excel 2000 I used to use a function called "MS Access Form" , which was located under the DATA menu. Since I have upgraded the Office version to 2003, I cannot find this function anywhere in Excel. This function takes a highlighted table, and makes a suitable entry form in Access to facilitate the data entry process Best Regards and Thanks in advance Ahmed Gaafar You need to load the Access Links Add-In from the Tools menu. HTH, Greg "Ahmed Gaafar" <elameen@intouch.com> wrote in message news:1c60a01c42218$270e3ae0$a401280a@phx.gbl... > Dear...

Attachments in Windows Mail
Somehow I changed all my old attachments to PDF, I can't open anything without going to Adobe Photoshop.....What did I do??? how can I fix them back??? "jay jay" <jay jay@discussions.microsoft.com> wrote in message news:C4B8E2DB-67F3-4C65-8D45-14CBDAF0101D@microsoft.com... > Somehow I changed all my old attachments to PDF, I can't open anything > without going to Adobe Photoshop.....What did I do??? how can I fix them > back??? ...

Security descriptors in Windows Server 2003
Hello Expert(s) In windows 2003 SP2 server if we run "chkdsk /f" in data volume then the Chkdsk.exe utility incorrectly identifies and resets security descriptors to default value. Do you have any idea how to fix that issue because in my environment there servers with more than 500 GB data and needs chkdsk /f to be run. Cheers, AD The CHKDSK utility incorrectly identifies and deletes in-use security descriptors http://support.microsoft.com/kb/831374/ -- Regards, Dave Patrick ....Please no email replies - reply in newsgroup. Microsoft Certified Pr...

How do I create an A3 size document using Windows 7
A3 is not listed in the pre-set schedule of document sizes in Windows 7 (unlike previous versions of Windows). How do I create such a document using Windows 7? Does your printer support A3? Word/Windows will display the paper sizes supported by the default (or currently active) printer. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "A3 documents in Windows 7" <A3 documents in Windows 7@discussions.microsoft.com> wrote in message news:F2647F06-5560-41A6-9C2F-462E6198C989@microsoft.com... > A3 is ...

SendMessage vs function call
Hello, I wonder is there any difference in using SendMessage() and calling a function directly when in the same class, e.g. CView? // Anders -- English is not my first, or second, language so anything strange, or insulting, is due to the translation. Please correct me so I may improve my English! >I wonder is there any difference in using SendMessage() and calling a >function directly when in the same class, e.g. CView? They are obviously different but perhaps the most significant difference would be if you have different threads in your application. If you call a function it'l...

@ if function...maybe
I have a spreadsheet with schoolkids names listed in column A, then I have the point value of their homework assigments listed in row 4. Each assignment that is turned in is given a point value. What I want to do is create a formula at the end of the term that will give me their average of homework assignements. ie. 20 + 22 + 25 + 20, would give them an average of 21.75 if there were only 4 assignments. What I am trying to incorporate is if there are 5 assignments and only 4 are turned in or graded, then I don't want the average to become 17.40, I want it to stay at 21.75. I am thinkin...