Epson Research and Development

Page 75

Vancouver Design Center

 

 

 

*/

x = 110;

pMem = p13705 + (y * 256 * BitsPerPixel / 8) + (x * BitsPerPixel / 8); for (x = 110; x < 210; x++)

{

 

*pMem = 0x01;

/* Draw a pixel in LUT color 1 */

pMem++;

 

}

 

}

}

/*

**===========================================================================

**

**IntelGetLinAddressW32(DWORD physaddr,DWORD *linaddr)

**return value:

**

**0 : No error

**-1 : Error

*/

int IntelGetLinAddressW32(DWORD physaddr, DWORD *linaddr)

{

HANDLE hDriver;

DWORD cbReturned;

int rc, retVal; unsigned Arr[2];

//First see if we are running under WinNT DWORD dwVersion = GetVersion();

if (dwVersion < 0x80000000)

{

hDriver = CreateFile("\\\\.\\S1D13x0x", GENERIC_READ GENERIC_WRITE,

0, NULL, OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL, NULL);

}

else // Win95/98

{

//Dynamically load and prepare to call S1D13x0x.

//The FILE_FLAG_DELETE_ON_CLOSE flag is used so that CloseHandle can

//be used to dynamically unload the VxD.

//The CREATE_NEW flag is not necessary

hDriver = CreateFile("\\\\.\\S1D13x0x.VXD", 0,0,0, CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE, 0);

}

if (hDriver == INVALID_HANDLE_VALUE) return -1;

/*

**From now on, the code is common for Win95 & WinNT

*/

if (physaddr == 0)

Programming Notes and Examples

S1D13705

Issue Date: 02/01/22

X27A-G-002-03

Page 169
Image 169
Epson S1D13705 technical manual NULL, OPENEXISTING,FILEATTRIBUTENORMAL, Null