Dear,
Gentlemans from Win32asmcommunity
Greetings to every body!
I'm woking in a proyect to save several images into a single file but I don't know to call this functions, can some one please help me?
; Now convert file name to wide character
invoke MultiByteToWideChar,CP_OEMCP,MB_PRECOMPOSED,addr ArchivoThumbs,-1,addr NombreW,255
invoke StgCreateDocfile,addr NombreW,STGM_READWRITE or STGM_CREATE or STGM_SHARE_EXCLUSIVE,0,addr pIStorage
; if eax==S_OK then every thing is OK file was created
; Now convert file name to wide character
invoke MultiByteToWideChar,CP_OEMCP,MB_PRECOMPOSED,addr PrimerIcono,-1,addr NombreW,255
coinvoke pIStorage,CreateStream,NombreW,STGM_READWRITE or STGM_SHARE_EXCLUSIVE,0,0,pIStream1 ; There is something wrong on this does any body know how to do it right
Gentlemans from Win32asmcommunity
Greetings to every body!
I'm woking in a proyect to save several images into a single file but I don't know to call this functions, can some one please help me?
; Now convert file name to wide character
invoke MultiByteToWideChar,CP_OEMCP,MB_PRECOMPOSED,addr ArchivoThumbs,-1,addr NombreW,255
invoke StgCreateDocfile,addr NombreW,STGM_READWRITE or STGM_CREATE or STGM_SHARE_EXCLUSIVE,0,addr pIStorage
; if eax==S_OK then every thing is OK file was created
; Now convert file name to wide character
invoke MultiByteToWideChar,CP_OEMCP,MB_PRECOMPOSED,addr PrimerIcono,-1,addr NombreW,255
coinvoke pIStorage,CreateStream,NombreW,STGM_READWRITE or STGM_SHARE_EXCLUSIVE,0,0,pIStream1 ; There is something wrong on this does any body know how to do it right
try this:
coinvoke pIStorage,IStorage, CreateStream,addr NombreW,STGM_READWRITE or STGM_SHARE_EXCLUSIVE,0,0,addr pIStream1
Thanks but what you sugested did not work it doesn't compile, instead i found an example program which compile fine but when i run it crash, do you have any idea why?
.data?
pIStream1 dd ?
pIStorage dd ?
IStorage_Interface struc
QueryInterface dd ?
AddRef dd ?
Release dd ?
CreateStream dd ?
OpenStream dd ?
CreateStorage dd ?
OpenStorage dd ?
CopyTo dd ?
MoveElementTo dd ?
Commit dd ?
Revert dd ?
EnumElements dd ?
DestroyElement dd ?
RenameElement dd ?
SetElementTimes dd ?
SetClass dd ?
SetStateBits dd ?
Stat dd ?
IStorage_Interface ends
.code
mov edx, ; lets use same variable for another stream :-)
push edx ; &IStream1
push 0 ; zero (reserved)
push 0 ; zero (reserved)
push 1011h ; STGM_CREATE + STGM_SHARE_EXCLUSIVE + STGM_WRITE
lea edi,NombreW
push edi ; name of stream to create: "WordDocument"
mov ecx,
push ecx ; &IStorage2 (heathen.vdo)
mov eax,
call ; create stream
.data?
pIStream1 dd ?
pIStorage dd ?
IStorage_Interface struc
QueryInterface dd ?
AddRef dd ?
Release dd ?
CreateStream dd ?
OpenStream dd ?
CreateStorage dd ?
OpenStorage dd ?
CopyTo dd ?
MoveElementTo dd ?
Commit dd ?
Revert dd ?
EnumElements dd ?
DestroyElement dd ?
RenameElement dd ?
SetElementTimes dd ?
SetClass dd ?
SetStateBits dd ?
Stat dd ?
IStorage_Interface ends
.code
mov edx, ; lets use same variable for another stream :-)
push edx ; &IStream1
push 0 ; zero (reserved)
push 0 ; zero (reserved)
push 1011h ; STGM_CREATE + STGM_SHARE_EXCLUSIVE + STGM_WRITE
lea edi,NombreW
push edi ; name of stream to create: "WordDocument"
mov ecx,
push ecx ; &IStorage2 (heathen.vdo)
mov eax,
call ; create stream
view description of IStorage::CreateStream at MSDN. The last parameter has to be the address of an IStream pointer. Regretably I don't understand your code, because pIStream1 and pIStorage are global vars, but you use ebp to access them???
Suggestion:
mov edx, offset pIStream1
push edx ; &IStream1
push 0 ; zero (reserved)
push 0 ; zero (reserved)
push 1011h ; STGM_CREATE + STGM_SHARE_EXCLUSIVE + STGM_WRITE
lea edi,NombreW
push edi ; name of stream to create: "WordDocument"
mov ecx, pIStorage
push ecx ; &IStorage2 (heathen.vdo)
mov eax,
call ; create stream
Thanks alot Japheth :D
Your code worked just fine no more crashes, now I just have to figure out how to write the image list to the stream.
Thanks again for your valuable help!
Your code worked just fine no more crashes, now I just have to figure out how to write the image list to the stream.
Thanks again for your valuable help!