March 28, 2024, 05:57:29 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Sapero's Windows include files(History)

Started by Ionic Wind Support Team, May 23, 2006, 02:09:22 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

sapero

February 05, 2009, 08:07:33 AM #125 Last Edit: June 09, 2009, 06:02:35 AM by sapero
I have started converting headers from the latest Windows7 SDK, and today found a small problem with NONCLIENTMETRICS structure. It has one additional parameter iPaddedBorderWidth so the sizeof macro returns 4 bytes more than SystemParametersInfo expects, and the api fails on XP.
This is a big problem, because programs compiled for Vista and running on XP machine will fail at SystemParametersInfo(SPI_GETNONCLIENTMETRICS) without checking OS version. Therefore I have removed this new parameter from NONCLIENTMETRICS, and added it to custom NONCLIENTMETRICS_VISTA structure.

New in this upload: winuser, CommCtrl, wtypes, Uxtheme, shellapi, guiddef, dwmapi and vsstyle are coming from win7.
CommCtrl has full set of control macros, like Button_SetElevationRequiredState().
Both instalers have extended manifests to prompt for administrative rights, in order to write to Program Files directory in Vista and above.
Added CURL, Microchip and Winamp includes in separate subdirectories.
Added all static libraries from win7 to /libs/sdk.

Links expired.

pistol350

Regards,

Peter B.

Barney

Thank you very much, sapero. Your work is really invaluable and much appreciated.

Barney

Raid

Proudly licensed EBASIC owner since Feb 2009. Network library present!

sapero

February 27, 2009, 04:25:44 PM #129 Last Edit: June 09, 2009, 06:02:55 AM by sapero
A small update for common controls macros (missing declarations, bug in ListView_SetItemState), plus about 1MB of new headers.

Links expired.

Raid

Just wanted to take the time and say thanks for all the great and hard work you put into these header files.

Proudly licensed EBASIC owner since Feb 2009. Network library present!

Haim

Hello,
I have been using Sapero's headers for a long time with no problem, until lately, when I tried to compile a program
and I got the following error reports:
Compiling...
PropLV.src
File: winuser.inc (4125) duplicate declaration
Error(s) in compiling "C:\Program Files\Aurora\examples\PropLV.src"

If I comment out line 4125 in winuser.inc, everything compiles correctly.
There are no declarations in my program. Everything is declared through:

#define WIN32_LEAN_AND_MEAN
#include "windows.inc"

BTW, line 4125 is a feclaration for messagebox:
declare import, MessageBox alias MessageBoxA(HWND hWnd, LPCSTR lpText, opt LPCSTR lpCaption, opt UINT uType),int;

Any ideas?

Haim


sapero

March 11, 2009, 07:31:27 AM #132 Last Edit: June 09, 2009, 06:03:22 AM by sapero
Thanks for reporting, it is a missing underscore bug, i'll upload fixed version soon.
#ifdef UNICODE
declare import, _MessageBox alias MessageBoxW(HWND hWnd, LPCWSTR lpText, opt LPCWSTR lpCaption, opt UINT uType),int;
declare import, MessageBoxEx alias MessageBoxExW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType, WORD wLanguageId),int;
#else
declare import, _MessageBox alias MessageBoxA(HWND hWnd, LPCSTR lpText, opt LPCSTR lpCaption, opt UINT uType),int;
declare import, MessageBoxEx alias MessageBoxExA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, WORD wLanguageId),int;
#endif


This update includes also full set of macros for property sheets (prsht.inc)

Links expired.

sapero

April 02, 2009, 12:53:14 PM #133 Last Edit: June 09, 2009, 06:03:45 AM by sapero
Again uploaded new headers pak with bugfix only.
1. Not reported by the compiler: #if without #endif in WinUser.inc.
2. A hard bug in TreeView_SetCheckState, causing your programm to immediate crash.
3. Missing (hidden in $ifndef) Imagelist_LoadImage alias in Ebasic headers.

Links expired.

ExMember001

Hi sapero,
I just install the new headers over the old one for aurora
and now when i compile i get this error:
Compiling Resources
Compiling...
Popotte.src
File: commctrl.inc (384) duplicate constant, values different -

