flat assembler
Message board for the users of flat assembler.

Index > Windows > import USER32 Error

Author
Thread Post new topic Reply to topic
Spidark



Joined: 11 May 2005
Posts: 39
Spidark 11 May 2005, 22:12
Hello 2 All.
I'm new 2 assembly and verry new 2 FASM.
I having problems compiling my program.
I get the following error.
Code:
C:\Fasm\BIN\GORC /r "testdemo.rc"

GoRC.Exe Version 0.88 - Copyright Jeremy Gordon 1998/2005 - JG@JGnet.co.uk
Output file: testdemo.res
C:\Fasm\BIN\FASM "testdemo.asm" "testdemo.exe"
flat assembler  version 1.60
testdemo.asm [143]:
        import    USER32,\
c:\fasm\bin\include\macro/import.inc [26] import [8]:
      dd 80000000h + string
error: value out of range.

Make error(s) occured.
Total compile time 210 ms
    

I'm using Radasm as IDE.
Here's a section of the code where it goes wrong.
Any body with a solution or hint for this problem .?
Code:
section '.idata' import data readable writeable
        library KERNEL32, 'KERNEL32.DLL',\
                USER32,   'USER32.DLL'

        import  KERNEL32,\
               GetModuleHandle,         'GetModuleHandleA',\
               ExitProcess,             'ExitProcess'

        import USER32,\
               RegisterClass,           'RegisterClassA',\
               CreateWindowEx,          'CreateWindowExA',\
               DefWindowProc,           'DefWindowProcA',\
               ShowWindow,              'ShowWindow',\
               LoadCursor,              'LoadCursorA',\
               LoadIcon,                'LoadIconA',\
               GetMessage,              'GetMessageA',\
               TranslateMessage,        'TranslateMessage',\
               DispatchMessage,         'DispatchMessageA',\
               PostQuitMessage,         'PostQuitMessage',\
               MessageBoxEx,            'MessageBoxExA'
              ; GetWindowRect,          'GetWindowRect'
              ; GetDesktopWindow,       'GetDesktopWindow'\
              ; MoveWindow,             'MoveWindow'
    
As soon as i add the last 3 items ( for a center proc ) to the import list i get the above error.
Post 11 May 2005, 22:12
View user's profile Send private message Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc 12 May 2005, 00:19
Try changing:

Code:
               PostQuitMessage,         'PostQuitMessage',\
               MessageBoxEx,            'MessageBoxExA'
               GetWindowRect,          'GetWindowRect'
               GetDesktopWindow,       'GetDesktopWindow'\
               MoveWindow,             'MoveWindow'
    


To:

Code:
               PostQuitMessage,         'PostQuitMessage',\
               MessageBoxEx,            'MessageBoxExA',\
               GetWindowRect,          'GetWindowRect',\
               GetDesktopWindow,       'GetDesktopWindow',\
               MoveWindow,             'MoveWindow'
    


Note the addition of a , before the \ in GetDesktopWindow. This might fix the problem.
Post 12 May 2005, 00:19
View user's profile Send private message Visit poster's website Reply with quote
Spidark



Joined: 11 May 2005
Posts: 39
Spidark 12 May 2005, 00:29
crc wrote:

Note the addition of a , before the \ in GetDesktopWindow. This might fix the problem.


Yes Thank's it did fix the problem ,( kinda blind )hihihi didn't see it.
Post 12 May 2005, 00:29
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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.