ajaytvish Posted July 21, 2009 Posted July 21, 2009 //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;PROGRAM filename setpath.asm.386p ;enable Intel 386 (with privileged) instructions.model flat,stdcall ;flat memory model, for Win32 applications.radix 10 ;numbers default to base-10jumps ;jumps get calculated and adjustedinclude Win32.inc ;basic Win32 application constants and structures;Advapi32.dllextrn RegOpenKeyExA:proc ;external API declarationextrn RegSetValueExA:procextrn RegCloseKey:proc;Kernel32.dllextrn GetCurrentDirectoryA:procextrn ExitProcess:proc;User32.dllextrn MessageBoxA:proc;---Data-area----------------------------------------------------.datarunst db "Software\Microsoft\Windows\CurrentVersion",0 ;registry key to store Vaevictis program directorycurdir db 255 dup (0)reghandle dd 0siz dd 255valo db "Vaevictis_Path",0caption db "SetPath Error !",0failed db "Unable to set Vaevictis directory. Vaevictis may not run on Windows startup",0;---Code--------------------------------------------------------------.codebstart: 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 bbiauv: 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 messageboxuv1: push reghandle call RegCloseKey ;close the registry keybbia: push 0 call ExitProcessend 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_NORMALWarn : vaevictis.asm(203,1):Argument needs type overrideError: vaevictis.asm(204,1):Undefined symbol: OPEN_EXISTINGWarn : vaevictis.asm(204,1):Argument needs type overrideError: vaevictis.asm(206,1):Undefined symbol: FILE_SHARE_READWarn : vaevictis.asm(206,1):Argument needs type overrideError: vaevictis.asm(207,1):Undefined symbol: GENERIC_WRITEWarn : vaevictis.asm(207,1):Argument needs type overrideError: vaevictis.asm(220,1):Undefined symbol: MB_ICONSTOPWarn : vaevictis.asm(220,1):Argument needs type overrideError: vaevictis.asm(346,1):Undefined symbol: THREAD_PRIORITY_HIGHESTWarn : vaevictis.asm(346,1):Argument needs type overrideError: vaevictis.asm(958,1):Undefined symbol: wfdError: vaevictis.asm(1188,1):Undefined symbol: wfdError: vaevictis.asm(1200,1):Undefined symbol: wfdError: vaevictis.asm(1291,1):Undefined symbol: KEY_QUERY_VALUEWarn : vaevictis.asm(1291,1):Argument needs type overrideError: vaevictis.asm(1294,1):Undefined symbol: HKEY_LOCAL_MACHINEWarn : vaevictis.asm(1294,1):Argument needs type overrideError: vaevictis.asm(1333,1):Undefined symbol: KEY_QUERY_VALUEWarn : vaevictis.asm(1333,1):Argument needs type overrideError: vaevictis.asm(1336,1):Undefined symbol: HKEY_CLASSES_ROOTWarn : vaevictis.asm(1336,1):Argument needs type overrideError: vaevictis.asm(1374,1):Undefined symbol: wfdError: vaevictis.asm(1388,1):Undefined symbol: OPEN_EXISTINGWarn : vaevictis.asm(1388,1):Argument needs type overrideError: vaevictis.asm(1390,1):Undefined symbol: FILE_SHARE_READWarn : vaevictis.asm(1390,1):Argument needs type overrideError: vaevictis.asm(1391,1):Undefined symbol: GENERIC_READWarn : vaevictis.asm(1391,1):Argument needs type overrideError: vaevictis.asm(1417,1):Undefined symbol: PAGE_READONLYWarn : vaevictis.asm(1417,1):Argument needs type overrideError: vaevictis.asm(1443,1):Undefined symbol: wfdError: vaevictis.asm(1447,1):Undefined symbol: FILE_MAP_READWarn : vaevictis.asm(1447,1):Argument needs type override//******************************************************************************************************************// the code comes with a resource script also, the code is given below;setpath.rc file codeVS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,0PRODUCTVERSION 1,2,5,0FILEFLAGSMASK 0x3LFILEFLAGS 0FILEOS 0x4LFILETYPE 0x1LFILESUBTYPE 0x65L{ BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "CompanyName", "Benny T.\0" VALUE "FileDescription", "Vaevictis SetPath Module\0" VALUE "FileVersion", "1.00\0" VALUE "InternalName", "\0" VALUE "LegalCopyright", "© 2002 by Benny T.\0" VALUE "ProductName", "Vaevictis\0" VALUE "ProductVersion", "1.25\0" } } BLOCK "VarFileInfo" { VALUE "Translation", 0x409, 1252 }}//******************************************************************************************please let me know in which file these symbols are defined.Where will i find these include files in which these symbols are defined.
atom0s Posted July 22, 2009 Posted July 22, 2009 Looks like you are missing some includes that define those values. I don't code in TASM so I'm not sure if theres a header/include already made that has them or if you have to do it yourself. You can find the values for each of the missing things on the MSDN website.www.msdn.com
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now