in reply to Win32::API::Struct - Automatic pointer creation not working ?

LPPOINT is not a structure, it is a type.

POINT is a structure, and LPPOINT is, long pointer to a POINT structure.

You create a POINT structure, fill in the values, and then pass it to an api call that takes an LPPOINT as an argument. Under the covers, Win32::API obtains the address of the memory Perl allocates to hold the POINT structure and passes that to the api.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon
  • Comment on Re: Win32::API::Struct - Automatic pointer creation not working ?

Replies are listed 'Best First'.
Re^2: Win32::API::Struct - Automatic pointer creation not working ?
by fx (Pilgrim) on Jul 05, 2004 at 09:51 UTC

    I've had a look at the C function I am trying to call and althought it wants a pointer to struct, the variable name for this pointer to struct does not being LP - it's just called WORKITEMINFO.

    In my mind, therefore, the automatic pointer creation of Win32::API::Struct isn't going to help me.

    Does anyone have any suggestions as to how I should progress this - it's almost getting to the point where I might as well just write this in C! :)

    fx, Infinity is Colourless