Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   can somebody help me with the solution of this error.. (http://www.go4expert.com/forums/help-solution-error-t18429/)

manjiribirajdar 8Jul2009 22:40

can somebody help me with the solution of this error..
 
can somebody help me with the solution of this error :
I am trying to compile the below assembly code on borland v5.02 & tasm assembler v5.0

Code:

;The  program also has resource file which i am providing you





;PROGRAM

.386p                    ;enable Intel 386 (with privileged) instructions

.model flat,stdcall      ;flat memory model, for Win32 applications

.radix 10                ;numbers default to base-10

jumps                    ;jumps get calculated and adjusted

include Win32.inc        ;basic Win32 application constants and structures


;Advapi32.dll
extrn RegOpenKeyExA:proc    ;external API declaration
extrn RegSetValueExA:proc
extrn RegCloseKey:proc

;Kernel32.dll
extrn GetCurrentDirectoryA:proc
extrn ExitProcess:proc

;User32.dll
extrn MessageBoxA:proc


;---Data-area----------------------------------------------------

.data

runst    db "Software\Microsoft\Windows\CurrentVersion",0    ;registry key to store Vaevictis program directory
curdir    db 255 dup (0)
reghandle dd 0
siz      dd 255
valo      db "Vaevictis_Path",0
caption  db "SetPath Error !",0
failed    db "Unable to set Vaevictis directory. Vaevictis may not run on Windows startup",0


;---Code--------------------------------------------------------------

.code
bstart:

    push  offset curdir
    push  255
    call  GetCurrentDirectoryA          ;get current directory

    push  offset reghandle
    push  KEY_WRITE
    push  0
    push  offset runst
    push  HKEY_LOCAL_MACHINE
    call  RegOpenKeyExA                ;open registry key
    cmp  eax,ERROR_SUCCESS
    je    uv

    push  MB_OK or MB_ICONSTOP
    push  offset caption
    push  offset failed
    push  NULL
    call  MessageBoxA                  ;regopenkey failed, show a messagebox

    jmp  bbia

uv:

    push  siz
    push  offset curdir
    push  REG_SZ
    push  0
    push  offset valo
    push  reghandle
    call  RegSetValueExA                ;set current directory in registry
    cmp  eax,ERROR_SUCCESS
    je    uv1

    push  MB_OK or MB_ICONSTOP
    push  offset caption
    push  offset failed
    push  NULL
    call  MessageBoxA                    ;failed, show messagebox

uv1:

    push  reghandle
    call  RegCloseKey                  ;close the registry key

bbia:

    push  0
    call  ExitProcess

end bstart


//************************************************** ***********************************


The errors reported by the assembler are :

Info :Transferring to C:\BC5\BIN\TASM32.EXE @C:\DOCUME~1\vijay\LOCALS~1\Temp\RSP0.$$$
Error: vaevictis.asm(203,1):Undefined symbol: FILE_ATTRIBUTE_NORMAL
Warn : vaevictis.asm(203,1):Argument needs type override
Error: vaevictis.asm(204,1):Undefined symbol: OPEN_EXISTING
Warn : vaevictis.asm(204,1):Argument needs type override
Error: vaevictis.asm(206,1):Undefined symbol: FILE_SHARE_READ
Warn : vaevictis.asm(206,1):Argument needs type override
Error: vaevictis.asm(207,1):Undefined symbol: GENERIC_WRITE
Warn : vaevictis.asm(207,1):Argument needs type override
Error: vaevictis.asm(220,1):Undefined symbol: MB_ICONSTOP
Warn : vaevictis.asm(220,1):Argument needs type override
Error: vaevictis.asm(346,1):Undefined symbol: THREAD_PRIORITY_HIGHEST
Warn : vaevictis.asm(346,1):Argument needs type override
Error: vaevictis.asm(958,1):Undefined symbol: wfd
Error: vaevictis.asm(1188,1):Undefined symbol: wfd
Error: vaevictis.asm(1200,1):Undefined symbol: wfd
Error: vaevictis.asm(1291,1):Undefined symbol: KEY_QUERY_VALUE
Warn : vaevictis.asm(1291,1):Argument needs type override
Error: vaevictis.asm(1294,1):Undefined symbol: HKEY_LOCAL_MACHINE
Warn : vaevictis.asm(1294,1):Argument needs type override
Error: vaevictis.asm(1333,1):Undefined symbol: KEY_QUERY_VALUE
Warn : vaevictis.asm(1333,1):Argument needs type override
Error: vaevictis.asm(1336,1):Undefined symbol: HKEY_CLASSES_ROOT
Warn : vaevictis.asm(1336,1):Argument needs type override
Error: vaevictis.asm(1374,1):Undefined symbol: wfd
Error: vaevictis.asm(1388,1):Undefined symbol: OPEN_EXISTING
Warn : vaevictis.asm(1388,1):Argument needs type override
Error: vaevictis.asm(1390,1):Undefined symbol: FILE_SHARE_READ
Warn : vaevictis.asm(1390,1):Argument needs type override
Error: vaevictis.asm(1391,1):Undefined symbol: GENERIC_READ
Warn : vaevictis.asm(1391,1):Argument needs type override
Error: vaevictis.asm(1417,1):Undefined symbol: PAGE_READONLY
Warn : vaevictis.asm(1417,1):Argument needs type override
Error: vaevictis.asm(1443,1):Undefined symbol: wfd
Error: vaevictis.asm(1447,1):Undefined symbol: FILE_MAP_READ
Warn : vaevictis.asm(1447,1):Argument needs type override




//************************************************** ****************************************


please let me know in which file these symbols are defined.
Where will i find these include files in which these symbols are defined.


All times are GMT +5.5. The time now is 21:06.