News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Windows 10 Visual studio 2017 Ent and the SDK translation

Started by LiaoMi, September 18, 2017, 02:08:15 AM

Previous topic - Next topic

LiaoMi

Hi ToutEnMasm,

I'm trying to make a new build of include files for Windows 10 Microsoft Visual Studio 2017 Enterprise v15.3.4, some files are converted very well, but there are a couple of files with errors. Unfortunately I can not understand where the error occurs, from the directory "Um" these files give me errors

\SDK\Include\10.0.15063.0\um\dxgiddi.h
\SDK\Include\10.0.15063.0\um\eapmethodpeerapis.h
\SDK\Include\10.0.15063.0\um\IEProcess.h
\SDK\Include\10.0.15063.0\um\mfapi.h
\SDK\Include\10.0.15063.0\um\ProcessSnapshot.h
\SDK\Include\10.0.15063.0\um\Richedit.h
\SDK\Include\10.0.15063.0\um\Vfw.h
\SDK\Include\10.0.15063.0\um\xa.h

from the directory "shared" these files give me errors

\SDK\Include\10.0.15063.0\shared\dciddi.h
\SDK\Include\10.0.15063.0\shared\kxarm.h
\SDK\Include\10.0.15063.0\shared\kxarmunw.h
\SDK\Include\10.0.15063.0\shared\rpcndr.h
\SDK\Include\10.0.15063.0\shared\TraceLoggingProvider.h

Of course, I opened it and looked what might be wrong there, but comparing with other parts of the include file, I cant see any difference. For example, in the first file dxgiddi.h, this structure

typedef struct _DXGI_DDI_ARG_OFFERRESOURCES1
{
    _In_ DXGI_DDI_HDEVICE hDevice;                                 //in:  device that created the resources
    _In_reads_(Resources) const DXGI_DDI_HRESOURCE* pResources;    //in:  array of resources to reset
    _In_ UINT Resources;                                           //in:  number of elements in pResources
    _In_ D3DDDI_OFFER_PRIORITY Priority;                           //in:  priority with which to reset the resources
    _In_ D3DDDI_OFFER_FLAGS Flags;                                 //in:  flags specifying additional behaviors on offer
} DXGI_DDI_ARG_OFFERRESOURCES1;


QuoteSDK\Include\10.0.15063.0\um\dxgiddi.h
D3DDDI_OFFER_FLAGS 597

SDK\Include\10.0.15063.0\um\dxgiddi.h
Open Loop Error
Numero Ligne:662
You must QUIT and correct the Problem

The file that we get when converting is corrupted, from some lines appears the same type of broken data. How can I recognize the error ?!

P.S. If you try to make the Include through the "test" file, then the translator ends up with an error. Its also important that the translator starts generating garbage in different parts of the resulting file ...

The beginning of the garbage instructions of the first file

QuoteDXGI_DDI_BASE_FUNCTIONS   STRUCT DEFALIGNMASM
   PtrpfnPresent XMASM ?
   PtrpfnGetGammaCaps XMASM ?
   PtrpfnSetDisplayMode XMASM ?
   PtrpfnSetResourcePriority XMASM ?
   PtrpfnQueryResourceResidency XMASM ?
   PtrpfnRotateResourceIdentities XMASM ?
   PtrpfnBlt XMASM ?

