in reply to Prototype problem for XS module

Where are you trying to use UINT,  UINT hello?

Don't specify a value, leave it blank :) or add it to your typemap

Also, study the prior art :) http://cpansearch.perl.org/src/JDB/Win32-0.44/Win32.xs

Replies are listed 'Best First'.
Re^2: Prototype problem for XS module
by chessgui (Scribe) on Feb 05, 2012 at 16:41 UTC
    I'm new to XS programming. I've tried to declare the 'uType' input field to the function as 'UINT' (since this is the way in C the function is declared):
    int WINAPI MessageBox( __in_opt HWND hWnd, __in_opt LPCTSTR lpText, __in_opt LPCTSTR lpCaption, __in UINT uType );
    My first impression from the error message was that I'm completely forbidden to use windows.h declared data types. Now I see that I can use them safely _inside_ a function. The problem only arises with the declaration and passing of args to the function (which is not a big deal: I want to pass only very simple input to the sub, rather use complicated types like NOTIFYICONDATA inside the sub).