Author Topic: PROTOs  (Read 19626 times)

traphunter

  • Guest
PROTOs
« on: December 05, 2013, 10:36:36 PM »
Hi everybody!

I had a look at poasm, but I don't like to declare every API-function manually.
I can't get the FuncProtos.zip (http://forum.pellesc.de/index.php?topic=5092.0) because guest are not allowed to download attachments, I guess. Could I get this file here?

TWell

  • Member
  • ****
  • Posts: 743
Re: PROTOs
« Reply #1 on: December 05, 2013, 11:34:40 PM »
Another option is WinInc from here
Maybe some problems with it too ?

dedndave

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
Re: PROTOs
« Reply #2 on: December 06, 2013, 12:26:28 AM »
is there some reason the masm32 package includes don't work ?
is there some reason masm doesn't work ?   :redface:

it's a safe bet that most of us don't want to prototype all the API functions, either

traphunter

  • Guest
Re: PROTOs
« Reply #3 on: December 06, 2013, 01:59:31 AM »
thank you both!

with goasm and easy code I've just included windows.inc and general functions like ExitProcess assembled fine. With poasm, poide and masm32 includes it doesn't work. I tried to include winbase.inc, but this inc file doesn't exist. And for masm32 I can't get uptodate binaries. There is allways sand in the gear.

BTW, I like goasm syntax but I don't like some behaviour from easy code.

dedndave

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
Re: PROTOs
« Reply #4 on: December 06, 2013, 03:42:09 AM »
ok
if you want to continue to use GoAsm, then use Edgar's headers
http://masm32.com/board/index.php?board=10.0

http://www.donkeysstable.com/goasm_headers.htm

traphunter

  • Guest
Re: PROTOs
« Reply #5 on: December 06, 2013, 04:05:15 AM »
with goasm and easy code I had already used these headers. But they don't work with poasm. Nothing worked with poasm for me, except a PROTO ... in the source file. I hope this FuncProtos.zip will work, but I don't want to register at that forum, I hope I can get it in this forum.

dedndave

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
Re: PROTOs
« Reply #6 on: December 06, 2013, 04:49:45 AM »
ok - i am a little confused   :biggrin:
not the first time

you like GoAsm, but not EasyCode
so - continue to use GoAsm, but not EasyCode
there is no requirement that you use EasyCode

my understanding of PoAsm is that it will use the include files from the masm32 package
however, i've never had the need to try it out

TWell

  • Member
  • ****
  • Posts: 743
Re: PROTOs
« Reply #7 on: December 06, 2013, 04:51:04 AM »
with goasm and easy code I had already used these headers. But they don't work with poasm. Nothing worked with poasm for me, except a PROTO ... in the source file. I hope this FuncProtos.zip will work, but I don't want to register at that forum, I hope I can get it in this forum.
POAsm example with minimal WinInc.

traphunter

  • Guest
Re: PROTOs
« Reply #8 on: December 06, 2013, 06:07:23 AM »

I've downloaded WinInc208
I've extracted it
I've added the directory to the project options as another include directory
My source file has an statement "include Windef.inc"

and the assembler makes trouble:

..\WinInc208\Include\Windef.inc(217): error: Expected ':'.
..\WinInc208\Include\Windef.inc(217): error: Expected 'type'.
..\WinInc208\Include\Windef.inc(219): error: Expected ':'.
..\WinInc208\Include\Windef.inc(219): error: Expected 'type'.
..


If I try masm32 header I get this error:

\asmtest.asm(32): error: Symbol 'ExitProcess' is undefined.


ok, ExitProcess should be defined in winbase.h, but there isn't a winbase.inc.
What now? I am not a mage and can not imagine where this function is defined.

I hate those problems. :(

Thank you for your patience

Vortex

  • Moderator
  • Member
  • *****
  • Posts: 2788
Re: PROTOs
« Reply #9 on: December 06, 2013, 06:09:04 AM »
Hi traphunter,

Attached is the include file set for Poasm.

TWell

  • Member
  • ****
  • Posts: 743
Re: PROTOs
« Reply #10 on: December 06, 2013, 06:47:08 AM »

I've downloaded WinInc208
I've extracted it
I've added the directory to the project options as another include directory
My source file has an statement "include Windef.inc"

and the assembler makes trouble:

..\WinInc208\Include\Windef.inc(217): error: Expected ':'.
..\WinInc208\Include\Windef.inc(217): error: Expected 'type'.
..\WinInc208\Include\Windef.inc(219): error: Expected ':'.
..\WinInc208\Include\Windef.inc(219): error: Expected 'type'.
..

With POAsm try this:
Code: [Select]
WIN32_LEAN_AND_MEAN equ <>
include Windows.inc
or
Code: [Select]
WIN32_LEAN_AND_MEAN equ <>
;include Windows.inc
include WinAsmP.inc
include Windef.inc
include WinBase.inc
include WinUser.inc
POAsm must include  modified WinAsmP.inc ?

traphunter

  • Guest
Re: PROTOs
« Reply #11 on: December 06, 2013, 06:58:52 AM »
thank you Vortex, but still the same problem

error: Symbol 'ExitProcess' is undefined.


windows.inc fails and winbase.inc doesn't exists and I can't imagine what *.inc has to be included.

Or is it a MUST to write my own winbase.inc to have the right prototype for ExitProcess?


@TWell

I tried both and both leads to the same errors in windef.inc

Vortex

  • Moderator
  • Member
  • *****
  • Posts: 2788
Re: PROTOs
« Reply #12 on: December 06, 2013, 07:05:02 AM »
You need kernel32.inc to define ExitProcess. Could you post here your source code? Maybe, we can help you.

traphunter

  • Guest
Re: PROTOs
« Reply #13 on: December 06, 2013, 07:19:49 AM »
build :t

I first searched at msdn for the right headers, than I try to include the same header in assembler , therefore I whish I could have the same *.inc files like the microsoft *.h files.

thank you

EDIT: In the future I will try the lib name and not only the header name, reported by microsoft

dedndave

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
Re: PROTOs
« Reply #14 on: December 06, 2013, 07:43:38 AM »
take a look at the file  \masm32\include\masm32rt.inc
it's a plain text file - you can open it with NotePad
it takes care of most things you'll need in one line
Code: [Select]
    INCLUDE     \masm32\include\masm32rt.inc
the masm32 package does not have a winbase.inc
instead, the contents of that file are in windows.inc (which also includes winextra.inc)

this is a recording, for more options, press #*