flat assembler
Message board for the users of flat assembler.

Index > Windows > Printing

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 09 Sep 2008, 08:00
Is this what you see?

[edit]Removed the attachment, it is no longer needed.[/edit]


Last edited by revolution on 22 Dec 2008, 00:45; edited 1 time in total
Post 09 Sep 2008, 08:00
View user's profile Send private message Visit poster's website Reply with quote
Crinan



Joined: 05 Dec 2006
Posts: 28
Location: New Zealand
Crinan 09 Sep 2008, 08:26
Ah yes, I see I got waylaid to jZip - it is there on that site alright.
HOWEVER - I get transfered to SourceForge which is a real dog's body of a site with various options none of which provide anything but a 28.2K download of 7z460.exe or 7za457.exe neither of which will run at all.
I'va tried the different download sites that Sourcefoge offers, all of which seem to do the same thing.
Post 09 Sep 2008, 08:26
View user's profile Send private message Reply with quote
Alphonso



Joined: 16 Jan 2007
Posts: 295
Alphonso 09 Sep 2008, 17:37
Crinan: I don't know why you cant add USER32.DLL, maybe a typo' somewhere. Something like this should work,
Code:
section '.idata' import data readable writeable

  library kernel,'KERNEL32.DLL',\
          gdi,'GDI32.DLL',\
          winspool,'WINSPOOL.DRV',\
          user,'USER32.DLL'                 ;<--library user32.dll added

...
 import user,\                              ;<--further down add the import(s)
        MessageBox,'MessageBoxA'    
If your trying to use win32ax.inc and the .end macro instead of win32a.inc then you can remove the .idata section however you will probably find the 'winspool.drv' includes are not available therefore you may need to do something like

Create file '..INCLUDE\API\WINSPOOL.INC' and add the following lines
Code:
; WINSPOOL API calls
       
import winspool,\
        GetDefaultPrinterA,'GetDefaultPrinterA',\ 
       GetDefaultPrinterW,'GetDefaultPrinterW'       

api     GetDefaultPrinter    

Create file '..INCLUDE\APIA\WINSPOOL.INC' and add the following lines
Code:
; WINSPOOL API calls (ASCII)
         
import winspool,\
        GetDefaultPrinter,'GetDefaultPrinterA'     

modify file ..INCLUDE\WIN32AX.INC by adding the following
Code:
...
include 'api/comdlg32.inc'
include 'api/shell32.inc'
include 'api/wsock32.inc'
include 'api/winspool.inc'          ;<---add this line

...
        comdlg32,'COMDLG32.DLL',\
        shell32,'SHELL32.DLL',\
          wsock32,'WSOCK32.DLL',\     ;<---add ,\     
         winspool,'WINSPOOL.DRV'     ;<---add this line        

...
     import_shell32
     import_wsock32
     import_winspool                        ;<---add this line    
You might also consider the widechar version and counts also or even adding the whole library. There is a very good utility by comrade called dll2inc which will list the export functions of dll files in fasm type format. In fact I would highly recommend visiting his website comrade's bureau if you have not done so already.
Post 09 Sep 2008, 17:37
View user's profile Send private message Reply with quote
Crinan



Joined: 05 Dec 2006
Posts: 28
Location: New Zealand
Crinan 09 Sep 2008, 21:08
Yes Alphonso, you are right - a typo
winspool,'WINSPOOL.DRV'\
I remembered the \ but forgot the comma!
No, I will stick with your section and build on that - seems more straightforward.
Many thanks for comrade's bureau, I had never heard of it.
There seems to be a lot that is hard to find out about, such as comrade's bureau, when you thought I may already have learnt about it.
And I wonder how Revolution knew about the meaning of error code 6 earlier referred to. I couldn't find anywhere to look it up.
Never mind, I may get there yet (if I live long enough!)
Many thanks.
Post 09 Sep 2008, 21:08
View user's profile Send private message Reply with quote
Crinan



Joined: 05 Dec 2006
Posts: 28
Location: New Zealand
Crinan 09 Sep 2008, 22:03
Alphonso
Just a quick addendum
I cannot find any reference to 'api/winspool.inc' on my system, or that file in any directory.
Post 09 Sep 2008, 22:03
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 10 Sep 2008, 09:04
When you click on "Download" in the 7zip website, in the big orange box that you see "SOURCEFORGE.NET" just right below it (still in the orange box) click on "direct link", you should get a download requestor for 7z460.exe.
this Version worked on my file (and the others, as well) that you mention.
Post 10 Sep 2008, 09:04
View user's profile Send private message Reply with quote
Crinan



Joined: 05 Dec 2006
Posts: 28
Location: New Zealand
Crinan 12 Sep 2008, 05:25
Thanks madmatt.
I clicked on "try another mirror" - wrong choice.
I must be getting too old for this!
Post 12 Sep 2008, 05:25
View user's profile Send private message Reply with quote
Crinan



Joined: 05 Dec 2006
Posts: 28
Location: New Zealand
Crinan 12 Sep 2008, 05:42
I must really be missing something.
I downloaded 7z460.exe, ran it to install 7-zip, invoked it to extract the file, and got:
Diagnostic Message
Can not open file 'C:\Downloads\FASMW16726.rar' as archive.
That seems to be the only choice I could make. I read through its help file but got no further.
Post 12 Sep 2008, 05:42
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 12 Sep 2008, 07:15
Crinan wrote:
Can not open file 'C:\Downloads\FASMW16726.rar' as archive.
Check you have the entire FASMW16726.rar file. Also check that you haven't got a pesky virus (or anti-virus) program interfering with things.
Post 12 Sep 2008, 07:15
View user's profile Send private message Visit poster's website Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 12 Sep 2008, 13:37
Hi, Crinian!

There are codes for printing in MDIRichEditor written in fasm on this site

why don't you download it and look how is it working

regards
Post 12 Sep 2008, 13:37
View user's profile Send private message Reply with quote
Crinan



Joined: 05 Dec 2006
Posts: 28
Location: New Zealand
Crinan 16 Sep 2008, 07:01
Revolution:
No viruses but my file was 4,390,097bytes. I downloaded it again and got 4,321,041bytes, and this one got extracted. It seems to be a repeat of fasm but I will need more time to get through it.

habran:
Thanks for that. I have dowloaded it and will look through it.
Post 16 Sep 2008, 07:01
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.