Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Struct Simulator (32bit Ansi / 32bit Unicode / 64bit Unicode)


  • Please log in to reply
5 replies to this topic
chaidy
  • Members
  • 57 posts
  • Last active: Oct 21 2015 05:53 PM
  • Joined: 20 Apr 2010

Last Update : 2013-12-27
 
This script show that 32bit and 64bit struct infomation for OS compatibility
Only run on AHK_L
 
- 131208 : Add - C Struct Convert to Ahk Struct
 
Script Down : CStruct_Simulator.zip
 
ScreenShot.jpg
 
 
 
this sample text get from click to 'Copy Result All' button.

VarSetCapacity(NOTIFYICONDATA, A_PtrSize=8? 848: A_IsUnicode? 828:444, 0)
NOTIFYICONDATA_sizeof := A_PtrSize=8? 848: A_IsUnicode? 828:444

NumPut(_value_, NOTIFYICONDATA, A_PtrSize=8? 688: A_IsUnicode? 672:352, "UInt")
uTimeout := NumGet(NOTIFYICONDATA, A_PtrSize=8? 688: A_IsUnicode? 672:352, "UInt")

uTimeout_addr := &NOTIFYICONDATA + (A_PtrSize=8? 688: A_IsUnicode? 672:352) 


nnnik
  • Members
  • 1625 posts
  • Last active: Jan 24 2019 02:19 PM
  • Joined: 28 Jul 2012

The source?

I hate it to download scripts all the time.

use GitHub gists or post em directly.


Visit the new forum ahkscript.org.

http://ahkscript.org


jballi
  • Members
  • 1029 posts
  • Last active:
  • Joined: 01 Oct 2005
Looks useful. The next time I need to do some 64-bit structure mapping, I'll give it a try. Thanks for sharing.

@nnnik: I'm sorry you were inconvenienced. I've heard that GitHub is a great resource. I haven't gotten around to using it because many of my projects, like this one, are too small to bother. gist and including the files directly in the post isn't really appropriate because the project includes ~7 different files and uses a folder that must contain some of these files. Including a zip file in the post would be the same thing as posting a link. Maybe next time.

chaidy
  • Members
  • 57 posts
  • Last active: Oct 21 2015 05:53 PM
  • Joined: 20 Apr 2010

Add : C type structure convert to ahk type structure access command



chaidy
  • Members
  • 57 posts
  • Last active: Oct 21 2015 05:53 PM
  • Joined: 20 Apr 2010

Add : 'Copy List' button

 

 

this is 'Copy List' Sample.

 

< CNOTIFYICONDATA structure >
    [Member]           [Type]   [32bitA]  [32bitU]  [64bitU]
1   cbSize             DWORD    [000] 4   [000] 4   [000] 4
2   hWnd               HWND     [004] 4   [004] 4   [008] 8
3   uID                UINT     [008] 4   [008] 4   [016] 4
4   uFlags             UINT     [012] 4   [012] 4   [020] 4
5   uCallbackMessage   UINT     [016] 4   [016] 4   [024] 4
6   hIcon              HICON    [020] 4   [020] 4   [032] 8
7   szTip[64]          TCHAR    [024] 1   [024] 2   [040] 2
8   dwState            DWORD    [088] 4   [152] 4   [168] 4
9   dwStateMask        DWORD    [092] 4   [156] 4   [172] 4
10  szInfo[256]        TCHAR    [096] 1   [160] 2   [176] 2
11  uTimeout           UINT     [352] 4   [672] 4   [688] 4
12  uVersion           UINT     [352] 4   [672] 4   [688] 4
13  szInfoTitle[64]    TCHAR    [356] 1   [676] 2   [692] 2
14  dwInfoFlags        DWORD    [420] 4   [804] 4   [820] 4
15  guidItem.Data1     DWORD    [424] 4   [808] 4   [824] 4
16  guidItem.Data2     WORD     [428] 2   [812] 2   [828] 2
17  guidItem.Data3     WORD     [430] 2   [814] 2   [830] 2
18  guidItem.Data4[8]  BYTE     [432] 1   [816] 1   [832] 1
19  hBalloonIcon       HICON    [440] 4   [824] 4   [840] 8

 

 

< CImageCodecInfo structure >
    [Member]           [Type]   [32bitA]  [32bitU]  [64bitU]
1   Clsid.Data1        DWORD    [00] 4    [00] 4    [000] 4
2   Clsid.Data2        WORD     [04] 2    [04] 2    [004] 2
3   Clsid.Data3        WORD     [06] 2    [06] 2    [006] 2
4   Clsid.Data4[8]     BYTE     [08] 1    [08] 1    [008] 1
5   FormatID.Data1     DWORD    [16] 4    [16] 4    [016] 4
6   FormatID.Data2     WORD     [20] 2    [20] 2    [020] 2
7   FormatID.Data3     WORD     [22] 2    [22] 2    [022] 2
8   FormatID.Data4[8]  BYTE     [24] 1    [24] 1    [024] 1
9   CodecName          UPtr     [32] 4    [32] 4    [032] 8
10  DllName            UPtr     [36] 4    [36] 4    [040] 8
11  FormatDescription  UPtr     [40] 4    [40] 4    [048] 8
12  FilenameExtension  UPtr     [44] 4    [44] 4    [056] 8
13  MimeType           UPtr     [48] 4    [48] 4    [064] 8
14  Flags              DWORD    [52] 4    [52] 4    [072] 4
15  Version            DWORD    [56] 4    [56] 4    [076] 4
16  SigCount           DWORD    [60] 4    [60] 4    [080] 4
17  SigSize            DWORD    [64] 4    [64] 4    [084] 4
18  SigPattern         UPtr     [68] 4    [68] 4    [088] 8
19  SigMask            UPtr     [72] 4    [72] 4    [096] 8


 



jballi
  • Members
  • 1029 posts
  • Last active:
  • Joined: 01 Oct 2005

Yes, I know this is an old post but nevertheless...

 

Just used this today.  It still crashes every once in a while because the program doesn't know all of the data types out there but once you work around that, it's a very useful tool.  It's one of those tools that you only need when you need it.  Today I needed it and it helped.  Side note: Programming for 32-bit AND 64-bit is a pain.