try {
pVarResultAddress = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT,
Variant.sizeof);
int[] pArgErr = new int[1];
int hr = dispatch.Invoke(IDispatchProxy.DISPID_MAGIC_GETGLOBALREF,
new GUID(), COM.LOCALE_USER_DEFAULT, COM.DISPATCH_METHOD,
new DISPPARAMS(), pVarResultAddress, new EXCEPINFO(), pArgErr);
if (hr >= COM.S_OK) {
result = Variant.win32_new(pVarResultAddress);
globalRef = result.getInt();