i have try to find the duplicate but cant find it...

sapero

Thanks for reporting. I never got this error until I read your reply and installed fresh copy of Aurora and the headers into virtual machine. I'll check my binaries.

Links updated.

ExMember001


Ficko

Hi Sapero!

This may be very stupid but I have a notion I am missing some direction here.

I see this monumental work from you but I do not really find any comprehensive description to it.
How you supposed to use this efficiently and how this actually works and how this effect the â€Ã...“regular â€Ã...“ ebasic includes what exactly got installed etc.

May this belongs to â€Ã...“everybody knowsâ€Ã, section but I certainly have the feeling to miss something.

These are my guesses but I would be happy to get some advice from the Master themselves. :D
1. You have to include â€Ã...“WINDOWSSDK.incâ€Ã, which somehow translate the MS header files or/and loads some common headers likeâ€Ã,WINDOWS.incâ€Ã,
but if you need any other header you have to include it in your source as well after â€Ã...“WINDOWSSDK.incâ€Ã,

2. â€Ã...“Windows.incâ€Ã, alone will not work correctly after the Header installation.

I do not now that I am correct but these are my guesses.

I do have lots of questions like:

When you should include â€Ã...“WINDOWSSDK.incâ€Ã, exactly?
Sometimes it seems to work correctly sometimes I am getting â€Ã...“duplicate declarationâ€Ã, like by â€Ã...“GetLogicalDrives()â€Ã,.
What is the exact rule?

How can you speed up the compilation for smaller files?
-Apparently â€Ã...“WINDOWSSDK.incâ€Ã, loads a lot of stuff which you may not always need.-
How can you tailor made it for your needs?

Appreciate your work,
Ficko

Ionic Wind Support Team

Ficko,
Sapero's includes are the equivalent of the current Windows SDK.  Instructions then would be from whatever windows API function you are trying to use, if you search MSDN for a particular API call you will see a block at the bottom that tells what include file the API call is declared in.

For example here is the MSDN listing for the winsock 'accept' function:

http://msdn.microsoft.com/en-us/library/ms737526(VS.85).aspx

At the bottom you have the requirements:
Minimum supported client   Windows 2000 Professional
Minimum supported server   Windows 2000 Server
Header   Winsock2.h
Library   Ws2_32.lib
DLL   Ws2_32.dll

Which tells you the DLL the function is in, and the include file which would be Winsock2.h, or Winsock2.inc in the case of Emergerce/aurora.

If you read the documentation that comes with the Windows SDK you will learn that you need to create a couple of definitions when including windowssdk.inc (windows.h).  For 95% of the programs you'll write using the API directlry (for Emergence) the top of your source file would look like this:


$ifndef WIN32
$define WIN32
$endif

$ifdef WIN32
$define WIN32_LEAN_AND_MEAN
$endif

$include "windowssdk.inc"


For Aurora it would look almost identical substituting # for $

WIN32_LEAN_AND_MEAN excludes rarely used headers from the base includes, so rarely used that I don't think I have ever run across a program that has used them.  The purpose is to speed up compile time.

$define WIN32 is because you are compiling for a 32 bit windows program.  The headers also contain definitions for other platforms, such as the Mac.

After the $include "windowssdk.inc" you would add other include files that contain the API definitions you are interested in, such as the aforementioned Winsock2.inc

Hope that clears some stuff up for you.

Paul.

Ionic Wind Support Team

Ficko


sapero

May 05, 2009, 02:26:37 PM #140 Last Edit: June 09, 2009, 06:09:58 AM by sapero
Updated again. The sdkincludes library is refreshed, I've removed all unused modules with floats, strings and duplicate guids. Fixed also some bugs in various headers that gave errors while compiling test programs. At least shlwapi.inc is new, from server 2008 sdk.
There is a new QISearch function. It was present in shlwapi.dll (win2000) but exported by ordinal only. Now this function is accesible even on win95, and makes a bit easier to write COM classes:
#include "shlwapi.inc"
#include "shobjidl.inc"

#asm
extern _IID_IQueryContinue

