CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: help.....

  1. #1
    Join Date
    May 1999
    Posts
    26

    help.....

    anyone can tell me what's wrong with this code??
    i got runtime error when i got into the second line....

    DISPPARAMS dispParams;
    dispParams.rgvarg[0].vt = VT_I2;
    dispParams.rgvarg[0].iVal = 1;
    dispParams.cArgs = 1;
    dispParams.cNamedArgs = 0;




    thanks in advance

    adachi


  2. #2
    Guest

    Re: help.....

    you are referencing memory that has not been allocated:
    dispParams.rgvarg[0].vt = VT_I2;
    look at the definition of DISPPARAMS and you will see that the rgvarg variable is defined like:
    VARIANTARG FAR* rgvarg;
    which does not allocate memory;


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured