I have a problem with installing a printer using "AddPrinterA" Api function. this function needs a pointer to a _PRINTER_INFO_2A object, so we have to create this object first, set it's fields and send it through AddPrinterA.
for example in delphi we can do this:
var
PrinterInfo : ^PRINTER_INFO_2A
begin
...
PrinterInfo^.pPortName := pchar('FILE:')
PrinterInfo^.pPrinterName:= pchar(sName);
...
AddPrinterA(nil, 2, PrinterInfo);
end;
I wonder if and how we can create this object in IA to use AddPrinterA function
Sending a _PRINTER_INFO_2A to a dll
Sorry for the late reply.
No, I don't think you can create data structures in IA. What I did to get around this was write a couple of functions in a dll and then call the functions from IA using the Call DLL Function plug-in. Once you're in your function you can do pretty much whatever you want. I used C but you can use Delphi too as far as i know.
No, I don't think you can create data structures in IA. What I did to get around this was write a couple of functions in a dll and then call the functions from IA using the Call DLL Function plug-in. Once you're in your function you can do pretty much whatever you want. I used C but you can use Delphi too as far as i know.
Who is online
Users browsing this forum: No registered users and 60 guests