

public class GettingWMIDataFromLocaComputer { static final public int RPC_C_AUTHN_LEVEL_NONE = 1; static final int RPC_C_IMP_LEVEL_IDENTIFY = 2; static final int EOAC_NONE = 0; static void coInitializeSecurity() { Function function = OleFunctions.getInstance().getFunction("CoInitializeSecurity"); HResult result = new HResult(); function.invoke(result, new Parameter[] { new Handle(), // PSECURITY_DESCRIPTOR pVoid, new Int32(-1), // LONG cAuthSvc, new Handle(), // SOLE_AUTHENTICATION_SERVICE* asAuthSvc, new Handle(), // void* pReserved1, new UInt32(RPC_C_AUTHN_LEVEL_NONE), // DWORD dwAuthnLevel, new UInt32(RPC_C_IMP_LEVEL_IDENTIFY), // DWORD dwImpLevel, new Handle(), // SOLE_AUTHENTICATION_LIST* pAuthList, new UInt32(EOAC_NONE), // DWORD dwCapabilities, new Handle() // void* pReserved3 }); ComException.checkResult(result); } public static void main(String[] args) { ComFunctions.coInitializeEx(CoInit.MULTITHREADED); coInitializeSecurity(); ISWbemLocator wbemLocator = SWbemLocator.create(ClsCtx.INPROC_SERVER); wbemLocator.connectServer(); //... } }
We need to access the WMI API from Java. Does JNIWrapper allow easy access to that API? I didn't see anything in the demo's
--
You received this message because you are subscribed to the Google Groups "JNIWrapper Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jniwrapper-for...@teamdev.com.
To post to this group, send email to jniwrapp...@teamdev.com.
Visit this group at http://groups.google.com/a/teamdev.com/group/jniwrapper-forum/.
For more options, visit https://groups.google.com/a/teamdev.com/groups/opt_out.