Code Monkey home page Code Monkey logo

swt-win32-extension's People

Contributors

cnfree avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

swt-win32-extension's Issues

About Windows PrintService Hook

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.