I am having a problem making a "poplistview" program (similar to the poplist example in the masm32 package) on Windows XP SP1. The program runs fine until I add in theme support via a manifest file. After adding the manifest file, the program quits immediately after displaying the window. Right now I just want to know if this is normal behavior, so I'm asking if someone running Windows XP SP1 could assemble and run the following code and verify the failure. Thanks =)

lv.asm
.386

.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
include \masm32\include\comctl32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\comctl32.lib

WindowProc proto hwnd:dword, uMsg:dword, wParam:dword, lParam:dword

.data
szClass db "SysListView32", 0
pfnWindowProc dd 0

.code
Main proc
local msg:MSG
invoke GetModuleHandle, 0
invoke CreateWindowEx, 0, addr szClass, 0, WS_OVERLAPPEDWINDOW or WS_VISIBLE or LVS_REPORT, 0, 0, 300, 300, 0, 0, eax, 0
invoke SetWindowLong, eax, GWL_WNDPROC, addr WindowProc
mov pfnWindowProc, eax
@@: invoke GetMessage, addr msg, 0, 0, 0
cmp eax, 0
je @F
invoke TranslateMessage, addr msg
invoke DispatchMessage, addr msg
jmp @B
@@: invoke ExitProcess, msg.wParam
invoke InitCommonControls
Main endp

WindowProc proc hwnd:dword, uMsg:dword, wParam:dword, lParam:dword
cmp uMsg, WM_DESTROY
je @F
invoke CallWindowProc, pfnWindowProc, hwnd, uMsg, wParam, lParam
ret
@@: invoke PostQuitMessage, 0
ret
WindowProc endp

end Main
lv.exe.manifest
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApp"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
Posted on 2002-12-12 22:35:07 by BubbaFate
Works fine for me, I have XP pro SP1. I tried with the manifest incorporated in the exe as a resource and externally. I verified that CC version 6 was loaded with the following :



CheckLibVersion proc
LOCAL LibVersion :DLLVERSIONINFO
LOCAL pComCtrllib :DWORD
LOCAL pGetVersion :DWORD
LOCAL buffer :BYTE

jmp @F
LibName BYTE "comctl32.dll",0
FuncName BYTE "DllGetVersion",0
@@:

mov LibVersion.cbSize,SIZEOF DLLVERSIONINFO
invoke LoadLibrary,ADDR LibName
mov pComCtrllib,eax
.IF eax != NULL
invoke GetProcAddress,pComCtrllib,ADDR FuncName
mov pGetVersion,eax
.IF eax != NULL
lea eax,LibVersion
push eax
call pGetVersion
.ENDIF
invoke FreeLibrary,pComCtrllib
.ENDIF

invoke dw2a,LibVersion.dwMajorVersion,ADDR buffer
invoke MessageBox,NULL,ADDR buffer,NULL,MB_OK

ret
CheckLibVersion endp


I didn't try your manifest however, this is what I used, I don't know if it makes a diff.



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApp"
type="win32"
/>
<description>Test the manifest.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>


it looks the same on a quick inspection.

Donkey
Posted on 2002-12-12 23:00:22 by donkey
Thanks for checkin that out for me, looks like its time to visit format dot com
Posted on 2002-12-12 23:32:21 by BubbaFate