The MASM Forum Archive 2004 to 2012

Project Support Forums => GoAsm Assembler and Tools => Topic started by: Infro_X on June 21, 2005, 09:48:13 PM

Title: _vsnwprintf which dll to use?
Post by: Infro_X on June 21, 2005, 09:48:13 PM
How do you know which dlls came with which version of windows? (So far i check msdl.microsoft.com for the pdb file.)

crtdll.dll
msvcr70.dll
msvcr71.dll
msvcr80.dll
msvcrt.dll (came with windows 2k)
msvcrt20.dll
msvcrt40.dll (redirected to msvcrt.dll)
msvcrtd.dll (I think this is the one i should use) (came with windows 2k)
Title: Re: _vsnwprintf which dll to use?
Post by: MichaelW on June 22, 2005, 01:07:10 AM
You can indirectly determine which DLLs and which DLL versions came with which versions of Windows here:

http://support.microsoft.com/dllhelp/

The function _vsnwprintf is included in MSVCRT.DLL, but I have no idea how you could use an argument list with it. I think it would probably be easier to use _snwprintf instead.

MSDN: Run-Time Library Reference _snprintf, _snwprintf (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__snprintf.2c_._snwprintf.asp)

Title: Re: _vsnwprintf which dll to use?
Post by: Infro_X on June 22, 2005, 01:51:05 AM
Argument list is pretty simple.

.data
argumentlist dd 128 dup (?)
format dw "this is my format, it has %d %s",0
arguments dw "arguments",0
.code
mov D[argumentlist+0],2
mov D[argumentlist+4],offset arguments
mov D[argumentlist+8],0 //Null terminator
invoke _vsnwprintf,addr buffer,(buffersize>>1),addr format,addr argumentlist
invoke messagebox,null,addr buffer,null,MB_OK
invoke exitprocess,0

btw, thx for the site