Read up on pack() and unpack(). We use it to get C++ structures from a dll
and throw them into a hash ref and vice versa.
The basic concept would be for your dll or whatever to pass a pointer to
your perl script. Your perl script would then unpack() it as a long into a
variable. For perl, that's the same thing as a string which happens to be
a number. If you know how much memory each of your members of your
structure takes up, you can then (probably using another dll) get back into
memory and read off the memory piece by piece. Convoluted? Definitely --
we have way too much time on our hands :)
At 23:06 21.05.2001 -0700, you wrote:
>Hello,
>
>
>I would like to know how to use win32 functions which
>take structures as their parameter.
>For example, the API 'SHBrowseForFolder' take the
>following structure:
>
>typedef struct _browseinfo {
> HWND hwndOwner;
> LPCITEMIDLIST pidlRoot;
> LPTSTR pszDisplayName;
> LPCTSTR lpszTitle;
> UINT ulFlags;
> BFFCALLBACK lpfn;
> LPARAM lParam;
> int iImage;
>};
>
>How do i 'translate' this structure and use this
>function with Win32::API module?
>
>Any sample code?
>
>Thanks in Advance,
>
>
>H3li0
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Auctions - buy the things you want at great prices
>http://auctions.yahoo.com/
Aaron Craig
Programming
iSoftitler.com