none
Visual Studio 2008 with C++ misses program control flow RRS feed

  • Question

  •  

    I have ported my C++ code from VS 2003 to VS 2008.   The application is a
    network application, that uses NDIS interfaces.  The problem in VS 2008 is
    the code is not executed in a sequence. 

    The function INetCfgNotifyBinding::NotifyBindingPath is a callback function
    that is called from netcfgx.dll which is implemented in our notify object. 

     

    Assume that we are calling some function A from this(NotifyBindingPath) and
    B from A and C from B.  The function C after completion should return
    control to B.  But we find that the code jumps to the beginning
    NotifyBindingPath and the entire code in function B below the function call
    C is skipped.  This works fine in VS 2003. Is this problem seen anywhere?  It it due to
    activation contexts?  How to solve the problem?  Please let me know if you need more information. 

     

    I have  inserted the line... "afxAmbientActCtx = FALSE; " in the
    InitInstance() function of my CWinApp class. This is to remove the
    activation context error that comes whenever a function in another dll is
    called. 
     

    Tuesday, January 22, 2008 7:32 AM