RE: Fun With DLLs
- Posted by Andy Serpa <ac at onehorseshy.com> Mar 23, 2004
- 424 views
Just a wild guess, but maybe it should be "AddFontResourceA"? euphoric wrote: > > > I keep hitting the "AddFontResource" not found branch. Can somebody give > > me a clue as to why it's not finding that function? thanks! > > ----- > > include dll.e > include msgbox.e > > atom gdi32 > integer AddFontResource, fonter > object void, junk > > gdi32 = open_dll("gdi32.dll") > if gdi32 = 0 then > puts(1, "Couldn't open gdi32.dll!\n") > else > -- call AddFontResource > AddFontResource = define_c_func( gdi32, "AddFontResource", > {C_POINTER}, C_INT ) > if AddFontResource = -1 then > void = message_box("Couldn't find AddFontResource!", "FOAD > Install Error", MB_OK ) > else > junk = allocate_string( "free000.ttf" ) > fonter = c_func( AddFontResource, junk ) > free(junk) > end if > end if > >