w32process.java

来自「用于Java 组件和通过Windows COM 对象或Windows DLL 来」· Java 代码 · 共 34 行

JAVA
34
字号
//******************************************************************
// Released under the DevelopMentor OpenSource Software License.
// Please consult the LICENSE file in the project root directory,
// or at http://www.develop.com for details before using this
// software.
//******************************************************************

package com.develop.jawin.win32;

import com.develop.jawin.*;
import com.develop.jawin.marshal.*;
import com.develop.io.*;
import com.develop.util.*;
import java.io.*;
import java.util.*;

public class W32Process { //avoid conflict with java.lang.Process

    public static int GetCurrentProcess() 
            throws COMException, IOException
    {
        FuncPtr fp = new FuncPtr("KERNEL32.DLL", "GetCurrentProcess");
        return SharedStubs.invoke_I(fp.getPeer(), 0);
    }

    public static int GetModuleHandleW(String lpModuleName)
            throws COMException, IOException
    {
        FuncPtr fp = new FuncPtr("KERNEL32.DLL", "GetModuleHandleW");
        return SharedStubs.invokeG_I(lpModuleName, fp.getPeer(), 1);
    }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?