http://hi.baidu.com/zmstone/blog/item/6333c21fede38df6e1fe0bc8.html
HRESULT __stdcall IOemUni::FilterGraphics(
PDEVOBJ pdevobj,
PBYTE pBuf,
DWORD dwLen)
{
DWORD dwResult;
HRESULT ret = S_OK;
VERBOSE(DLLTEXT("IOemUni::FilterGraphis() entry.\r\n"));
#define M 424
static BYTE ras[M] = {0}, N = 0;
static BYTE bgn[] = {0x1B, 0x4A, 0x10, 0x1B, 0x55, 0x01, 0x1B, 0x2A, 0x01, 0x00, 0x00};
for(DWORD I=0; I<dwLen; I++){
for(DWORD J=0; J<8; J++){
ras[I*8+J] |= (((pBuf[I]>>(7-J))&0x01)<<(7-N));
}
}
N++;
if(N==8){
N = 0;
bgn[9] = M&0xFF;
bgn[10] = (M>>8)&0xFF;
m_pOEMHelp->DrvWriteSpoolBuf(pdevobj, bgn, sizeof bgn, &dwResult);
if (dwResult != sizeof bgn) ret = S_FALSE;
m_pOEMHelp->DrvWriteSpoolBuf(pdevobj, ras, M, &dwResult);
if (dwResult != M) ret = S_FALSE;
memset(ras, 0, sizeof ras);
}
return ret;
}
分享到:
相关推荐
you how to configure your computer—it’ll teach you how to squeeze out every last bit of power, and how to make the most out of the features and programs included in Windows 7. It’ll also teach you ...
To get the most out of it, you should have a firm grasp of modern JavaScript and some knowledge of how to work with relational databases and the command line. I explain new and interesting bits of ...
ll have the skills to go on to create your second game all by yourself.">Make a 2D RPG in a Weekend shows you how to create your very own dungeon crawler game in RPG Maker VX Ace in a single weekend....
As the author of computer books, I spend a lot of time lurking in the computer section of bookstores, observing the behavior of readers while I’m pretending to read the latest issue of Soap Opera ...
matlab作业1题目 Introduction to MATLAB This homework is designed to teach you to think in terms of matrices and vectors because this is how MATLAB organizes data. You will find that complicated ...
Now you’ve gained a basic understanding of how to maneuver around the debugger, it’s time to take a step down the executable Jenga tower and explore the 1s and 0s that make up your source code....
You'll animate simple shapes to create a model of the solar system, and make your own website so that you can show off your games with your friends. If you just want to make games, jump to the ...
Welcome to the second edition of Teach Yourself C in 24 Hours! Based on the success of the first edition of the book and the feedback from the readers, we have re-written or modified every single ...
to make you a better and more effective designer, and an entirely new chapter focus- ing on the new SuperPreview application included with Expression Web 3 teaching you how to properly test, diagnose,...
@else loops and you’ll learn how to figure out when and why things are going wrong before they bring you to a stop. Moving further, you’ll learn how to use @debug, @warn and @error to properly ...
Throughout, I’ll be taking the attitude that you want to build a model in your head that allows you to understand the language all the way down to the bare metal; if you encounter a puzzle, you’ll ...
you have a basic to intermediate command of TCP/IP networking concepts and Unix administration. All the information in this book comes with a fair warning: As in any number of other endeavors, the ...
You'll master a variety of design patterns, from the simplest single view to complex hierarchical drill-downs. You'll master the art of table-building and learn how to save your data using the iPhone ...
This book starts by teaching you the ... This book will make you ready and also more aware of what you can do with a Galileo board, while inspiring you with more ideas to build your own home projects.
In this tutorial I will teach you how to create a sliding layout, so it would move out of UI when you swipe it upward, and the layout behind it will come out of darkness. All we'll cover here will be...
Web Hacking 101: How to Make Money ... After reading this book, your eyes will be opened to the wide array of vulnerabilities that exist and you’ll likely never look at a website or API the same way.
Updated to cover Wireshark 2.x, the third edition of Practical Packet Analysis will teach you to make sense of your packet captures so that you can better troubleshoot network problems. You’ll find ...
It covers everything you need to produce a fully functioning Intelligent System, one that leverages machine learning and data from user interactions to improve over time and achieve success. After ...
1 I've come to make sure that your stay in Beijing is a pleasant one. 我特地为你们安排使你们在北京的逗留愉快。 2 You're going out of your way for us, I believe. 我相信这是对我们的特殊照顾了。 3 It'...