On 11/17/22 21:26, ToddAndMargo via perl6-users wrote:
 >
 > On Thu, Nov 17, 2022 at 7:25 PM ToddAndMargo via perl6-users
 > <perl6-us...@perl.org <mailto:perl6-us...@perl.org>> wrote:
 >
 >     Hi All,
 >
 >     I need a second pair of eyes to look at my
 >     code and tell me where I messed up.
 >
 >     http://vpaste.net/ngl1h <http://vpaste.net/ngl1h>
 >
 >     raku PopUpTest.pl6
 >     ===SORRY!=== Error while compiling K:\Windows\NtUtil/PopUpTest.pl6
 >     Unable to parse expression in argument list;
 >     couldn't find final ')' (corresponding starter
 >     was at line 167) at K:\Windows\NtUtil/PopUpTest.pl6:168
 >
 >     ------>    DWORD<HERE> $dwProcessId,
 >           expecting any of:
 >               infix
 >               infix stopper
 >
 >     167: ProcessIdToSessionId(
 >     168:   DWORD $dwProcessId,
 >     169:   DWORD $pSessionId is rw
 >     170: )
 >     171:   is native("processthreadsapi")
 >     172:   is symbol("ProcessIdToSessionId")
 >     173:   returns Bool
 >     174:   { * };


On 11/17/22 21:09, William Michels via perl6-users wrote:
Gee Todd, I don't know.

167-169: Maybe Raku doesn't like the `(` parens-enclosed signature `)` spread out over three lines?

That's my best guess for now. Try those three lines all on one line and tell us how you go.

Best Regards, Bill

I do that all-the-time.  This works.

sub WTSSendMessageA(
   HANDLE,        # [in]    DWORD,         # [in] SessionId,
    LPSTR,         # [in] pTitle,
    DWORD,         # [in] TitleLength,
    LPSTR,         # [in] pMessage,
    DWORD,         # [in] MessageLength,
    DWORD,         # [in] Style,
    DWORD,         # [in] Timeout,
    DWORD is rw,   # [out] *pResponse,
    BOOL           # [in] BOOL
)
    is native("wtsapi32")
    is symbol("WTSSendMessageA")
    { * };

Found it!!!!

Bad:
    ProcessIdToSessionId(

Fixed:
    sub ProcessIdToSessionId(


I forgot the stinkin' "sub".


AAAAAAAAAAAAAAAAHHHHHHHHHHHH!!!!!!!

Reply via email to