Author Topic: How to display on screen string of unicode-characters from console application?  (Read 416 times)

jj2007

  • Member
  • *****
  • Posts: 7558
  • Assembler is fun ;-)
    • MasmBasic
You can use any other DDK or SDK after windows XP.

Got it working:
includelib "C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64\kernel32.Lib"
; includelib "C:\WinDDK\7600.16385.1\lib\win7\amd64\kernel32.lib" ; SetCurrentConsoleFontEx not available in MASM32 Lib

Micros**t at its best. Their handling of paths should be given to a kindergarten, toddlers may put some order in this mess.

aw27

  • Member
  • ****
  • Posts: 709
Hi, aw27!
UASM what is it?

Last time I checked the UASM subforum was just below your amazing  "Mikl__'s ml64 examples" subforum.  :icon_rolleyes:

Quote
They assembler has a website?

No, they send the assembler by snailmail.

Mikl__

  • Member
  • ****
  • Posts: 542
Hi, aw27!
Thank you very much. I used an example of your program in wasm.in
Yes, I found a section dedicated to UASM subforum. I just did not pay attention to him before that

aw27

  • Member
  • ****
  • Posts: 709
Hi, aw27!
Thank you very much. I used an example of your program in wasm.in

I changed the example, actually you need the Consolas font only. The Lucida Console does not contain all characters I used and it does not help to try to use more than one font. The last one is the one that sticks.

aw27

  • Member
  • ****
  • Posts: 709
Hi, aw27!
I used an example of your program in wasm.in

....
mov ecx,offset LibName
invoke LoadLibrary 
mov edx,offset FunctionName
invoke GetProcAddress,eax
...

Sometimes it works, but is wrong. In 64-bit, addresses are 64-bit. Sometimes they happen to be below the 32-bit line but don't rely on that.
It appears your Include file has the prototypes wrong (or better, resolves everything to PTR PROC and does not do any type checking at all).

These are the correct prototypes:
LoadLibrary proto :ptr
GetProcAddress proto :HANDLE, :ptr

So you should do:
invoke LoadLibrary, offset   LibName
invoke GetProcAddress, rax, offset FunctionName