FUNCTION PrinterDriverName * Returns the Printer Driver File Name LPARAMETERS tcPrinterName * API Declarations DECLARE INTEGER OpenPrinter IN Winspool.drv; STRING @pPrinterName, INTEGER @phPrinter,; STRING @pDefault DECLARE INTEGER ClosePrinter IN Winspool.drv; INTEGER hPrinter DECLARE INTEGER GetPrinterDriver IN Winspool.drv; INTEGER hPrinter, STRING @pEnvironment,; INTEGER dLevel, INTEGER pDriverInfo,; INTEGER cbBuf, INTEGER @pcbNeeded DECLARE INTEGER HeapCreate IN Win32API; INTEGER dwOptions, INTEGER dwInitialSize,; INTEGER dwMaxSize DECLARE INTEGER HeapAlloc IN Win32API; INTEGER hHeap, INTEGER dwFlags, INTEGER dwBytes DECLARE lstrcpy IN Win32API; STRING @lpstring1, INTEGER lpstring2 DECLARE INTEGER HeapFree IN Win32API; INTEGER hHeap, INTEGER dwFlags, INTEGER lpMem DECLARE HeapDestroy IN Win32API; INTEGER hHeap LOCAL lcresult, lcprinter, lnheaphandle, lnhandle,; lnsize, lnheap, lnptr, lcstruct lcprinter = tcPrinterName lnhandle = 0 lcresult = "" IF OpenPrinter(@lcprinter, @lnhandle, 0) # 0 * Create space on the heap lnheaphandle = HeapCreate(0, 4096, 0) IF lnheaphandle # 0 * Get the required size of the DRIVER_INFO_2 structure lnsize = 0 GetPrinterDriver(lnhandle, 0, 2, 0, 0, @lnsize) * Get a pointer to an address lnheap = HeapAlloc(lnheaphandle, 0, lnsize) * Get the information into the structure GetPrinterDriver(lnhandle, 0, 2, lnheap, lnsize, @lnsize) * Copy the structure to VFP memory * In order to get the pointer to the string lcstruct = SYS(2600, lnheap, lnsize) lnptr = This.StringToInteger(SUBSTR(lcstruct, 5, 4)) * Initialize the buffer to receive the Driver * to MAX_PATH lcresult = SPACE(260) = lstrcpy(@lcresult, lnptr) * Remove the trailing CHR(0) lcresult = LEFT(lcresult, AT(CHR(0), lcresult) - 1) * Free the heap = HeapFree(lnheaphandle, 0, lnheap) * Clean up by destorying the handle * to the heap = HeapDestroy(lnheaphandle) ENDIF * Close the printer = ClosePrinter(lnhandle) ENDIF RETURN lcresult ENDFUNCJust post back if you have any questions (which I doubt< s >).