Apr 032009
 

This may not be a big deal to those who knows Ada well, but it is really big move to me – now I know how to create Ada binding.

I’m using win32ada with GNAT to program as everybody knows, but soon I found win32ada is not complete. People told me current version was created in year 1999, thus most features from Windows 2000/XP/Vista are not there. I’m missing two important APIs for now, SetWindowRgn and LoadImage, for some special visual effect, but obviously those functions are not there.

So once I understand how binding works, things are getting easy enough:

function LoadImage (
hInst     : Win32.WinDef.HINSTANCE;
lpszName  : Win32.WinNT.LPCTSTR;
uType     : Win32.UINT;
cxDesired : Win32.INT;
cyDesired : Win32.INT;
fuLoad    : Win32.UINT
) return Win32.WinNT.HANDLE;
pragma Import (
Convention    => StdCall,
Entity        => LoadImage,
External_Name => "LoadImageA"
);

pragma Linker_Options("-luser32");

“pragma  Linker_Options” is not a must as win32ada includes it.

 Posted by at 22:37
Apr 032009
 

I was thinking computer is the best listener, but obviously it is not, as it can still disturb you by behaving weirdly, or just stop to respond whenever you want a feedback, and sure, it is not always available whenever you want it. So I think … may be the air is the best listener, and I’m trying to talk to air now.

There are always something that you do want to speak up, but if the topic is pretty bothering then you would like not to disturb others, as spread the negative feeling is not the right thing to do. For most time you know you don’t need a feedback, just someone who can listen to you and then that’s it.

So the air is perfect for this – it is at anywhere I can be now, it is there for all the time, it is gentle and nice, never complains. I don’t care it does not respond me, I don’t mind it ignores my emotional behavior for all the time, actually that’s what I just want from it.

 Posted by at 09:19