Is it possible to get the size of a LPVOID pointer?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Is it possible to get the size of a LPVOID pointer?

  1. #1
    Join Date
    Jan 2010
    Posts
    10

    Unhappy Is it possible to get the size of a LPVOID pointer?

    I have intercepted ReadFile() by means of a Proxy DLL and I need to know the size of lpBuffer.

    I haven't yet seen any method that could help me out.

    Do you guys know any way to accomplish this? thanks.

  2. #2
    Join Date
    Apr 1999
    Posts
    27,427

    Re: Is it possible to get the size of a LPVOID pointer?

    Quote Originally Posted by sonnyk88 View Post
    I have intercepted ReadFile() by means of a Proxy DLL and I need to know the size of lpBuffer.

    I haven't yet seen any method that could help me out.

    Do you guys know any way to accomplish this? thanks.
    A pointer contains no information except that it points somewhere. Unless you have the size passed to you in some way, forget about it.

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,526

    Re: Is it possible to get the size of a LPVOID pointer?

    Quote Originally Posted by sonnyk88 View Post
    I have intercepted ReadFile() by means of a Proxy DLL and I need to know the size of lpBuffer.

    I haven't yet seen any method that could help me out.

    Do you guys know any way to accomplish this? thanks.
    But if you already have intercepted a call to ReadFile, the next parameter (after that void pointer) IS a size of that buffer!
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center