Chris Wagner wrote:
At 11:08 AM 12/14/2005 +1100, Rod Butcher wrote:
TCHAR szExeFile[MAX_PATH];
};
I then get error "Invalid Type 'M' in pack... at Struct.pm".
This appears to be happening at [MAX_PATH] because I don't get the error
if I omit it or hardcode it to 1 e.g. [1]. But if I do then I then get
That sounds to me like it's not recognizing MAX_PATH as a constant. What is
it's value supposed to be and are u sure it's set to that value? If pack
was fed the literal string "MAX_PATH" instead of a template value it would
die just as the error said.
It looks like MAX_PATH defines the length of variable length string
szExeFile, in C. Hence for C this is a legal field definition.. but it
looks to me as if Win32::Api::Struct is not handling it as such. Neither
my Perl nor my C is strong enough to figure out a way around this. It
seems it's no good hardcoding MAX_PATH to some arbitrary value e.g.
TCHAR szExeFile[10] because the underlying C function needs a variable
name so it can deposit the length of the string in it - in this case the
command name that originated the particular process, which can have any
length. So how can I define MAX_PATH so that Struct.pm can use it ?
--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede malis"
00000100
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--
-----------------------------------------------------
<corporate disclaimer drivel goes here>
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs