A quick example of running the image viewer to display an image :
include ImageView.inc
include CstrMacro.asm
.data?
CurDir db 64 dup(?)
buffer db 200 dup(?)
hLib dd ?
hModule dd ?
.code
start:
invoke GetModuleHandle,0
mov hModule,eax
invoke GetCurrentDirectory,64,ADDR CurDir
invoke lstrcat,ADDR CurDir,@Cstr("\ForumLogo.png")
invoke UnicodeStr,ADDR CurDir,ADDR buffer
invoke LoadLibrary,@Cstr("shimgvw.dll")
mov hLib,eax
invoke GetProcAddress,eax,\
@Cstr("ImageView_Fullscreen")
push SW_NORMAL
push OFFSET buffer
push hModule
push 0
call eax
invoke FreeLibrary,hLib
invoke ExitProcess,0
UnicodeStr PROC USES esi src:DWORD,dest:DWORD
mov esi,src
mov edx,dest
xor eax,eax
sub eax,1
@@:
add eax,1
movzx ecx,BYTE PTR [esi+eax]
mov WORD PTR [edx+eax*2],cx
test ecx,ecx
jnz @b
ret
UnicodeStr ENDP
END start