WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
 
Forum
Pages (6) [1] 2 3 4 5 6   ( Go to first unread post )

Printing out unicode text, do I need stdio.inc? How to print unicode text using the Microsoft Macro Assembler.

ChillyWilly
Quote Post


Very Active Member
****

Group: Members
Posts: 77
Member No.: 5730
Joined: 5-January 08


trying to print out unicode text in this sourcecode its using wprintf and includes stdio.inc

format dw 10,'w','o','r','d',':','%','s',10,0
invoke wprintf,addr format,addr unicodestring
PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2066
Member No.: 160
Joined: 22-June 04


try add this into source or into user32.inc:
CODE
wsprintfW PROTO C :DWORD,:VARARG

then use this:
CODE
invoke wsprintf,addr format,addr unicodestring

note: if you will update user32.inc once, you will need to update it again after reinstalling masm32 package. also, it is unfriendly for unicode programming as it contains mostly such prototypes:
CODE
MessageBoxA PROTO :DWORD,:DWORD,:DWORD,:DWORD
MessageBox equ <MessageBoxA>
MessageBoxW PROTO :DWORD,:DWORD,:DWORD,:DWORD

so, there is no way to switch easy to unicode with it.

unlike it, fasm package is more friendly as you can switch to unicode including "win32w.inc" instead "win32a.inc" used for ansi.

also, you may use scan.exe by Vortex (look download section->tools), which may prepare to you exact import, scanning your ready source. anyway, you will need structures definitions, which may differ from ansi - so, probably you will need to keep own additional include file for them. if yes - you may share it later here to help other with similar problem.

regards!
PMEmail PosterUsers Website
Top
ChillyWilly
Quote Post


Very Active Member
****

Group: Members
Posts: 77
Member No.: 5730
Joined: 5-January 08


im having trouble trying to find a version of stdio.inc that works with masm
C:\Documents and Settings\Administrator\Desktop\test\stdio.inc(30) : error A2006: undefined symbol : _MSC_VER
C:\Documents and Settings\Administrator\Desktop\test\stdio.inc(151) : error A2006: undefined symbol : __STDC__
C:\Documents and Settings\Administrator\Desktop\test\stdio.inc(205) : error A2008: syntax error : @DefProto

these are the errors im getting with the stdio i found on the web
PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2066
Member No.: 160
Joined: 22-June 04


there is no stdio.inc in masm32 package (at least at mine pc)
wsprintf(A) is declared in user32.inc as it is exported from user32.dll
PMEmail PosterUsers Website
Top
ChillyWilly
Quote Post


Very Active Member
****

Group: Members
Posts: 77
Member No.: 5730
Joined: 5-January 08


but its wprintf no 's'
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (6) [1] 2 3 4 5 6  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian