flat assembler
Message board for the users of flat assembler.

Index > Main > _WIN32_WINNT (?)

Author
Thread Post new topic Reply to topic
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

how find the value of "_WIN32_WINNT" ?

http://msdn.microsoft.com/en-us/library/ms646839%28v=vs.85%29.aspx
Code:
     sf_ OPENFILENAME

        invoke  GetOpenFileName,sf_

;from MSDN
;---------
typedef struct tagOFN {
  DWORD         lStructSize;
  HWND          hwndOwner;
  HINSTANCE     hInstance;
   .....
   .....
  LPCTSTR       lpstrDefExt;
  LPARAM        lCustData;
  LPOFNHOOKPROC lpfnHook;
  LPCTSTR       lpTemplateName;
#if (_WIN32_WINNT >= 0x0500) ;<------------------ ??
  void          *pvReserved;
  DWORD         dwReserved;
  DWORD         FlagsEx;
#endif 
} OPENFILENAME, *LPOPENFILENAME;    

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 21 Jun 2011, 23:08
View user's profile Send private message Send e-mail Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Check http://msdn.microsoft.com/en-us/library/aa383745%28VS.85%29.aspx

In your particular example, it you decide to use those three fields then your code with need Windows 2000 at minimum.
Post 21 Jun 2011, 23:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17248
Location: In your JS exploiting you and your system
revolution
Code:
invoke GetVersionEx,addr buff
mov edx,[buff+OSVERSIONINFO.dwMajorVersion]
mov eax,[buff+OSVERSIONINFO.dwMinorVersion]    
Post 21 Jun 2011, 23:17
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

thank you Loco.

Tomasz uses this structure (FASMW.ASM), but he does not take into account the windows version and it does not take into account these additional fields. I don't understand. In my case, i have windows XP, et for me this structure has these three additional fields.

???

@revolution
thank you revolution

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 21 Jun 2011, 23:26
View user's profile Send private message Send e-mail Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
If you don't use the additional fields on WinXP it is OK, because you'll also pass a lower lStructSize value and hence no attempts to fill the "ghost" fields will be performed by the API function (i.e. the API has backwards compatibility to older software).
Post 21 Jun 2011, 23:38
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

Indeed, I had not thought of that, well done Loco ! Wink
(thank you)
Quote:
because you'll also pass a lower lStructSize value and hence no attempts to fill the "ghost" fields will be performed by the API function


_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 21 Jun 2011, 23:52
View user's profile Send private message Send e-mail Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

it works, the places bar is not displayed Razz
Code:
sf_      OPENFILENAME
dd      0 ; the three additional fields
dd   0
dd 1 ;<----------- FlagsEx

mov   [sf_.lStructSize],sizeof.OPENFILENAME \
\
+ 3*4 ;<-------- !

FlagsEx / OFN_EX_NOPLACESBAR (0x00000001)
If this flag is set, the places bar is not displayed
    

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 22 Jun 2011, 00:00
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.