IonicWind Software
February 04, 2012, 11:10:35 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Ionic Wind Snippet Manager 1.10 released!
 
   Home   Help Login Register  
Pages: 1 ... 4 5 [6] 7 8 9
  Print  
Author Topic: Sapero's Windows include files  (Read 38149 times)
0 Members and 6 Guests are viewing this topic.
sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #125 on: February 05, 2009, 10:07:33 AM »

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.
« Last Edit: June 09, 2009, 08:02:35 AM by sapero » Logged

pistol350
Paid Subscriber
Hero Member
*****
Offline Offline

Posts: 615



« Reply #126 on: February 05, 2009, 01:27:41 PM »

Thank you Once more!
 Cool
Logged

Regards,

Peter B.
Barney
Paid Subscriber
Sr. Member
*****
Offline Offline

Posts: 360


« Reply #127 on: February 05, 2009, 02:48:36 PM »

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

Barney
Logged
Raid
Newbie
*
Offline Offline

Posts: 36


« Reply #128 on: February 09, 2009, 02:59:03 PM »

Thanks!

Logged

Proudly licensed EBASIC owner since Feb 2009. Network library present!
sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #129 on: February 27, 2009, 06:25:44 PM »

A small update for common controls macros (missing declarations, bug in ListView_SetItemState), plus about 1MB of new headers.

Links expired.
« Last Edit: June 09, 2009, 08:02:55 AM by sapero » Logged

Raid
Newbie
*
Offline Offline

Posts: 36


« Reply #130 on: March 05, 2009, 04:24:53 PM »

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

Logged

Proudly licensed EBASIC owner since Feb 2009. Network library present!
Haim
Paid Subscriber
Sr. Member
*****
Offline Offline

Posts: 376


« Reply #131 on: March 11, 2009, 08:13:18 AM »

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

Logged
sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #132 on: March 11, 2009, 09:31:27 AM »

Thanks for reporting, it is a missing underscore bug, i'll upload fixed version soon.
Code:
#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.
« Last Edit: June 09, 2009, 08:03:22 AM by sapero » Logged

sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #133 on: April 02, 2009, 02:53:14 PM »

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.
« Last Edit: June 09, 2009, 08:03:45 AM by sapero » Logged

KrYpT
Partner Developer
Sr. Member
*****
Offline Offline

Posts: 410



WWW
« Reply #134 on: April 02, 2009, 08:16:56 PM »

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...
Logged
sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #135 on: April 03, 2009, 04:52:01 AM »

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.
Logged

KrYpT
Partner Developer
Sr. Member
*****
Offline Offline

Posts: 410



WWW
« Reply #136 on: April 03, 2009, 04:50:10 PM »

thank you, its working now  Cool
Logged
Ficko
Paid Subscriber
Sr. Member
*****
Offline Offline

Posts: 271



« Reply #137 on: April 26, 2009, 01:03:05 PM »

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. Cheesy
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
Logged
Ionic Wind Support Team
Team Member
Hero Member
*****
Offline Offline

Posts: 5774


WWW
« Reply #138 on: April 26, 2009, 01:29:37 PM »

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:

Code:
$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.

 
Logged

Ionic Wind Support Team
Ficko
Paid Subscriber
Sr. Member
*****
Offline Offline

Posts: 271



« Reply #139 on: April 26, 2009, 03:55:53 PM »

Thanks Paul that really helps! Cheesy
Logged
sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #140 on: May 05, 2009, 04:26:37 PM »

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:
Code:
#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);
}

Aurora http://www.sendspace.com/file/wli16d
Ebasic http://www.sendspace.com/file/au1cby
« Last Edit: June 09, 2009, 08:09:58 AM by sapero » Logged

Barney
Paid Subscriber
Sr. Member
*****
Offline Offline

Posts: 360


« Reply #141 on: May 05, 2009, 06:48:30 PM »

As usual, an excellent addition. Thanks for sharing, Sapero. Smiley

Barney
Logged
sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #142 on: May 08, 2009, 09:57:42 AM »

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

sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #143 on: May 31, 2009, 07:01:30 PM »

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.
Code:
IUnknown *unk = get_me_unknown();
// if (unk) unk->Release();
// unk = 0;
IUnknown_AtomicRelease(&unk);

Aurora http://www.sendspace.com/file/m8bou3
Ebasic http://www.sendspace.com/file/42h57b
Logged

sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #144 on: June 04, 2009, 02:04:14 PM »

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.
« Last Edit: June 04, 2009, 02:18:12 PM by sapero » Logged

sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #145 on: June 09, 2009, 04:05:22 PM »

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.

Aurora
http://rapidshare.com/files/242935338/AuroraHeaders10june2009.zip
http://www.sendspace.com/file/ktqzw0

Ebasic
http://rapidshare.com/files/242933983/EBasicHeaders10june2009.zip
http://www.sendspace.com/file/x64p7u
« Last Edit: June 10, 2009, 06:43:22 AM by sapero » Logged

Ionic Wind Support Team
Team Member
Hero Member
*****
Offline Offline

Posts: 5774


WWW
« Reply #146 on: June 28, 2009, 12:25:52 AM »

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.
Logged

Ionic Wind Support Team
sapero
Senior Developer
Hero Member
*****
Offline Offline

Posts: 1292



« Reply #147 on: July 11, 2009, 06:46:14 AM »

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).

Aurora
http://rapidshare.com/files/379618391/AuroraHeaders11july2009.zip // reupload April 2010
http://www.sendspace.com/file/x1t0nl // reupload mai 2010

Ebasic
http://rapidshare.com/files/254517437/EBasicHeaders11july2009.zip
http://www.sendspace.com/file/t8skp0 // reupload September 2010

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.
Code:
$ifndef __FFTW3_NOLIB__
$use "libfftw3-3.lib"
$use "libfftw3f-3.lib"
$use "libfftw3l-3.lib"
$endif
« Last Edit: September 19, 2010, 05:24:44 AM by sapero » Logged

Barney
Paid Subscriber
Sr. Member
*****
Offline Offline

Posts: 360


« Reply #148 on: July 11, 2009, 07:24:45 AM »

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

Barney
Logged
fasecero
Full Member
***
Offline Offline

Posts: 123

I'm sorry for my english.


« Reply #149 on: February 18, 2010, 11:53:17 PM »

Hi. Some of the headers included in GdiPlus.inc are commented ( disabled: Metafile, MetaHeader, Pen and Graphics).
Can I uncomment this headers?
« Last Edit: February 18, 2010, 11:58:55 PM by fasecero » Logged
Pages: 1 ... 4 5 [6] 7 8 9
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page January 19, 2012, 08:42:12 AM