qitabQueryContinue:
dd _IID_IQueryContinue, 0
dd 0,0
#endasm

declare qitabQueryContinue(); // struct QITAB[2]

class CQueryContinue
{
declare virtual QueryInterface(REFIID *riid, void *ppvObject),HRESULT {
return QISearch(this, &qitabQueryContinue, riid, ppvObject);
}


[** - Link Remove - **

Barney

As usual, an excellent addition. Thanks for sharing, Sapero. :)

Barney

sapero

The POINTTOPOINTS bug has been removed, and if you have noticed an additional asterix from shlwapi too.
Links updated.

sapero

With the vew version 2.0.4.5 you can create ribbon user interface. It is a bit complicated, but looks promissing.
I have added two custom macros - ListView_GetItemData and ListView_SetItemData, extended the shlwapi library with IUnknown_AtomicRelease and IUnknown_Set.

IUnknown_Set is usefull if you need to copy an object (class or interface) into second variable and add a reference to it.
AtomicRelease is safer than directly calling Release method, it checks if the pointer is NULL, optionally releases the object and sets the pointer to NULL.
IUnknown *unk = get_me_unknown();
// if (unk) unk->Release();
// unk = 0;
IUnknown_AtomicRelease(&unk);


[** - Link Remove - **

sapero

June 04, 2009, 12:04:14 PM #144 Last Edit: June 04, 2009, 12:18:12 PM by sapero
Just a small note.
In the latest installer is a new propvarutil header which references to propsys.lib import library. Propsys.dll is included with Vista, so this is why I have included propsys.lib file in the installer.
Propsys.dll for Windows XP is available in Windows Search 3.0.

In the next upload i'll update all the missing propsys macros/wrappers, and include base classes for the ribbon interface.

sapero

June 09, 2009, 02:05:22 PM #145 Last Edit: June 10, 2009, 04:43:22 AM by sapero
As promised, here is the updated pak which includes all the wrappers for "propsys inline functions" and macros for the ribbon.
ListView_*etItemData bug fixed.
The uiribbon include has additional set of base classes required in applications hosting the ribbon. For examples how to use them, please see here (first reply)
CUICommandHandlerImpl, CUIApplicationImpl, CUISimplePropertySetImpl and CUICollectionChangedEventImpl. Only IUnknown part is implemented, other methods return E_FAIL or E_NOTIMPL.

Added Windows Azure headers in /include/azure. Sorry for the .opts file, you can delete it.

** - Link Removed - **

Ionic Wind Support Team

Sapero.

You probably don't here it enough.  Thank you!  Without your hard work there wouldn't be such a complete set of include files for both compilers.  I have been using them myself for the Emergence Audio Engine and I can't tell you how much time they have saved me with DX interfaces.

I can't afford alot right now, but will be sending something your way.

Paul.
Ionic Wind Support Team

sapero

July 11, 2009, 04:46:14 AM #147 Last Edit: September 19, 2010, 03:24:44 AM by sapero
Thanks Paul.
I have updated math, xact, fftw3 (and more) and added a small set with new headers. The _cabs function from math.inc was not properly defined, three complex number structures missing from fftw3. Added signed versions of LOWORD and HIWORD macros to the custom sdkincludes library - SLOWORD and SHIWORD. There is no direct declaration, but they are used as an alias (see GET_WHEEL_DELTA_WPARAM macro in winuser.inc).

** - Link Removed - **

Please note a small change in fftw3 includes: the import libraries now are moved to the root /libs directory. I think so will be easier for most users - just pick create import library, instead creating separate /libs/fftw directory.
$ifndef __FFTW3_NOLIB__
$use "libfftw3-3.lib"
$use "libfftw3f-3.lib"
$use "libfftw3l-3.lib"
$endif

Barney

Thank you for sharing your excellent work with us, Sapero. It makes life so much easier for everyone, or at least some of us. :)

Barney

fasecero

February 18, 2010, 09:53:17 PM #149 Last Edit: February 18, 2010, 09:58:55 PM by fasecero
Hi. Some of the headers included in GdiPlus.inc are commented ( disabled: Metafile, MetaHeader, Pen and Graphics).
Can I uncomment this headers?