cnfree / swt-win32-extension Goto Github PK
View Code? Open in Web Editor NEWSWT Win32 Extension extends the Eclipse library SWT.
SWT Win32 Extension extends the Eclipse library SWT.
Hi,Let me describe my problem first.
I need to implement a print service that relies on the windows print job.
But often encountered print job is deleted.
It's hard for me to find out what the program or problems has been to delete the print job.
Fortunately, windows print log records every time to delete.
see the details:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-PrintService" Guid="{747EF6FD-E535-4D16-B510-42C90F6873A1}" />
<EventID>310</EventID>
<Version>0</Version>
<Level>4</Level>
<Task>27</Task>
<Opcode>11</Opcode>
<Keywords>0x4000000000000840</Keywords>
<TimeCreated SystemTime="2016-07-14T08:38:36.792528700Z" />
<EventRecordID>19226</EventRecordID>
<Correlation />
<Execution ProcessID="1592" ThreadID="5776" />
<Channel>Microsoft-Windows-PrintService/Operational</Channel>
<Computer>PC-20151226LLIV</Computer>
<Security UserID="S-1-5-18" />
</System>
<UserData>
<DocumentDeleted xmlns:auto-ns3="http://schemas.microsoft.com/win/2004/08/events" xmlns="http://manifests.microsoft.com/win/2005/08/windows/printing/spooler/core/events">
<Param1>205</Param1>
<Param2>Java Printing</Param2>
<Param3>Administrator</Param3>
<Param4>海亮厨打249</Param4>
</DocumentDeleted>
</UserData>
I want to implement a MessageHookEventListener using hook:
Hook.GETMESSAGE.addListener(printO, new MessageHookEventListener()
{
@Override
public void acceptMessageHookData(final MessageHookData messagehookdata)
{
if (messagehookdata != null)
{
new Runnable()
{
public void run()
{
try
{
if (Hook.GETMESSAGE.isInstalled(printO))
{
logger.info(System.currentTimeMillis());
logger.info("LParam:" + messagehookdata.getLParam() + "\n");
logger.info("Message:" + messagehookdata.getMessage() + "\n");
logger.info("MessageHwnd:" + messagehookdata.getMessageHwnd() + "\n");
logger.info("MessageParamL:" + messagehookdata.getMessageParamL() + "\n");
logger.info("MessageParamW:" + messagehookdata.getMessageParamW() + "\n");
logger.info("NCode:" + messagehookdata.getNCode() + "\n");
logger.info("Time:" + messagehookdata.getTime() + "\n");
logger.info("WParam:" + messagehookdata.getWParam() + "\n");
logger.info("X:" + messagehookdata.getX() + "\n");
logger.info("Y:" + messagehookdata.getY() + "\n");
logger.info("\n");
logger.info("\n");
}
else
{
jTzxArea1.insert("NO!", 0);
}
}
catch (Throwable e)
{
e.printStackTrace();
}
};
}.run();
}
}
});
Hook.GETMESSAGE.install(printO);
Look behind the work will be very difficult.
The 310 event how to catch?
How to convert hwdn into the log I want?
Some changes are needed in lots of places. Any time a handle is passed to the JNI layer it should be "long".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.