![]() |
#32
|
||||
|
||||
![]() Quote:
The Mem_Read for VarPtr is still set to 4 (it should be set to POINTER_LENGTH in fact). Quote:
The main point is that we can confirm the relationship between VarPtr and ObjPtr for objects. We can confirm that the Loal Object, is just a LongPtr containing the address of the referenced object or zero, depending on if its been set or not. Before I unscrambled the bytes, it was not obvious that the Mem_Read from VarPtr was in fact the address of the global object. But now we are clear on that. So, using your Mod01 as an example, it means that we can say with 100% confidence that, after runtime: If Mem_ReadHex_Words(lng_objPtr, 4) = 0 then objwks is set to Nothing If Mem_ReadHex_Words(lng_objPtr, 4) = ObjPtr(Sheet1) then objwks has not been properly released If Mem_ReadHex_Words(lng_objPtr, 4) <> ObjPtr(Sheet1) then objwks has been properly released Thus solving the problem that you raised earlier about ObjPtr returning the same thing for the local and global variables. Quote:
Run this code... Code:
Sub testIntDiv() Debug.Print 3 / 5 Debug.Print 3 \ 5 End Sub if p / q = p\ q then p is divisible by q Last edited by CoolBlue; 06-24-2014 at 07:30 PM. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wierd "script code" in a downloaded .doc file | CNBarnes | Word | 2 | 10-18-2012 02:07 AM |
![]() |
krishnaoptif | Word VBA | 9 | 06-22-2012 05:08 AM |
![]() |
Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |
Rules and Alerts: "run a script"? | discountvc | Outlook | 0 | 06-15-2010 07:36 AM |
An "error has occurred in the script on this page" | decann | Outlook | 8 | 09-03-2009 08:54 AM |