News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

A ready to use windows.sdk

Started by ToutEnMasm, January 15, 2008, 04:14:10 PM

Previous topic - Next topic

ToutEnMasm

Hello,
This set of files is an exact replicate of the windows SDK 7
This give you several advantages.
        UNICODE is supported  (add UNICODE equ 1 before the include)
        ALL windows system supported. (defaut is XP SP3)
                If needed ,run the tool \sdkrc7\start_it\cpusys.exe and Modifies translate.inc with the correct switch

       Fully documented
   Just follow what say MSDN
   If msdn say add this file,include this file with a .sdk
   if msdn say add this constant switch,add it
USAGE:
   include translate.inc           ;ALWAYS first
   include windows.sdk

http://luce.yves.pagesperso-orange.fr/sdkrc7.cab

Searching in the sdkrc7:
Open sdkrc7\liste.txt
This file contain the names of functions,structures,interfaces,defined dword ... translated from the windows sdk.
You can search one of those names  (search edit box ).
When you have find it ,go UP in the text file and you find the name of his header file .h
Open the .sdk and you have all  the declarations needed.


2011 The cab files content now the masm32 samples modified to use this header's files.A few number of corrections has been made on the header's files.
You can rename the .cab in .zip to unpack it.
Notes:
For windows XP _WIN32_WINNT can be  500h  instead of 501h
If it is 501h,the structure TOOLINFO can have an incorrect size (+4 bytes) and there is no tooltip .Verify this.


Windows.inc  made a correction on the charformat2 structure
two lines are added
_wPad2            WORD       ?      ;rajout masm
bReserved1        BYTE       ?

Colors caracters couldn't be changed if it is the wrong size


CHARFORMAT2 STRUCT
  cbSize            DWORD      ?
  dwMask            DWORD      ?
  dwEffects         DWORD      ?
  yHeight           DWORD      ?
  yOffset           DWORD      ?
  crTextColor       DWORD      ?
  bCharSet          BYTE       ?
  bPitchAndFamily   BYTE       ?
  szFaceName        BYTE LF_FACESIZE dup(?)   ;32 masm,32 sdk
  _wPad2            WORD       ?      ;rajout masm
  wWeight           WORD       ?
  sSpacing          WORD       ?
  crBackColor       DWORD      ?
  lcid              DWORD      ?
  dwReserved        DWORD      ?
  sStyle            WORD       ?
  wKerning          WORD       ?
  bUnderlineType    BYTE       ?
  bAnimation        BYTE       ?
  bRevAuthor        BYTE       ?
  bReserved1        BYTE       ?
CHARFORMAT2 ENDS

hutch--

Yves,

Sorry to be a bit slow but I have been very busy lately. I downloaded the collection you posted but have not had time yet to try and make sense of it. When I get a bit in front I will try and do your work some justice.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

ToutEnMasm

Hello,
Thanks to help me.
What i really need is to know wich corrections has made by masm32 to the SDK.
For example CHARFORMAT2 is modify to work properly.
If there is others like that (it seems others exist),put them here.

ToutEnMasm

#3
Hello,
I have put a new package with the needed corrections.
---- functions (void) are correct now
---- a little more defines are translated and verified
---- added the sdkddkver.inc 
---- better correction of the internal error of ml
Those files have been tested at compiled and linker time
Windows.sdk,wincred.sdk,commctrl.sdk,richedit.sdk,shlobj.sdk,winerror.sdk,ole2.sdk
shellapi.sdk,HtmlHelp.sdk,RichOle.sdk.
Others can need minor corrections (redefinition of symbols,....)
Put them here,i will add them manually.
---------------------------------------------------------------------------------------------
A litlle fast change ,had made a problem in the translation of Interface DECLARE_INTERFACE,corrected.
---------------------------------------------------------------------------------------------
Last minute:
The define prototype,in winbase.sdk
;WinMain PROTO :DWORD ,:DWORD ,:DWORD ,:DWORD
disturb link.This one search for those functions that are not in use

_toupper@4      ;proto   dans ctypes.sdk
_tolower@4      //
_RevertToSelf@0      winbase.sdk
_EnumObjects@16      wingdi.sdk
_GetObjectA@12      wingdi
GetClipboardData        winuser.h
_send@16      WinSock.sdk
_abort@0      process.sdk  stdlib.sdk
_CreateDataAdviseHolder@4   objbase.sdk
_AsyncInstallDistributionUnit@36 urlmon.sdk
_VarI4FromI8@12    oleauto.sdk
_VarI4FromUI8@12   //         i
Setmenu         winuser.sdk +1
TranslateAccelerator   //  NOMSG equ
GetWindow      //

By error,I have corrected manually the files,just delet the ; who put them in comment.
It is only by chance that I found the solution (WinMain prototype put in comment)

The ReleaseMutex put in comment is not an error.Link discard it.












ToutEnMasm


Added translate of some macros who can create constants  (more constants are translated and usable)
Protos c are translated
;__clrcall
;__fastcall
__fastcall and __clrcall  have just a comment before the definition (see rtcapi.sdk and WinBase.sdk)
                                   
added the strsize macro who can extract the lenght of a chain in define constant or in the code
see translate.inc for samples of use


ToutEnMasm

Hello,
Corrections have been made on:
PROTO C with vararg
Record in structure:
the    onerecord  <>  ;    begin             onerecord recordsize ?
recordsize = byte or word or dword
This is to avoid the too many random errors it's made.
C++ doesn't take care of the number of bits in the record.You have to verify that the number of bits is 8,16 or 32.

xandaz

    Tout... Sorry for the late reply... I'm having trouble with the SDK... Shouldn't the sdk files open with the document explorer? I couldn't find the GetDisplayNameOf in liste. I tried to open shlobj directly and nothing....

ToutEnMasm


The .sdk files are text files and can be view with the notepad.
the IShellFolder::GetDisplayNameOf is declare in the interface.
open the shobjidl.sdk,search for STIShellFolder and you view it.