Sign in to follow this  
Followers 0
jpam

AddFontMemResourceEx

4 posts in this topic

#1 ·  Posted (edited)

i am making a resource filemaker

goal is to get smaller .exe files and protection of released addon files

the resource filemaker writes a encrypted header containing info of all files inside the resource file

and writes all added files in bytes in one big file

it loads (.MOD .XM .IT .S3M .MID .RMI .SGT .FSB)

(".MP3 .WAV .OGG .MP2 .RAW")

(".bmp .jpg .gif .png .wmf .TXT")

but i got stuck on loading fonts from resource file ! :)

msdn2; http://msdn2.microsoft.com/en-us/library/m...942(VS.85).aspx

HANDLE AddFontMemResourceEx(

PVOID pbFont, // font resource

DWORD cbFont, // number of bytes in font resource

PVOID pdv, // Reserved. Must be 0.

DWORD *pcFonts // number of fonts installed

);

gdi AddFontMemResourceEx

$value = DllCall("gdi32.dll","int","AddFontMemResourceEx","int",$Pointer,"int",$ByteSize,"int",0,"int",1)

$value[0] dont gives me a handle back !

i tryed all kinds of return types

whats wrong with the dllcall ?

thanks in advance for any helping !

jpam

Edited by jpam

Share this post


Link to post
Share on other sites



BUMP!

can someone help me?

Share this post


Link to post
Share on other sites

Last param should be

"int*",0


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

pppfff, Thanks alot Siao !

It's working !

But can you explain why the astrix must be after the last "int*" ?

never saw it before !

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0