flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
baldr 09 Jun 2010, 15:38
bobsobol,
API\KERNEL32.INC expects import macro to be defined. import macro from MACRO\IMPORT32.INC expects library macro to be invoked (its expansion from API\KERNEL32.INC invocation is effectively nothing if kernel32.referred isn't defined). FASM symbols are case-sensitive (Kernel32 != kernel32). library macro expects even argument to be a string. You may use extended headers to simplify import (API\KERNEL32.INC is a supplementary include file for WIN32[AW]X.INC). |
|||
![]() |
|
revolution 09 Jun 2010, 15:42
Well you didn't post all of your code so we don't know what is really wrong, but the library macro needs a string parameter.
Code: library kernel32, 'KERNEL32.dll' |
|||
![]() |
|
bobsobol 09 Jun 2010, 19:50
Complete source listing exceeds 23Meg... I think nobody would read it. XD
Thanks for the responses. Let's see if I can minimise the true source to essential parts. Main.asm Code: format PE GUI 4.0 entry EntryPoint include 'win32a.inc' include 'macro.inc' include 'static.inc' include 'data.inc' section '.text' code readable executable ... ... ... win32a.inc you all have and know. macro.inc Code: ptr equ static.inc Code: section '.rdata' data readable export import include '.\imports.inc' ... ... ... imports.inc Code: library DSound, DSOUND.dll, \ ODBC32, ODBC32.dll, \ Kernel32, KERNEL32.dll, \ User32, USER32.dll, \ GDI32, GDI32.dll, \ AdvAPI32, ADVAPI32.dll, \ Shell32, SHELL32.dll, \ OLE32, ole32.dll, \ Custom, Custom.dll, \ DDraw, DDRAW.dll, \ WinMM, WINMM.dll, \ ShlWAPI, SHLWAPI.dll, \ WinINet, WININET.dll, \ IMM32, IMM32.dll, \ CustomSQL, CustomSQLDll.dll ; library DSound, DSOUND.dll import DSound,\ DirectSoundEnumerate,'DirectSoundEnumerateA' ; DSOUND.dll!DSOUND.1 ; library ODBC, ODBC32.dll import ODBC32,\ SQLBindParam, 'SQLBindParam', \ ; ODBC32.24 SQLExecute, 'SQLExecute', \ ; ODBC32.11 SQLCancel, 'SQLCancel', \ ; ODBC32.4 SQLFreeConnect, 'SQLFreeConnect', \ ; ODBC32.13 SQLGetCursorName, 'SQLGetCursorName', \ ; ODBC32.16 SQLGetConnectAttr, 'SQLGetConnectAttr', \ ; ODBC32.31 SQLError, 'SQLError', \ ; ODBC32.9 SQLSetStmtAttr, 'SQLSetStmtAttr', \ ; ODBC32.75 SQLDescribeCol, 'SQLDescribeCol' ; ODBC32.7 include 'api\kernel32.inc' include 'api\user32.inc' include 'api\gdi32.inc' include 'api\advapi32.inc' include 'api\SHELL32.inc' ; library OLE32, ole32.dll import OLE32, \ CoUninitialize, 'CoUninitialize', \ CoCreateInstance, 'CoCreateInstance', \ CoInitialize, 'CoInitialize' ; library Custom, Custom.dll import Custom, \ DecryptFunc, '?DecryptFunc@@YAHPAD0@Z' ; library DDraw, DDRAW.dll import DDraw, \ DirectDrawCreate, 'DirectDrawCreate' ; library WinMM, WINMM.dll import WinMM, \ timeGetTime, 'timeGetTime', \ timeEndPeriod, 'timeEndPeriod', \ mixerSetControlDetails, 'mixerSetControlDetails', \ mixerGetLineInfo, 'mixerGetLineInfoA', \ mixerGetLineControls, 'mixerGetLineControlsA', \ mixerGetControlDetails, 'mixerGetControlDetailsA', \ mixerGetDevCaps, 'mixerGetDevCapsA', \ mixerOpen, 'mixerOpen', \ mixerClose, 'mixerClose', \ mmioGetInfo, 'mmioGetInfo', \ mmioAdvance, 'mmioAdvance', \ mmioSetInfo, 'mmioSetInfo', \ mmioSeek, 'mmioSeek', \ mmioOpen, 'mmioOpenA', \ mmioDescend, 'mmioDescend', \ mmioRead, 'mmioRead', \ mmioAscend, 'mmioAscend', \ mmioClose, 'mmioClose', \ timeBeginPeriod, 'timeBeginPeriod', \ timeSetEvent, 'timeSetEvent', \ timeKillEvent, 'timeKillEvent' ; library ShlWAPI, SHLWAPI.dll import ShlWAPI, \ PathFileExists, 'PathFileExistsA' ; library WinINet, WININET.dll import WinINet, \ HttpQueryInfo, 'HttpQueryInfoA', \ InternetCloseHandle, 'InternetCloseHandle', \ InternetQueryDataAvailable, 'InternetQueryDataAvailable', \ InternetOpen, 'InternetOpenA', \ InternetOpenUrl, 'InternetOpenUrlA', \ InternetReadFile, 'InternetReadFile' ; library IMM32, IMM32.dll import IMM32, \ ImmSetConversionStatus, 'ImmSetConversionStatus', \ ImmGetContext, 'ImmGetContext', \ ImmSetCompositionWindow, 'ImmSetCompositionWindow', \ ImmSetOpenStatus, 'ImmSetOpenStatus' include 'api\wsock32.inc' ; library CustomSQL, CustomSQLDll.dll import CustomSQL, \ SQLDelCharProcess, '?SQLDelCharProcess@@YAHPAD0@Z', \ SQLAddCharProcess, '?SQLAddCharProcess@@YAHPAD0@Z', \ SQLLoginProcess, '?SQLLoginProcess@@YAHPAD@Z', \ SQLLogoutProcess, '?SQLLogoutProcess@@YAHPAD000KH@Z' data.inc Code: section '.data' data readable writeable ... ... ... ;lots more dd, dw, db etc ... ... ... include 'undefined.inc' undefined.inc Code: ... ... ... ;lost of labels with db xxx DUP (?) ... ... ... It's probably a matter of mixed case... I'll go back over the official includes and check the case they use. EDIT--- Yes... case, and putting single quotes around the DLL names in "library" definition seem to do the trick. I will port to FASM yet. ^_^ Thanks baldr. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.