q$˜§•
DXGI_DDI_RESIDENCY
DXGI_DDI_FLIP_INTERVAL_TYPE
DXGI_DDI_MODE_SCANLINE_ORDER
DXGI_DDI_MODE_SCALING
DXGI_DDI_MODE_ROTATION
DXGI_DDI_MULTIPLANE_OVERLAY_FEATURE_CAPS
DXGI_DDI_MULTIPLANE_OVERLAY_STEREO_CAPS
DXGI_DDI_MULTIPLANE_OVERLAY_FLAGS
DXGI_DDI_MULTIPLANE_OVERLAY_BLEND
DXGI_DDI_MULTIPLANE_OVERLAY_VIDEO_FRAME_FORMAT
DXGI_DDI_MULTIPLANE_OVERLAY_YCbCr_FLAGS
DXGI_DDI_MULTIPLANE_OVERLAY_STEREO_FORMAT
DXGI_DDI_MULTIPLANE_OVERLAY_STEREO_FLIP_MODE
DXGI_DDI_MULTIPLANE_OVERLAY_STRETCH_QUALITY
ï$™§•
¾íÀ@è
~!˜š9•
h,
`
z
Æ

"
&
*
0
0   
4

>
>
B
H
H
L
P
P
P
P
P
P
P
P
P
P
d

The original code

Quotetypedef struct DXGI_DDI_BASE_FUNCTIONS
{
    HRESULT ( __stdcall /*APIENTRY*/ * pfnPresent )               (DXGI_DDI_ARG_PRESENT*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnGetGammaCaps )          (DXGI_DDI_ARG_GET_GAMMA_CONTROL_CAPS*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnSetDisplayMode )        (DXGI_DDI_ARG_SETDISPLAYMODE*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnSetResourcePriority )   (DXGI_DDI_ARG_SETRESOURCEPRIORITY*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnQueryResourceResidency )(DXGI_DDI_ARG_QUERYRESOURCERESIDENCY*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnRotateResourceIdentities )(DXGI_DDI_ARG_ROTATE_RESOURCE_IDENTITIES*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnBlt                    )(DXGI_DDI_ARG_BLT*);
} DXGI_DDI_BASE_FUNCTIONS;

//--------------------------------------------------------------------------------------------------------
typedef struct DXGI1_1_DDI_BASE_FUNCTIONS
{
    HRESULT ( __stdcall /*APIENTRY*/ * pfnPresent )               (DXGI_DDI_ARG_PRESENT*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnGetGammaCaps )          (DXGI_DDI_ARG_GET_GAMMA_CONTROL_CAPS*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnSetDisplayMode )        (DXGI_DDI_ARG_SETDISPLAYMODE*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnSetResourcePriority )   (DXGI_DDI_ARG_SETRESOURCEPRIORITY*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnQueryResourceResidency )(DXGI_DDI_ARG_QUERYRESOURCERESIDENCY*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnRotateResourceIdentities )(DXGI_DDI_ARG_ROTATE_RESOURCE_IDENTITIES*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnBlt                    )(DXGI_DDI_ARG_BLT*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnResolveSharedResource ) (DXGI_DDI_ARG_RESOLVESHAREDRESOURCE*);
} DXGI1_1_DDI_BASE_FUNCTIONS;

I tried on different systems, everywhere the same results to my regret  :icon_confused:

Thanks for your help  :t

TouEnMasm

When you have a Strange error like that there is only one soluce:
Simplify the writing,the header files have many extra characters who aren't shown at edition.
It is what i have down here.
Quote
typedef struct _DXGI_DDI_ARG_OFFERRESOURCES1
{
_In_ DXGI_DDI_HDEVICE hDevice;
_In_reads_(Resources) const DXGI_DDI_HRESOURCE* pResources;
_In_ UINT Resources;
_In_ D3DDDI_OFFER_PRIORITY Priority;
_In_ D3DDDI_OFFER_FLAGS Flags;
} DXGI_DDI_ARG_OFFERRESOURCES1;

and i get this
Quote
DXGI_DDI_ARG_OFFERRESOURCES1   STRUCT DEFALIGNMASM
   hDevice DXGI_DDI_HDEVICE ?
pResources XMASM ?
   Resources DWORD ?
   Priority DWORD ?
   Flags D3DDDI_OFFER_FLAGS ?
DXGI_DDI_ARG_OFFERRESOURCES1      ENDS
soluce: Modify the part of the header file with the structure to be without extra caracters.

Other Soluce:
To avoid laborious search of extra characters,you can search MSDN and copy paste the definition after deletion of the bad one.

Fa is a musical note to play with CL

LiaoMi

Hi ToutEnMasm,

I checked three times for the presence of extra characters, but couldnt find any  :redface:

By the method of logical exclusion, I found the place where the error occurs, here is this code

//--------------------------------------------------------------------------------------------------------
typedef struct DXGI_DDI_BASE_FUNCTIONS
{
    HRESULT ( __stdcall /*APIENTRY*/ * pfnPresent )               (DXGI_DDI_ARG_PRESENT*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnGetGammaCaps )          (DXGI_DDI_ARG_GET_GAMMA_CONTROL_CAPS*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnSetDisplayMode )        (DXGI_DDI_ARG_SETDISPLAYMODE*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnSetResourcePriority )   (DXGI_DDI_ARG_SETRESOURCEPRIORITY*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnQueryResourceResidency ) (DXGI_DDI_ARG_QUERYRESOURCERESIDENCY*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnRotateResourceIdentities ) (DXGI_DDI_ARG_ROTATE_RESOURCE_IDENTITIES*);
    HRESULT ( __stdcall /*APIENTRY*/ * pfnBlt                    ) (DXGI_DDI_ARG_BLT*);
} DXGI_DDI_BASE_FUNCTIONS;


there are no extra characters :icon_exclaim:, there is an infinite loop during the processing of some characters :P  By my tests, I did not find out which fragment causes a buffer overflow, but I'll try to compare it with the old files from visual studio 2015  :icon_redface:

Thank you for your answer!

TouEnMasm

This structure is describe in MSDN here:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff557492(v=vs.85).aspx
Copy paste his definition in the header file (delet the old) and there will be no more problem.
Fa is a musical note to play with CL

LiaoMi

Quote from: ToutEnMasm on October 06, 2017, 08:22:24 PM

This structure is describe in MSDN here:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff557492(v=vs.85).aspx
Copy paste his definition in the header file (delet the old) and there will be no more problem.

Without changes, it still does not convert, I left even one line in the structure, then tried different modifications, the translator always generates only a lot of garbage.

TouEnMasm

This mean that the error is elsewhere,post the header,I will test it.
Fa is a musical note to play with CL

LiaoMi

Hi ToutEnMasm,

in the archive there are only visual studio headers that cause an error. The tested file of the last structure is um\dxgiddi.h

Thank you very much in advance  8)



TouEnMasm

Hello,
Before use of the translator read the readme.rtf file.
This one say that there is a file who report the incident of translation.
This file is journal.txt.You can read it from the menu of the translator.
Reading it I find the three files responsible of the trouble.
----\um\mfapi.h
----\shared\kxarm.h         
----\shared\kxarmunw.h   
Journal.txt give you the name of the file and the numero of the line.

Some of those files are only c++ defines and generate empty definitions after corrections.


Fa is a musical note to play with CL

LiaoMi

I have already tried all this and read many times, it does not help much. I will convert the files in another way or copy the old files from the previous version, it will be easier  :P

TouEnMasm

Two files are already translated in the full sdk translate,they are:
mfapi.h
kxarm.h
https://github.com/ToutEnMasm71100
kxarmunw.h is useless for masm
kxarm.sdk is zero size in the full sdk translate,this mean that there is no usable defines.
mfapi.sdk had a size of 114 Ko and is usable.
The *arm*.h are made for processor using the arm architecture, not the X86,did you need that ?
ARM is for smartphones, laptops and tablet computers.
To program those ones you need the android studio not masm.
Here a sample of use : https://msdn.microsoft.com/fr-fr/aa447068

I hope this help ?.
Fa is a musical note to play with CL