Jump to content
Tuts 4 You

dmex (.net class library)


Ufo-Pu55y

Recommended Posts

First some infos:

http://www.joachim-bauch.de/tutorials/load...ry.html/en/view

I've tried to convert it into a C# class.

Here's an example exe, to see what the class might be used for:

Keygen.rar

The example maps the native ufmod.dll from the resources into

memory and then calls some of its functions to play a chiptune (also from resources).

This way you don't have to save the dll to hard-disk before using it.

And here's the full package:

DMex.rar

It contains:

-the .net class library

-a help file

-2 example projects (vb.net and c#)

As requested.. here's the source of the DMex class only:

class_DMex_source.7z

Have phun and post feedback, if it's useful somehow or if you got improvements ;)

Edited by Ufo-Pu55y
  • Like 2
Link to comment
Entrypoint not valid or not found

:beta:

Uhm I've tried it on a pretty clean XP SP2 install with .NET FX 2.0 SP1...

Maybe it just works with 3.0 ?

Edit:

Even crashes on Vista :o

Haven't installed any .NET stuff so this should be 3.0

Edited by Killboy
Link to comment
Entrypoint not valid or not found

:beta:

Uhm I've tried it on a pretty clean XP SP2 install with .NET FX 2.0 SP1...

Maybe it just works with 3.0 ?

same problem on Vista (.Net FX 3.0). But working on XP sp3 .NET FX 2.0 (VM)

Edited by hitman
Link to comment
TheAnalyzer

Thank's bro :wub::wub:

Your threads are always great.

No Problem run fine in XP SP2

SeeYah

Edited by The Analyzer
Link to comment

Sry, I dunno how to trace that down, coz I've tested on several boxes.. XP & Vista.. NET2.0 & 3.0.

All worked ok... :-\

Link to comment
  • 2 months later...

I've updated the 1st post.

The class now comes as dll, but you can simply merge the files with M$ ILMerge or any net packer.

Meanwhile uFMOD is also available as DLL, and it seems to work like a charm with the dll loader.

I've also added 2 example projects (both about using uFMOD) and a help doc.

cheers

Link to comment
  • 2 months later...
  • 1 year later...

I'm having an issue with this. Mine keeps telling me "Entrypoint not valid or not found". I'm using MS Visual Studio 2010 and I've tried compiling it with the 2.0, 3.0 and 4.0 frameworks... same problem with all of them. I'm also running Windows 7.

Strange thing is, the keygen example and the compiled c# and VB examples run on my system with no problem, but if I try to compile them and then run them, I get the entrypoint error.

Any ideas?

-akusei

Link to comment

I'm having an issue with this. Mine keeps telling me "Entrypoint not valid or not found". I'm using MS Visual Studio 2010 and I've tried compiling it with the 2.0, 3.0 and 4.0 frameworks... same problem with all of them. I'm also running Windows 7.

Strange thing is, the keygen example and the compiled c# and VB examples run on my system with no problem, but if I try to compile them and then run them, I get the entrypoint error.

Any ideas?

-akusei

I'll take a look.. first idea tho: did you set the target platform to x86?

EDIT/

Ah.. nvm. Just tried on my own. U're right! Will see what's up with it.

Edited by Ufo-Pu55y
Link to comment

Hah, here's the answer:
/>http://blogs.msdn.com/ed_maurer/archive/2007/12/14/nxcompat-and-the-c-compiler.aspx

So I run something like...

editbin /NXCOMPAT:NO uFMOD.exe

.. and it works again.

Link to comment

Hah, here's the answer:
/>http://blogs.msdn.com/ed_maurer/archive/2007/12/14/nxcompat-and-the-c-compiler.aspx

So I run something like...

editbin /NXCOMPAT:NO uFMOD.exe

.. and it works again.

You're awesome Ufo! I'll test it out tomorrow when I get to work and let you know if it corrects my issue, but since it worked for you, it'll most likely work for me.

Thanks again,

akusei

edit: works great, thanks!

Edited by akusei
Link to comment

Ok, so now I'm having some more troubles. I used editbin to change the NXCOMPAT flag and that worked great, but now I'm trying to merge dmex.dll with my application using ilmerge. This is the command line I'm using:


ilmerge /target:winexe /closed /out:test.exe /lib:c:\windows\microsoft.net\framework\v4.0.30319 infile.exe dmex.dll

I've tries it with and without the "/closed" option. When I run the merged exe it crashes and doesn't tell me anything useful. Any clue how to fix that?

Thanks,

akusei

edit:

I figured it out, I needed to at /targetplatform


ilmerge /closed /targetplatform:v4,c:\windows\microsoft.net\framework\v4.0.30319 /target:winexe /out:test.exe infile.exe dmex.dll
Edited by akusei
Link to comment
  • 11 months later...
  • 3 months later...

One question, @Ufo... as i've seen in the keygen example you didn't use the Dmex.dll physically.It is possible load it from resources, too?

Link to comment

@Dipsy & Walkin:

Simply rip the class with reflector or ilspy and

include it in your project.. takes you 1 min

Link to comment

I get a lotta error "This (int or long) can't be converted to IntPtr" xD

Btw, i wanted to ask about the SetPaused proc, i don't know how to implement it :/

Link to comment

thx for this DLL. but i have the same problem !!

Entrypoint not valid or not found

and i can't understand the article and this line:


editbin /NXCOMPAT:NO uFMOD.exe

:unsure:

should i make this step every time i compile the source code ??

any help please :flowers:

Link to comment

simply put something like this into the post build box of the regarding VS project:

editbin /NXCOMPAT:NO $(TargetPath)
Link to comment

I converted it to vb with a tool, but now i get an OverFlowException when loading the ufmod dll :(

This sh!t is getting me crazy :S

Link to comment

@Ufo-Pu55y thx for your replay but i get this error in the Error List:

'editbin' is not recognized as an internal or external command

MS visual studio 2008

Link to comment

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