Sorry if this has been asked before, but I'm pretty new to FASM, and I have searched but nothing seems to be what I'm after.
Basically, I have a ton of DLL's which I've wrote myself over the years, and have used them in another language to plug the holes, and a load of them I dont intend to rewrite.
So is it possible, say, if I had a DLL called "printer.dll" (Written in C++) and a function named "OpenPrinter()" which returns a boolean value depending if the file has been created or not... Something like:-
//Printer.DLL
//Globals
PRINTDLG pd;
DOCINFO di;
ULONG_PTR gdiToken;
#define MYDECL extern "C" _declspec(dllexport)
#define MYCALL _stdcall
MYDECL bool MYCALL _OpenPrinter(void)
{
GdiplusStartupInput gdiplusStartupInput;
GdiplusStartup(&gdiToken, &gdiplusStartupInput, NULL);
ZeroMemory(&di, sizeof(di));
di.cbSize = sizeof(di);
di.lpszDocName = "New Doc";
ZeroMemory(&pd, sizeof(pd));
pd.lStructSize = sizeof(pd);
pd.Flags = PD_RETURNDC;
if(!PrintDlg(&pd))
{
return(false);
}
return(true);
}
After decoration, we'll have something like "_OpenPrinter@0" or along them lines... So the question is, how would I access this through FASM (In code)
Thanks for any help in advance!