Jump to content
Tuts 4 You

MFMPlayer library troubles


F0X

Recommended Posts

Posted (edited)

I'm having some troubles with the mfmplayer library, seems the .lib file is no good.

Writing a keygen template in assembler, when I link I get this:

Assembling: H:\KEYGEN_BASE\main.asm

H:\KEYGEN_BASE\mfmplayer.lib(1) : error A2008: syntax error : !

H:\KEYGEN_BASE\mfmplayer.lib(2) : error A2044: invalid character in file

H:\KEYGEN_BASE\mfmplayer.lib(3) : error A2044: invalid character in file

H:\KEYGEN_BASE\mfmplayer.lib(3) : error A2039: line too long

H:\KEYGEN_BASE\mfmplayer.lib(4) : error A2044: invalid character in file

H:\KEYGEN_BASE\mfmplayer.lib(5) : error A2044: invalid character in file

etc. etc.

H:\KEYGEN_BASE\mfmplayer.lib(100) : fatal error A1012: error count exceeds 100; stopping assembly

And all I do is, include mfmplayer.inc (which works fine ) then I include the library with includelib mfmplayer.lib

and I get those 100 errors... without the lib its alright so it is something with the .lib file. Anyone a clue what

could be happening? In an other project I have it works fine so I do not get what's going on here.

Note: This is even before I add some code, just linking the library gives problems.

Edited by F0X
Posted

Look here in this source for add Mfm
/>http://reversing.do.am/Download/Music.rar

Posted

can yu attach the whole keygen code with lib?

then i try here...

it's this line i think it's the interresting point:

"H:\KEYGEN_BASE\mfmplayer.lib(1) : error A2008: syntax error : !"

I think the others are followed errors.

Posted
"H:\KEYGEN_BASE\mfmplayer.lib(1) : error A2008: syntax error : !"

I dont know what wromh in you code please upload your source for more help or look in this source

Music.rar

Posted

You did not even understand what I was saying... The problem is with the lib file, _not_ with my code,

this is what I use in my source file AND in my other project (where it works fine):

    push esi
INVOKE FindResource, hInstance, IDM_MUSIC, RT_RCDATA
push eax
INVOKE SizeofResource, hInstance, eax
mov nMusicSize, eax
pop eax
INVOKE LoadResource, hInstance, eax
INVOKE LockResource, eax
mov esi, eax
mov eax, nMusicSize
add eax, SIZEOF nMusicSize
INVOKE GlobalAlloc, GPTR, eax
mov pMusic, eax
mov ecx, nMusicSize
mov dword ptr [eax], ecx
add eax, SIZEOF nMusicSize
mov edi, eax
rep movsb
pop esi
INVOKE mfmPlay, pMusic

The code is perfectly fine, the problem is with the .lib file. And your lib file gives the exact same error, and yes it says:

"H:\KEYGEN_BASE\mfmplayer.lib(1) : error A2008: syntax error : !"

This ! is also present in your lib file, if you looked you could have seen it.

Posted (edited)

I have this same error if i use

include mfmplayer.lib


Assembling: Music.asm
mfmplayer.lib(1) : error A2008: syntax error : !
mfmplayer.lib(2) : error A2044: invalid character in file
mfmplayer.lib(3) : error A2044: invalid character in file
mfmplayer.lib(3) : error A2039: line too long

You must write

include mfmplayer.inc

includelib mfmplayer.lib

And now works this.And i have say look ín this source

Edited by ragdog
Posted

Ah right, nice typo of mine there.

Now the other thing is, whenever I do not include the mfmplayer.lib file project is fine now ;) but when I do, user32.lib is not found. Exact error is:

LINK : fatal error LNK1104: cannot open file "\masm32\lib\user32.lib"

Obviously it's there, before I added mfmplayer support the project compiled fine, just without a nice tune. Guess there's some order in which I have to do the includes. Right now I've got it like this:

include windows.inc
include kernel32.inc
include user32.inc
includelib kernel32.lib
includelib user32.libinclude gdi32.inc
includelib gdi32.libinclude oleaut32.inc
includelib oleaut32.libinclude mfmplayer.inc
includelib mfmplayer.lib

I've been moving them around in combinations but can't get it right :/

Bit of an odd error, guess it has something to do with mfmplayer but don't really know what.

Posted (edited)

Double postage, sorry about that.

I found out that the error is caused by:

invoke mfmPlay, pMusic

When I add that line it will give the linking error.

And yes I looked at the sources you guys provided, I was doing the exact same thing. It's just that mfmPlay causes a linking error.. which I really don't understand the cause of.

Edited by F0X

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...